Class KerberosSaslTransportPlugin
- java.lang.Object
-
- org.apache.storm.security.auth.sasl.SaslTransportPlugin
-
- org.apache.storm.security.auth.kerberos.KerberosSaslTransportPlugin
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ITransportPlugin
public class KerberosSaslTransportPlugin extends SaslTransportPlugin
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.storm.security.auth.sasl.SaslTransportPlugin
SaslTransportPlugin.User
-
-
Field Summary
Fields Modifier and Type Field Description static StringKERBEROS-
Fields inherited from class org.apache.storm.security.auth.sasl.SaslTransportPlugin
conf, type
-
-
Constructor Summary
Constructors Constructor Description KerberosSaslTransportPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanareWorkerTokensSupported()Check if worker tokens are supported by this transport.voidclose()org.apache.storm.thrift.transport.TTransportconnect(org.apache.storm.thrift.transport.TTransport transport, String serverHost, String asUser)Connect to the specified server via framed transport.org.apache.storm.thrift.transport.TTransportFactorygetServerTransportFactory(boolean impersonationAllowed)Create the transport factory needed for serving.-
Methods inherited from class org.apache.storm.security.auth.sasl.SaslTransportPlugin
getPort, getServer, prepare
-
-
-
-
Field Detail
-
KERBEROS
public static final String KERBEROS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getServerTransportFactory
public org.apache.storm.thrift.transport.TTransportFactory getServerTransportFactory(boolean impersonationAllowed) throws IOExceptionDescription copied from class:SaslTransportPluginCreate the transport factory needed for serving. All subclass must implement this method.- Specified by:
getServerTransportFactoryin classSaslTransportPlugin- Parameters:
impersonationAllowed- true if SASL impersonation should be allowed, else false.- Returns:
- server transport factory
- Throws:
IOException- on any error.
-
connect
public org.apache.storm.thrift.transport.TTransport connect(org.apache.storm.thrift.transport.TTransport transport, String serverHost, String asUser) throws IOException, org.apache.storm.thrift.transport.TTransportExceptionDescription copied from interface:ITransportPluginConnect to the specified server via framed transport.- Parameters:
transport- The underlying Thrift transport.serverHost- server hostasUser- the user as which the connection should be established, and all the subsequent actions should be executed. Only applicable when using secure storm cluster. A null/blank value here will just indicate to use the logged in user.- Throws:
IOExceptionorg.apache.storm.thrift.transport.TTransportException
-
areWorkerTokensSupported
public boolean areWorkerTokensSupported()
Description copied from interface:ITransportPluginCheck if worker tokens are supported by this transport.- Returns:
- true if they are else false.
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classSaslTransportPlugin
-
-