@GridSpiConsistencyChecked(optional=true) public interface GridAuthenticationSpi extends GridSpi
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 |
|---|---|
GridSecuritySubject |
authenticate(GridAuthenticationContext authCtx)
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, spiStopboolean supported(GridSecuritySubjectType subjType)
subjType - Subject type.True if subject type is supported, false otherwise.GridSecuritySubject authenticate(GridAuthenticationContext authCtx) throws GridSpiException
authCtx - Authentication context. Contains all necessary information required to authenticate
the subject.null if authentication did not pass.GridSpiException - If authentication resulted in system error.
Note that bad credentials should not cause this exception.Copyright © 2014. All rights reserved.