public interface GridSecureSessionSpi extends GridSpi
The default secure session SPI is GridNoopSecureSessionSpi
which permits any request.
Gridgain provides the following GridSecureSessionSpi implementations:
GridNoopSecureSessionSpi - permits any request.
GridRememberMeSecureSessionSpi -
validates client session with remember-me session token.
NOTE: that multiple secure session SPIs may be started on the same grid node. In this case
GridGain will differentiate between them based on supported(GridSecuritySubjectType)
value. The first SPI which returns true for a given subject type will be used for
session validation.
NOTE: this SPI (i.e. methods in this interface) should never be used directly. SPIs provide
internal view on the subsystem and is used internally by GridGain kernal. In rare use cases when
access to a specific implementation of this SPI is required - an instance of this SPI can be obtained
via Grid.configuration() method to check its configuration properties or call other non-SPI
methods. Note again that calling methods from this interface on the obtained instance can lead
to undefined behavior and explicitly not supported.
| Modifier and Type | Method and Description |
|---|---|
byte[] |
generateSessionToken(GridSecuritySubjectType subjType,
UUID subjId,
Object params)
Generates new session token.
|
boolean |
supported(GridSecuritySubjectType subjType)
Checks if given subject is supported by this SPI.
|
boolean |
validate(GridSecuritySubjectType subjType,
UUID subjId,
byte[] tok,
Object params)
Validates given session token.
|
getName, getNodeAttributes, onContextDestroyed, onContextInitialized, spiStart, spiStopboolean supported(GridSecuritySubjectType subjType)
subjType - Subject type.True if subject type is supported, false otherwise.boolean validate(GridSecuritySubjectType subjType, UUID subjId, byte[] tok, @Nullable Object params) throws GridSpiException
subjType - Subject type.subjId - Unique subject ID such as local or remote node ID, client ID, etc.tok - Token to validate.params - Additional implementation-specific parameters.True if session token is valid, false otherwise.GridSpiException - If validation resulted in system error. Note that
bad credentials should not cause this exception.byte[] generateSessionToken(GridSecuritySubjectType subjType, UUID subjId, @Nullable Object params) throws GridSpiException
subjType - Subject type.subjId - Unique subject ID such as local or remote node ID, client ID, etc.params - Additional implementation-specific parameters.GridSpiExceptionCopyright © 2014. All rights reserved.