-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[AMBARI-22667] Use internal LDAP configuration values rather than ambari.properties #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing JavaDoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed all missing Javadoc issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing JavaDoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing JavaDoc
|
@smolnar82 Please read the How to Contribute guide - https://cwiki.apache.org/confluence/display/AMBARI/How+to+Contribute I have edited the title of this PR for consistency. |
|
@vivekratnavel OK; sorry for missing the brackets...I'll include them going forward |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need both printStackTrace + logging here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have put this into something like Password.fromFile(path, default), because this part doesn't need the Configuration/CredentialStore dependency.
Also please consider returning a Password objects instead of String/char[] arrays.
Storing password in strings is not perfectly safe because there is no way of deleting it from the memory after it is not needed on the other hand a char[] can be nulled out. So a Password class that wraps a char[] array would be easier to enhance with this ability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally I agree...
However this is out of scope of this task. Let me create a new JIRA to cover this topic.
f5378f2 to
58a433d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be using logging methods rather than printStackTrace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
…ri.properties values when accessing the configured LDAP server for LDAP sync and authentication
58a433d to
0aaf8c8
Compare
@rlevas @zeroflag @echekanskiy
Local build result:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33:51 min
[INFO] Finished at: 2018-01-09T16:35:33+01:00
[INFO] Final Memory: 215M/897M
[INFO] ------------------------------------------------------------------------
Besides updating the unit tests I also conducted integration tests against a sample LDAP server (ldap.forumsys.com:389):
Continuously checked ambari-server.log to see if LDAP configuration is loaded/reloaded from the DB.