Skip to content
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

HAWQ-1485. Fix exception of decryptPassword twice in lookupResource() #1256

Merged
merged 1 commit into from Jun 15, 2017

Conversation

interma
Copy link
Member

@interma interma commented Jun 15, 2017

In my earlier PR, decryptPassword() is called in the beginning of lookupResource(), but BaseClient (in ranger lib) also need decrypt password in some situation, decrypt twice will cause a exception.

This PR fixed this issue.

@@ -112,7 +119,7 @@ private void decryptPassword(Map<String, String> configs) throws Exception {
// when decrypt failed do nothing
LOG.warn("decrypt_password failed: " + e);
}
configs.put("password", normal_password);
configs.put("password_jdbc", normal_password);
Copy link
Member Author

@interma interma Jun 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put the decrypted password into a new field, so it doesn't influence the BaseClient decrypt it(the password field) again.

@interma
Copy link
Member Author

interma commented Jun 15, 2017

@linwen @zhangh43 @stanlyxiang help to review again, thanks!

@interma interma changed the title HAWQ-1485. fix exception of decryptPassword twice in lookupResource() HAWQ-1485. Fix exception of decryptPassword twice in lookupResource() Jun 15, 2017
Copy link
Member

@stanlyxiang stanlyxiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@linwen
Copy link
Contributor

linwen commented Jun 15, 2017

LGTM

@asfgit asfgit merged commit ee20036 into apache:master Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants