-
Notifications
You must be signed in to change notification settings - Fork 9k
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
HADOOP-16615. Add password check for credential provider #1614
Conversation
💔 -1 overall
This message was automatically generated. |
@steveloughran HADOOP-16615 patch here. |
...on-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/CredentialShell.java
Outdated
Show resolved
Hide resolved
...on-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/CredentialShell.java
Show resolved
Hide resolved
rc = shell.run(args2); | ||
assertEquals(0, rc); | ||
assertTrue(outContent.toString().contains("Password match success for credential1.")); |
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.
Add an error message here which includes the failing string if the conditions not met. FWIW we are moving to using AssertJ assertions -if you are happy with them, feel free to use them over classic junit asserts
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.
An error check added.
oops, deleted the wrong yetus comment. once you update the patch it will kick off again. Overall -patch LGTM; a little bit of tuning and it's ready |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
code is good, you just need to deal with those checkstyles, which are mostly indentation and a couple of minor line lengths |
🎊 +1 overall
This message was automatically generated. |
retest this, please |
retest this please |
@steveloughran please help to retest this. |
I like all tests in our code to provide enough diagnostics on failure that we can work out what went wrong purely from the Jenkins logs. AssertJ is really good here, which is why we are adopting it in new code. For your tests, I'm going to propose a new assertion which can be used to validate the output of the new command. If the condition is not met,
Yetus probably isn't retesting the code, as it thinks the last change was a documentation only change. If you change the test case things may be different. |
Use assertj
@steveloughran thanks for your explanation. Change to use assertj. |
thanks. code LGTM. +1 |
+1, merged to trunk. Thanks! (if you do a PR with this cherry picked back to 3.2/3.1 then I'll pull back there too. It's low risk and beneficial to all) |
@steveloughran thanks for your help and review. |
When we use hadoop credential provider to store password, we can not sure if the password is the same as what we remembered.
So, I think we need a check tool.