Skip to content

AMBARI-24894. Sensitive service configuration values should be decrypted when processing the Ambari agent command script, if enabled (amagyar)#2613

Merged
zeroflag merged 9 commits intoapache:trunkfrom
zeroflag:AMBARI-24894-trunk
Nov 20, 2018

Conversation

@zeroflag
Copy link
Copy Markdown
Contributor

@zeroflag zeroflag commented Nov 15, 2018

What changes were proposed in this pull request?

The sensitive data in ambari-agent config updates should be encrypted. The ambari-server generates an encrpytion key which is stored persistently in the credential store.

  • This key is used to encrypt the sesntive data. See: AgentConfigUpdateEncryptor.java
  • The key is shared with ambari-agent in a stomp message. See: HeartBeatHandler.java
  • The key is stored in the memory of the ambari-agent. See: EncryptionKeyListener.py
  • Decryption happens on the agent side. See: config_dictionary.py

The python 3rd party crypto library (pycryptodome) is not yet added to this PR.

How was this patch tested?

  • enabled encyption
$ ambari-server setup-security
...
$ echo security.passwords.encryption.enabled=true >> /etc/ambari-server/conf/ambari.properties 
$ echo security.server.encrypt_sensitive_data=true >> /etc/ambari-server/conf/ambari.properties
$ ambari-server restart
  • changed a password type property on the ambari UI
  • checked that the data in the command.json and agent cache file was encrypted
  • restarted ambari agent and ambari server
  • checked if there was no config update sent to the agent
  • changed the encryption key and restarted ambari server

  • checked that a config update was sent to the ambari agent

  • changed the value of an encrypted property

  • checked that a config update was sent to the ambari agent

  • checked if properties marked as keystore=true are decrypted before they're written out to the credential store by the ambari agent

…ted when processing the Ambari agent command script, if enabled (amagyar)
@zeroflag zeroflag self-assigned this Nov 15, 2018
@zeroflag zeroflag requested review from a user, mpapirkovskyy, rlevas and smolnar82 November 15, 2018 10:44
@asfgit
Copy link
Copy Markdown

asfgit commented Nov 15, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/4544/
Test FAILed.
Test FAILured.

…ript/config_dictionary.py

Co-Authored-By: zeroflag <m.magyar3@gmail.com>
@asfgit
Copy link
Copy Markdown

asfgit commented Nov 15, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/4553/
Test FAILed.
Test FAILured.

…ted when processing the Ambari agent command script, if enabled (amagyar)
…ted when processing the Ambari agent command script, if enabled (amagyar)
@asfgit
Copy link
Copy Markdown

asfgit commented Nov 15, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/4555/
Test FAILed.
Test FAILured.

@asfgit
Copy link
Copy Markdown

asfgit commented Nov 15, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/4556/
Test FAILed.
Test FAILured.

…ted when processing the Ambari agent command script, if enabled (amagyar)
@asfgit
Copy link
Copy Markdown

asfgit commented Nov 16, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/4568/
Test FAILed.
Test FAILured.

…ted when processing the Ambari agent command script, if enabled (amagyar)
@asfgit
Copy link
Copy Markdown

asfgit commented Nov 16, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/4569/
Test FAILed.
Test FAILured.

…ted when processing the Ambari agent command script, if enabled (amagyar)
@asfgit
Copy link
Copy Markdown

asfgit commented Nov 16, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/4570/
Test FAILed.
Test FAILured.

@zeroflag
Copy link
Copy Markdown
Contributor Author

retest this please

@asfgit
Copy link
Copy Markdown

asfgit commented Nov 16, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/4572/
Test FAILed.
Test FAILured.

@zeroflag
Copy link
Copy Markdown
Contributor Author

retest this please

@zeroflag
Copy link
Copy Markdown
Contributor Author

retest this please

@asfgit
Copy link
Copy Markdown

asfgit commented Nov 17, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/4574/
Test FAILed.
Test FAILured.

@zeroflag
Copy link
Copy Markdown
Contributor Author

retest this please

@asfgit
Copy link
Copy Markdown

asfgit commented Nov 17, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/4575/
Test FAILed.
Test FAILured.

…ted when processing the Ambari agent command script, if enabled (amagyar)
@asfgit
Copy link
Copy Markdown

asfgit commented Nov 19, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/4580/
Test PASSed.

…ted when processing the Ambari agent command script, if enabled (amagyar)
@zeroflag zeroflag changed the title (preview) AMBARI-24894. Sensitive service configuration values should be decrypted when processing the Ambari agent command script, if enabled (amagyar) AMBARI-24894. Sensitive service configuration values should be decrypted when processing the Ambari agent command script, if enabled (amagyar) Nov 19, 2018
@asfgit
Copy link
Copy Markdown

asfgit commented Nov 19, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/4587/
Test FAILed.
Test FAILured.

@zeroflag
Copy link
Copy Markdown
Contributor Author

retest this please

@asfgit
Copy link
Copy Markdown

asfgit commented Nov 19, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/4589/
Test PASSed.

@zeroflag zeroflag merged commit f8a0199 into apache:trunk Nov 20, 2018
@zeroflag zeroflag deleted the AMBARI-24894-trunk branch November 20, 2018 09:22
vishalsuvagia pushed a commit to vishalsuvagia/ambari that referenced this pull request Feb 26, 2019
…ted when processing the Ambari agent command script, if enabled (amagyar) (apache#2613)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants