[WIP] AMBARI-25043. Sensitive Ambari configuration values are encrypted in Ambari Server DB#2742
Merged
Merged
Conversation
|
Refer to this link for build results (access rights to CI server needed): |
rlevas
approved these changes
Dec 21, 2018
ghost
approved these changes
Dec 21, 2018
| } | ||
|
|
||
| /** | ||
| * @return |
Contributor
Author
There was a problem hiding this comment.
Will add the missing JavaDoc; thanks for pointing out.
|
|
||
| @Override | ||
| public void decryptSensitiveData(AmbariServerConfiguration decryptible) { | ||
| decryptible.toMap().entrySet().stream().filter(f -> passwordConfigurations.contains(f.getKey())).filter(f -> isEncryptedPassword(f.getValue())) |
Contributor
Author
There was a problem hiding this comment.
Fine by me; let me submit a new patchset soon
…tests in the commit
|
Refer to this link for build results (access rights to CI server needed): |
rlevas
approved these changes
Dec 21, 2018
vishalsuvagia
pushed a commit
to vishalsuvagia/ambari
that referenced
this pull request
Feb 26, 2019
…Ambari Server DB (apache#2742)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Ambari configuration value types are defined in
org.apache.ambari.server.configuration.AmbariServerConfigurationKey.Sensitive properties have property type oforg.apache.ambari.server.configuration.ConfigurationPropertyType#PASSWORD.Using this information, if this feature is enabled, the Ambari server should encrypt sensitive values before storing them in the
ambari_configurationtable in the Ambari DB.The Ambari server should encrypt sensitive configuration values if the following has been met:
ambari-server setup-securityCLI (using option # 2 - Encrypt passwords stored in ambari.properties file)security.server.encrypt_sensitive_datais set totrueWIP: the API still return the encrypted form; I'm not sure if this needs to be changed...
How was this patch tested?
Updated unit tests and they passed:
In addition to uni tests the following steps have been done to check if everything works as expected:
setupSecurity.pyand the generated JAR then restarted the server and the agentsambari-server setup-ldap(some attributes are changed in the below sample such as server name, etc...)