I am using storing MarkLogic access credentials in gradle.properties file as a plain text and it used while running Harmonization/ingestion/Corb jobs. As i am adding the credentials in the properties file as a plain text, its visible to everyone who has code access. What is best approach to encrypt these credentials
CodePudding user response:
You could apply the gradle-credentials-plugin in order to use encrypted values for credentials.
Apply the nu.studer.credentials
plugin to your Gradle project.
plugins {
id 'nu.studer.credentials' version '3.0'
}
- https://github.com/marklogic-community/ml-gradle/wiki/Encrypting-passwords
- https://www.marklogic.com/blog/protecting-password-ml-gradle/
- https://help.marklogic.com/News/NewsItem/View/617/protecting-passwords-in-ml-gradle-projects
- https://www.youtube.com/watch?v=KtBmH5ce2cU
CoRB also support encryption/decryption of passwords and components of the XCC connectionstring and can be configured with a DECRYPTER option, specifying a decrypter class such as PrivateKeyDecrypter or JasyptDecrypter, or HostKeyDecrypter.