Description
While DelegationTokenManager can set external secretManager, it have the assumption that the token is going to be o.a.h.security.token.delegation.DelegationTokenIdentifier, and use DelegationTokenIdentifier method to decode a token.
@SuppressWarnings("unchecked") public UserGroupInformation verifyToken(Token<DelegationTokenIdentifier> token) throws IOException { ByteArrayInputStream buf = new ByteArrayInputStream(token.getIdentifier()); DataInputStream dis = new DataInputStream(buf); DelegationTokenIdentifier id = new DelegationTokenIdentifier(tokenKind); id.readFields(dis); dis.close(); secretManager.verifyToken(id, token.getPassword()); return id.getUser(); }
It's not going to work it the token kind is other than web.DelegationTokenIdentifier. For example, RM want to reuse it but hook it to RMDelegationTokenSecretManager and RMDelegationTokenIdentifier, which has the customized way to decode a token.
Attachments
Attachments
Issue Links
- blocks
-
YARN-2656 RM web services authentication filter should add support for proxy user
- Closed