[
https://issues.apache.org/jira/browse/HDFS-3627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13570726#comment-13570726
]
Scott Forman commented on HDFS-3627:
------------------------------------
Added new DelegationKey constructor which takes a Base64 encoded string as the
SecretKey parameter, and methods getBase64EncodedKey(), equals() and hashCode()
methods. Added unit test, TestDelegationKey.java, to test the equivalence of a
DelegationKey object constructed from a SecretKey and a 2nd DelegationKey
object constructed from the Base64 encoded string retrieved from the 1st
object, using the getBase64EncodedKey() method.
Now the DelegationKey fields (keyId, expiryDate and keyBytes as a Base64
encoded string) output by ImageLoaderCurrent.processDelegationTokens() are all
retrieved by methods on DelegationKey.
These changes and unit test allow for the verification that a DelegationKey can
be reconstructed from its id, date and a base 64 encoded string.
> OfflineImageViewer oiv Indented processor prints out the Java class name in
> the DELEGATION_KEY field
> ----------------------------------------------------------------------------------------------------
>
> Key: HDFS-3627
> URL: https://issues.apache.org/jira/browse/HDFS-3627
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 0.23.0
> Reporter: Ravi Prakash
> Priority: Minor
> Attachments: HDFS-3627.patch, HDFS-3627.patch
>
>
> Instead of the contents of the delegation key this is printed out
> DELEGATION_KEY =
> org.apache.hadoop.security.token.delegation.DelegationKey@1e2ca7
> DELEGATION_KEY =
> org.apache.hadoop.security.token.delegation.DelegationKey@105bd58
> DELEGATION_KEY =
> org.apache.hadoop.security.token.delegation.DelegationKey@1d1e730
> DELEGATION_KEY =
> org.apache.hadoop.security.token.delegation.DelegationKey@1a116c9
> DELEGATION_KEY =
> org.apache.hadoop.security.token.delegation.DelegationKey@df1832
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira