org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager Java Examples
The following examples show how to use
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DelegationTokenAuthenticationFilter.java From hadoop with Apache License 2.0 | 6 votes |
@Override public void init(FilterConfig filterConfig) throws ServletException { super.init(filterConfig); AuthenticationHandler handler = getAuthenticationHandler(); AbstractDelegationTokenSecretManager dtSecretManager = (AbstractDelegationTokenSecretManager) filterConfig.getServletContext(). getAttribute(DELEGATION_TOKEN_SECRET_MANAGER_ATTR); if (dtSecretManager != null && handler instanceof DelegationTokenAuthenticationHandler) { DelegationTokenAuthenticationHandler dtHandler = (DelegationTokenAuthenticationHandler) getAuthenticationHandler(); dtHandler.setExternalDelegationTokenSecretManager(dtSecretManager); } if (handler instanceof PseudoAuthenticationHandler || handler instanceof PseudoDelegationTokenAuthenticationHandler) { setHandlerAuthMethod(SaslRpcServer.AuthMethod.SIMPLE); } if (handler instanceof KerberosAuthenticationHandler || handler instanceof KerberosDelegationTokenAuthenticationHandler) { setHandlerAuthMethod(SaslRpcServer.AuthMethod.KERBEROS); } // proxyuser configuration Configuration conf = getProxyuserConfiguration(filterConfig); ProxyUsers.refreshSuperUserGroupsConfiguration(conf, PROXYUSER_PREFIX); }
Example #2
Source File: DelegationTokenAuthenticationFilter.java From big-c with Apache License 2.0 | 6 votes |
@Override public void init(FilterConfig filterConfig) throws ServletException { super.init(filterConfig); AuthenticationHandler handler = getAuthenticationHandler(); AbstractDelegationTokenSecretManager dtSecretManager = (AbstractDelegationTokenSecretManager) filterConfig.getServletContext(). getAttribute(DELEGATION_TOKEN_SECRET_MANAGER_ATTR); if (dtSecretManager != null && handler instanceof DelegationTokenAuthenticationHandler) { DelegationTokenAuthenticationHandler dtHandler = (DelegationTokenAuthenticationHandler) getAuthenticationHandler(); dtHandler.setExternalDelegationTokenSecretManager(dtSecretManager); } if (handler instanceof PseudoAuthenticationHandler || handler instanceof PseudoDelegationTokenAuthenticationHandler) { setHandlerAuthMethod(SaslRpcServer.AuthMethod.SIMPLE); } if (handler instanceof KerberosAuthenticationHandler || handler instanceof KerberosDelegationTokenAuthenticationHandler) { setHandlerAuthMethod(SaslRpcServer.AuthMethod.KERBEROS); } // proxyuser configuration Configuration conf = getProxyuserConfiguration(filterConfig); ProxyUsers.refreshSuperUserGroupsConfiguration(conf, PROXYUSER_PREFIX); }
Example #3
Source File: RMDelegationTokenIdentifier.java From hadoop with Apache License 2.0 | 5 votes |
@Private public static void setSecretManager( AbstractDelegationTokenSecretManager<RMDelegationTokenIdentifier> secretManager, InetSocketAddress serviceAddress) { localSecretManager = secretManager; localServiceAddress = serviceAddress; }
Example #4
Source File: RMDelegationTokenIdentifier.java From big-c with Apache License 2.0 | 5 votes |
@Private public static void setSecretManager( AbstractDelegationTokenSecretManager<RMDelegationTokenIdentifier> secretManager, InetSocketAddress serviceAddress) { localSecretManager = secretManager; localServiceAddress = serviceAddress; }
Example #5
Source File: RMAuthenticationFilter.java From hadoop with Apache License 2.0 | 4 votes |
public static void setDelegationTokenSecretManager( AbstractDelegationTokenSecretManager<?> manager) { RMAuthenticationFilter.manager = manager; }
Example #6
Source File: DelegationTokenManager.java From hadoop with Apache License 2.0 | 4 votes |
@VisibleForTesting @SuppressWarnings("rawtypes") public AbstractDelegationTokenSecretManager getDelegationTokenSecretManager() { return secretManager; }
Example #7
Source File: RMAuthenticationFilter.java From big-c with Apache License 2.0 | 4 votes |
public static void setDelegationTokenSecretManager( AbstractDelegationTokenSecretManager<?> manager) { RMAuthenticationFilter.manager = manager; }
Example #8
Source File: DelegationTokenManager.java From big-c with Apache License 2.0 | 4 votes |
@VisibleForTesting @SuppressWarnings("rawtypes") public AbstractDelegationTokenSecretManager getDelegationTokenSecretManager() { return secretManager; }
Example #9
Source File: DelegationTokenManager.java From hadoop with Apache License 2.0 | 3 votes |
/** * Sets an external <code>DelegationTokenSecretManager</code> instance to * manage creation and verification of Delegation Tokens. * <p/> * This is useful for use cases where secrets must be shared across multiple * services. * * @param secretManager a <code>DelegationTokenSecretManager</code> instance */ public void setExternalDelegationTokenSecretManager( AbstractDelegationTokenSecretManager secretManager) { this.secretManager.stopThreads(); this.secretManager = secretManager; managedSecretManager = false; }
Example #10
Source File: DelegationTokenManager.java From big-c with Apache License 2.0 | 3 votes |
/** * Sets an external <code>DelegationTokenSecretManager</code> instance to * manage creation and verification of Delegation Tokens. * <p/> * This is useful for use cases where secrets must be shared across multiple * services. * * @param secretManager a <code>DelegationTokenSecretManager</code> instance */ public void setExternalDelegationTokenSecretManager( AbstractDelegationTokenSecretManager secretManager) { this.secretManager.stopThreads(); this.secretManager = secretManager; managedSecretManager = false; }
Example #11
Source File: DelegationTokenAuthenticationHandler.java From hadoop with Apache License 2.0 | 2 votes |
/** * Sets an external <code>DelegationTokenSecretManager</code> instance to * manage creation and verification of Delegation Tokens. * <p/> * This is useful for use cases where secrets must be shared across multiple * services. * * @param secretManager a <code>DelegationTokenSecretManager</code> instance */ public void setExternalDelegationTokenSecretManager( AbstractDelegationTokenSecretManager secretManager) { tokenManager.setExternalDelegationTokenSecretManager(secretManager); }
Example #12
Source File: DelegationTokenAuthenticationHandler.java From big-c with Apache License 2.0 | 2 votes |
/** * Sets an external <code>DelegationTokenSecretManager</code> instance to * manage creation and verification of Delegation Tokens. * <p/> * This is useful for use cases where secrets must be shared across multiple * services. * * @param secretManager a <code>DelegationTokenSecretManager</code> instance */ public void setExternalDelegationTokenSecretManager( AbstractDelegationTokenSecretManager secretManager) { tokenManager.setExternalDelegationTokenSecretManager(secretManager); }