Added props file Encoding/Decoding procedure.

This commit is contained in:
Marko Milić 2018-02-19 11:23:32 +01:00 committed by GitHub
parent 1367fa1cdf
commit 1efb7dbdb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -330,7 +330,31 @@ the api will stop at boot up and ask for.
keystore.path=/path/to/api.keystore.jks
truststore.path=/path/to/api.truststore.jks
## Using SSL Encryption with props file
For SSL encryption we use jks keystores.
Note that keystore (and all keys within) must have the same password for unlocking, for which the api will stop at boot up and ask for.
* Edit your props file(s) to contain:
jwt.use.ssl=true
keystore.path=/path/to/api.keystore.jks
keystore.alias=SOME_KEYSTORE_ALIAS
A props key value, XXX, is considered encrypted if has an encryption property (XXX.is_encrypted) in addition to the regular props key name in the props file e.g:
* db.url.is_encrypted=true
* db.url=BASE64URL(SOME_ENCRYPTED_VALUE)
The Encrypt/Decrypt workflow is :
1. Encrypt: Array[Byte]
2. Helpers.base64Encode(encrypted)
3. Props file: String
4. Helpers.base64Decode(encryptedValue)
5. Decrypt: Array[Byte]
1st, 2nd and 3rd step can be done using an external tool
## Scala / Lift
* We use scala and liftweb http://www.liftweb.net/