Package org.wildfly.security.sasl.gssapi
Class AbstractGssapiMechanism
- java.lang.Object
-
- org.wildfly.security.sasl.util.AbstractSaslParticipant
-
- org.wildfly.security.sasl.gssapi.AbstractGssapiMechanism
-
- All Implemented Interfaces:
SaslWrapper
- Direct Known Subclasses:
GssapiClient
,GssapiServer
abstract class AbstractGssapiMechanism extends AbstractSaslParticipant
Base class for the SaslServer and SaslClient implementations implementing the GSSAPI mechanism as defined by RFC 4752- Author:
- Darran Lofthouse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractGssapiMechanism.GssapiWrapper
protected static class
AbstractGssapiMechanism.QOP
-
Field Summary
Fields Modifier and Type Field Description protected int
actualMaxReceiveBuffer
private static String
AUTH
private static String
AUTH_CONF
private static String
AUTH_INT
private static byte
CONFIDENTIALITY_PROTECTION
protected int
configuredMaxReceiveBuffer
protected static int
DEFAULT_MAX_BUFFER_SIZE
protected GSSContext
gssContext
private static byte
INTEGRITY_PROTECTION
protected int
maxBuffer
private static byte
NO_SECURITY_LAYER
protected AbstractGssapiMechanism.QOP[]
orderedQops
protected boolean
relaxComplianceChecks
protected AbstractGssapiMechanism.QOP
selectedQop
-
Fields inherited from class org.wildfly.security.sasl.util.AbstractSaslParticipant
COMPLETE_STATE, FAILED_STATE, NO_BYTES
-
Fields inherited from interface org.wildfly.security.sasl.util.SaslWrapper
IDENTITY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractGssapiMechanism(String mechanismName, String protocol, String serverName, Map<String,?> props, CallbackHandler callbackHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Dispose of this participant.Object
getNegotiatedProperty(String propName)
Get a property negotiated between this participant and the other.protected byte[]
intToNetworkOrderBytes(int value)
Obtain a 3 byte representation of an int, as an internal method it is assumed the maximum value of the int has already takine into account that it needs to fit into tree bytes,protected int
networkOrderBytesToInt(byte[] bytes, int start, int length)
Converts bytes in network byte order to an integer starting from the specified offset.protected AbstractGssapiMechanism.QOP[]
parsePreferredQop(String qop)
-
Methods inherited from class org.wildfly.security.sasl.util.AbstractSaslParticipant
assertComplete, evaluateMessage, evaluateMessage, getCallbackHandler, getIntProperty, getMechanismName, getProtocol, getServerName, getStringProperty, getWrapper, handleCallbacks, init, isComplete, negotiationComplete, setNegotiationState, setWrapper, tryHandleCallbacks, unwrap, wrap
-
-
-
-
Field Detail
-
AUTH
private static final String AUTH
- See Also:
- Constant Field Values
-
AUTH_INT
private static final String AUTH_INT
- See Also:
- Constant Field Values
-
AUTH_CONF
private static final String AUTH_CONF
- See Also:
- Constant Field Values
-
NO_SECURITY_LAYER
private static final byte NO_SECURITY_LAYER
- See Also:
- Constant Field Values
-
INTEGRITY_PROTECTION
private static final byte INTEGRITY_PROTECTION
- See Also:
- Constant Field Values
-
CONFIDENTIALITY_PROTECTION
private static final byte CONFIDENTIALITY_PROTECTION
- See Also:
- Constant Field Values
-
DEFAULT_MAX_BUFFER_SIZE
protected static final int DEFAULT_MAX_BUFFER_SIZE
- See Also:
- Constant Field Values
-
gssContext
protected GSSContext gssContext
-
configuredMaxReceiveBuffer
protected final int configuredMaxReceiveBuffer
-
actualMaxReceiveBuffer
protected int actualMaxReceiveBuffer
-
maxBuffer
protected int maxBuffer
-
relaxComplianceChecks
protected final boolean relaxComplianceChecks
-
orderedQops
protected final AbstractGssapiMechanism.QOP[] orderedQops
-
selectedQop
protected AbstractGssapiMechanism.QOP selectedQop
-
-
Constructor Detail
-
AbstractGssapiMechanism
protected AbstractGssapiMechanism(String mechanismName, String protocol, String serverName, Map<String,?> props, CallbackHandler callbackHandler) throws SaslException
- Throws:
SaslException
-
-
Method Detail
-
networkOrderBytesToInt
protected int networkOrderBytesToInt(byte[] bytes, int start, int length)
Converts bytes in network byte order to an integer starting from the specified offset. This method is implemented in the context of the GSSAPI mechanism, it is assumed that the size of the byte array is appropriate.
-
intToNetworkOrderBytes
protected byte[] intToNetworkOrderBytes(int value)
Obtain a 3 byte representation of an int, as an internal method it is assumed the maximum value of the int has already takine into account that it needs to fit into tree bytes,
-
dispose
public void dispose() throws SaslException
Description copied from class:AbstractSaslParticipant
Dispose of this participant.- Overrides:
dispose
in classAbstractSaslParticipant
- Throws:
SaslException
- if disposal failed
-
parsePreferredQop
protected AbstractGssapiMechanism.QOP[] parsePreferredQop(String qop) throws SaslException
- Throws:
SaslException
-
getNegotiatedProperty
public Object getNegotiatedProperty(String propName)
Description copied from class:AbstractSaslParticipant
Get a property negotiated between this participant and the other.- Overrides:
getNegotiatedProperty
in classAbstractSaslParticipant
- Parameters:
propName
- the property name- Returns:
- the property value or
null
if not defined
-
-