public interface GridSecureSessionSpi extends GridSpi, GridSpiJsonConfigurable
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 |
|---|---|
boolean |
supported(GridSecuritySubjectType subjType)
Checks if given subject is supported by this SPI.
|
byte[] |
validate(GridSecuritySubjectType subjType,
byte[] subjId,
byte[] tok,
Object params)
Validates a given token and returns a valid
"remember-me" session token. |
getName, getNodeAttributes, onContextDestroyed, onContextInitialized, spiStart, spiStopsetJsonboolean supported(GridSecuritySubjectType subjType)
subjType - Subject type.True if subject type is supported, false otherwise.@Nullable byte[] validate(GridSecuritySubjectType subjType, byte[] subjId, @Nullable byte[] tok, @Nullable Object params) throws GridSpiException
"remember-me" session token.
If passed in token is null, then this is a first time token generation
and a new session token will be created.
Otherwise, the passed in token is validated and if validation passes, then
the next value for session token is returned. If failed, then null is returned.
subjType - Subject type.subjId - Unique subject ID such as local or remote node ID, client ID, etc.tok - If null, then this is the first request and new session
token should be created, otherwise, the token will be validated and next session
token will be generated.params - Additional implementation-specific parameters.null if validation failed.GridSpiException - If validation resulted in system error. Note that
bad credentials should not cause this exception.
Core Products
:
Data Grid ver. 6.0.2,
Streaming ver. 6.0.2
Accelerators
:
Hadoop Accelerator ver. 6.0.2
Release Date
:
March 24 2014