@GridSpiConsistencyChecked(optional=true) public interface GridAuthenticationSpi extends GridSpi, GridSpiJsonConfigurable
authentication and does not provide any authorization
functionality.
The default authentication SPI is GridNoopAuthenticationSpi
which permits any request.
Gridgain provides the following GridAuthenticationSpi implementations:
GridNoopAuthenticationSpi - permits any request.
GridPasscodeAuthenticationSpi -
validates authentication with passcode phrase.
GridJaasAuthenticationSpi -
validates authentication with JAAS Java extension.
NOTE: multiple authentication 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
authentication.
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 |
authenticate(GridSecuritySubjectType subjType,
byte[] subjId,
Object credentials)
Authenticates a given subject (either node or remote client).
|
boolean |
supported(GridSecuritySubjectType subjType)
Checks if given subject is supported by this SPI.
|
getName, getNodeAttributes, onContextDestroyed, onContextInitialized, spiStart, spiStopsetJsonboolean supported(GridSecuritySubjectType subjType)
subjType - Subject type.True if subject type is supported, false otherwise.boolean authenticate(GridSecuritySubjectType subjType, byte[] subjId, @Nullable Object credentials) throws GridSpiException
subjType - Subject type.subjId - Unique subject ID such as local or remote node ID, client ID, etc.credentials - Authentication parameters (may be null or empty based on implementation).
The map of parameters may be different for different subject types. Refer to specific
authentication SPI documentation for a list of required parameters.true if authentication passed, false if authentication failed.GridSpiException - If authentication 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