anikakelhanka opened a new pull request, #6351:
URL: https://github.com/apache/hadoop/pull/6351

   …Command
   
   ### Description of PR
   The JavaKeyStoreProvider#getCredentialEntry function call returns NULL when 
credential alias not found in jceks file which is an expected behavior. But, 
the CredentialShell#check has no null check in place for the function call 
result which results into NullPointerException at 
[line#368](https://github.com/apache/hadoop/blob/19b9e6a97b8faa0eb48e7b1855ab37e6d4b6c2a9/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/CredentialShell.java#L368).
   
   Proposed Fix: The check command should display 'password match failed' 
message when credential alias not found. This is same message that is thrown 
for incorrect alias value:
   
   Password match failed for javax.jdo.option.ConnectionPassword.
   
   ### How was this patch tested?
   All hadoop unit tests are passing. For integration testing, This patch is 
tested locally deploying on hadoop 3.3.5 and 3.3.6 clusters. 
   
   ### For code changes:
   
   - [Yes] Does the title or this PR starts with the corresponding JIRA issue 
id (e.g. 'HADOOP-17799. Your PR title ...')?
   - [NA ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [NA] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [NA] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to