public class AuthUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
LOGIN_CONTEXT_CLIENT |
static String |
LOGIN_CONTEXT_PACEMAKER_CLIENT |
static String |
LOGIN_CONTEXT_PACEMAKER_DIGEST |
static String |
LOGIN_CONTEXT_PACEMAKER_SERVER |
static String |
LOGIN_CONTEXT_SERVER |
static String |
SERVICE |
Constructor and Description |
---|
AuthUtils() |
Modifier and Type | Method and Description |
---|---|
static KerberosTicket |
cloneKerberosTicket(KerberosTicket kerberosTicket) |
static KerberosTicket |
deserializeKerberosTicket(byte[] tgtBytes) |
static String |
get(Configuration configuration,
String section,
String key) |
static Collection<IAutoCredentials> |
GetAutoCredentials(Map storm_conf)
Get all of the configured AutoCredential Plugins.
|
static Configuration |
GetConfiguration(Map storm_conf)
Construct a JAAS configuration object per storm configuration file
|
static Collection<ICredentialsRenewer> |
GetCredentialRenewers(Map conf)
Get all of the configured Credential Renewer Plugins.
|
static IHttpCredentialsPlugin |
GetDrpcHttpCredentialsPlugin(Map conf)
Construct an HttpServletRequest credential plugin specified by the DRPC storm configuration
|
static IGroupMappingServiceProvider |
GetGroupMappingServiceProviderPlugin(Map storm_conf)
Construct a group mapping service provider plugin
|
static Collection<INimbusCredentialPlugin> |
getNimbusAutoCredPlugins(Map conf)
Get all the Nimbus Auto cred plugins.
|
static IPrincipalToLocal |
GetPrincipalToLocalPlugin(Map storm_conf)
Construct a principal to local plugin
|
static ITransportPlugin |
GetTransportPlugin(ThriftConnectionType type,
Map storm_conf,
Configuration login_conf)
Construct a transport plugin per storm configuration
|
static IHttpCredentialsPlugin |
GetUiHttpCredentialsPlugin(Map conf)
Construct an HttpServletRequest credential plugin specified by the UI storm configuration
|
static String |
makeDigestPayload(Configuration login_config,
String config_section) |
static Subject |
populateSubject(Subject subject,
Collection<IAutoCredentials> autos,
Map<String,String> credentials)
Populate a subject from credentials using the IAutoCredentials.
|
static SortedMap<String,?> |
PullConfig(Configuration conf,
String conf_entry)
Pull a set of keys out of a Configuration.
|
static byte[] |
serializeKerberosTicket(KerberosTicket tgt) |
static void |
updateSubject(Subject subject,
Collection<IAutoCredentials> autos,
Map<String,String> credentials)
Update a subject from credentials using the IAutoCredentials.
|
public static final String LOGIN_CONTEXT_SERVER
public static final String LOGIN_CONTEXT_CLIENT
public static final String LOGIN_CONTEXT_PACEMAKER_DIGEST
public static final String LOGIN_CONTEXT_PACEMAKER_SERVER
public static final String LOGIN_CONTEXT_PACEMAKER_CLIENT
public static final String SERVICE
public static Configuration GetConfiguration(Map storm_conf)
Construct a JAAS configuration object per storm configuration file
storm_conf
- Storm configurationpublic static SortedMap<String,?> PullConfig(Configuration conf, String conf_entry) throws IOException
Pull a set of keys out of a Configuration.
conf
- The config to pull the key/value pairs out of.conf_entry
- The app configuration entry name to get stuff from.IOException
public static IPrincipalToLocal GetPrincipalToLocalPlugin(Map storm_conf)
Construct a principal to local plugin
storm_conf
- storm configurationpublic static IGroupMappingServiceProvider GetGroupMappingServiceProviderPlugin(Map storm_conf)
Construct a group mapping service provider plugin
storm_conf
- storm configurationpublic static Collection<ICredentialsRenewer> GetCredentialRenewers(Map conf)
Get all of the configured Credential Renewer Plugins.
conf
- the storm configuration to use.public static Collection<INimbusCredentialPlugin> getNimbusAutoCredPlugins(Map conf)
Get all the Nimbus Auto cred plugins.
conf
- nimbus configuration to use.public static Collection<IAutoCredentials> GetAutoCredentials(Map storm_conf)
Get all of the configured AutoCredential Plugins.
storm_conf
- the storm configuration to use.public static Subject populateSubject(Subject subject, Collection<IAutoCredentials> autos, Map<String,String> credentials)
Populate a subject from credentials using the IAutoCredentials.
subject
- the subject to populate or null if a new Subject should be created.autos
- the IAutoCredentials to call to populate the subject.credentials
- the credentials to pull frompublic static void updateSubject(Subject subject, Collection<IAutoCredentials> autos, Map<String,String> credentials)
Update a subject from credentials using the IAutoCredentials.
subject
- the subject to updateautos
- the IAutoCredentials to call to update the subject.credentials
- the credentials to pull frompublic static ITransportPlugin GetTransportPlugin(ThriftConnectionType type, Map storm_conf, Configuration login_conf)
Construct a transport plugin per storm configuration
public static IHttpCredentialsPlugin GetUiHttpCredentialsPlugin(Map conf)
Construct an HttpServletRequest credential plugin specified by the UI storm configuration
conf
- storm configurationpublic static IHttpCredentialsPlugin GetDrpcHttpCredentialsPlugin(Map conf)
Construct an HttpServletRequest credential plugin specified by the DRPC storm configuration
conf
- storm configurationpublic static String get(Configuration configuration, String section, String key) throws IOException
IOException
public static String makeDigestPayload(Configuration login_config, String config_section)
public static byte[] serializeKerberosTicket(KerberosTicket tgt) throws Exception
Exception
public static KerberosTicket deserializeKerberosTicket(byte[] tgtBytes)
public static KerberosTicket cloneKerberosTicket(KerberosTicket kerberosTicket)
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.