Encrypt Elasticsearch and database credentials
This step is optional
All properties can be encrypted but in most cases the credentials for accessing Elasticsearch and the database are most likely candidates for encryption:
- Database username (
spring.datasource.username
) - Database password (
spring.datasource.password
) - Elasticsearch username (
elasticsearch.cluster.username
) - Elasticsearch password (
elasticsearch.cluster.password
)
The encryption of properties must be manually done, as described below.
The script that can be used to encrypt properties is included in the Portal Dedicated installation in the scripts
directory: encryptProperty.sh
.
It takes a single argument which is the plaintext property to be encrypted, surrounded by quotes.
The script outputs the encrypted value.
Example:
% ./scripts/encryptProperty.sh "mconsole"
The property was successfully encrypted.
The full output below can be used as a replacement property in application.properties
or as input to the configuration script.
ENC(tw2x9+FKx9dysXeXEkXXGQ6mSrQI9Dp5)
That property can be used to manually update the application.properties
file or as an input to the configuration script:
spring.datasource.password=ENC(tw2x9+FKx9dysXeXEkXXGQ6mSrQI9Dp5)