本文整理汇总了Java中org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager类的典型用法代码示例。如果您正苦于以下问题:Java AbstractDelegationTokenSecretManager类的具体用法?Java AbstractDelegationTokenSecretManager怎么用?Java AbstractDelegationTokenSecretManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractDelegationTokenSecretManager类属于org.apache.hadoop.security.token.delegation包,在下文中一共展示了AbstractDelegationTokenSecretManager类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager; //导入依赖的package包/类
@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);
}
示例2: setSecretManager
import org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager; //导入依赖的package包/类
@Private
public static void setSecretManager(
AbstractDelegationTokenSecretManager<RMDelegationTokenIdentifier> secretManager,
InetSocketAddress serviceAddress) {
localSecretManager = secretManager;
localServiceAddress = serviceAddress;
}
示例3: getDelegationTokenSecretManager
import org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager; //导入依赖的package包/类
@VisibleForTesting
@SuppressWarnings("rawtypes")
public AbstractDelegationTokenSecretManager getDelegationTokenSecretManager() {
return secretManager;
}
示例4: setDelegationTokenSecretManager
import org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager; //导入依赖的package包/类
public static void setDelegationTokenSecretManager(
AbstractDelegationTokenSecretManager<?> manager) {
RMAuthenticationFilter.manager = manager;
}
示例5: setExternalDelegationTokenSecretManager
import org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager; //导入依赖的package包/类
/**
* 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;
}
示例6: setExternalDelegationTokenSecretManager
import org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager; //导入依赖的package包/类
/**
* 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);
}