[
https://issues.apache.org/jira/browse/HADOOP-19010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17796008#comment-17796008
]
Anika Kelhanka edited comment on HADOOP-19010 at 12/13/23 5:45 AM:
-------------------------------------------------------------------
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].
Raising a PR shortly.
was (Author: anikakelhanka):
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].
Raising a PR shortly.
> NullPointerException thrown by Hadoop Credential Check command
> --------------------------------------------------------------
>
> Key: HADOOP-19010
> URL: https://issues.apache.org/jira/browse/HADOOP-19010
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 3.3.0
> Reporter: Anika Kelhanka
> Priority: Major
>
> *Description*: Hadoop's credential check throws {{NullPointerException}} when
> alias not found.
> {code:bash}
> hadoop credential check "fs.gs.proxy.username" -provider
> "jceks://file/usr/lib/hive/conf/hive.jceks" {code}
> Checking aliases for CredentialProvider:
> jceks://file/usr/lib/hive/conf/hive.jceks
> Enter alias password:
> java.lang.NullPointerException
> at
> org.apache.hadoop.security.alias.CredentialShell$CheckCommand.execute(CredentialShell.java:369)
> at org.apache.hadoop.tools.CommandShell.run(CommandShell.java:73)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:82)
> at
> org.apache.hadoop.security.alias.CredentialShell.main(CredentialShell.java:529)}}
> *Expected Behavior:* The check command should display *check failed message*
> when alias not found similar to what it throws for incorrect alias value i.e
> following failure message:
> {{Password match failed for javax.jdo.option.ConnectionPassword.}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]