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 classAbstractGssapiMechanism.GssapiWrapperprotected static classAbstractGssapiMechanism.QOP
-
Field Summary
Fields Modifier and Type Field Description protected intactualMaxReceiveBufferprivate static StringAUTHprivate static StringAUTH_CONFprivate static StringAUTH_INTprivate static byteCONFIDENTIALITY_PROTECTIONprotected intconfiguredMaxReceiveBufferprotected static intDEFAULT_MAX_BUFFER_SIZEprotected GSSContextgssContextprivate static byteINTEGRITY_PROTECTIONprotected intmaxBufferprivate static byteNO_SECURITY_LAYERprotected AbstractGssapiMechanism.QOP[]orderedQopsprotected booleanrelaxComplianceChecksprotected AbstractGssapiMechanism.QOPselectedQop-
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 protectedAbstractGssapiMechanism(String mechanismName, String protocol, String serverName, Map<String,?> props, CallbackHandler callbackHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Dispose of this participant.ObjectgetNegotiatedProperty(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 intnetworkOrderBytesToInt(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 SaslExceptionDescription copied from class:AbstractSaslParticipantDispose of this participant.- Overrides:
disposein 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:AbstractSaslParticipantGet a property negotiated between this participant and the other.- Overrides:
getNegotiatedPropertyin classAbstractSaslParticipant- Parameters:
propName- the property name- Returns:
- the property value or
nullif not defined
-
-