A configurable (as opposed to using system properties) SPNEGO LoginService.
At startup, this LoginService will login via JAAS the service principal, composed
of the service name and the host name,
for example HTTP/wonder.com, using a keyTab file as the service principal
credentials.
Upon receiving an HTTP request, the server tries to authenticate the client
calling LoginService#login(String, Object, Request, Function) where the GSS APIs are used to
verify client tokens and (perhaps after a few round-trips) a GSSContext is
established.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private SPNEGOLoginService. | |
| private final GSSManager | |
| private String | |
| private IdentityService | |
| private Path | |
| private final LoginService | |
| private final String | |
| private String | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private Callable | |
| protected void | doStart()
Overrides org. Starts the managed lifecycle beans in the order they were added. |
| public String | |
| public IdentityService | getIdentityService()
Implements org. Get the IdentityService associated with this Login Service. |
| public Path | Returns: the path of the keyTab file containing service credentialsGet the path of the keyTab file containing service credentials. |
| public String | |
| public String | |
| public UserIdentity | |
| public void | |
| private Callable | |
| private Callable | |
| public void | |
| public void | setIdentityService(IdentityService
the IdentityService associated with this Login Service. identityService)Implements org. Set the IdentityService associated with this Login Service. |
| public void | setKeyTabPath(Path
the path of the keyTab file containing service credentials keyTabFile)Set the path of the keyTab file containing service credentials. |
| public void | |
| private String | |
| public boolean | validate(UserIdentity
The user to validate user)Implements org. Validate a user identity. |
| _context | back to summary |
|---|---|
| private SPNEGOLoginService. | |
| _gssManager | back to summary |
|---|---|
| private final GSSManager _gssManager | |
| _hostName | back to summary |
|---|---|
| private String _hostName | |
| _identityService | back to summary |
|---|---|
| private IdentityService _identityService | |
| _keyTabPath | back to summary |
|---|---|
| private Path _keyTabPath | |
| _loginService | back to summary |
|---|---|
| private final LoginService _loginService | |
| _realm | back to summary |
|---|---|
| private final String _realm | |
| _serviceName | back to summary |
|---|---|
| private String _serviceName | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG Hides org. | |
| SPNEGOLoginService | back to summary |
|---|---|
| public SPNEGOLoginService(String realm, LoginService loginService) | |
| acceptGSSContext | back to summary |
|---|---|
| private Callable | |
| doStart | back to summary |
|---|---|
| protected void doStart() throws Exception Overrides org. Doc from org. Starts the managed lifecycle beans in the order they were added.
| |
| getHostName | back to summary |
|---|---|
public String getHostName()
| |
| getIdentityService | back to summary |
|---|---|
| public IdentityService getIdentityService() Implements org. Doc from org. Get the IdentityService associated with this Login Service.
| |
| getKeyTabPath | back to summary |
|---|---|
| public Path getKeyTabPath() Get the path of the keyTab file containing service credentials.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org. | |
| getServiceName | back to summary |
|---|---|
public String getServiceName()
| |
| login | back to summary |
|---|---|
| public UserIdentity login(String username, Object credentials, Request request, Function<Boolean, Session> getOrCreateSession) Implements org. Doc from org. Login a user.
| |
| logout | back to summary |
|---|---|
| public void logout(UserIdentity user) Implements org.
| |
| newGSSContext | back to summary |
|---|---|
| private Callable | |
| newSpnegoContext | back to summary |
|---|---|
| private Callable | |
| setHostName | back to summary |
|---|---|
| public void setHostName(String hostName) Set the host name of the service.
| |
| setIdentityService | back to summary |
|---|---|
| public void setIdentityService(IdentityService identityService) Implements org. Doc from org. Set the IdentityService associated with this Login Service.
| |
| setKeyTabPath | back to summary |
|---|---|
| public void setKeyTabPath(Path keyTabFile) Set the path of the keyTab file containing service credentials.
| |
| setServiceName | back to summary |
|---|---|
public void setServiceName(String serviceName)
| |
| toUserName | back to summary |
|---|---|
| private String toUserName(GSSContext gssContext) | |
| validate | back to summary |
|---|---|
| public boolean validate(UserIdentity user) Implements org. Doc from org. Validate a user identity.
Validate that a UserIdentity previously created by a call
to
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| private final transient GSSContext |
| Access | Constructor and Description |
|---|---|
| private |
| ATTRIBUTE | back to summary |
|---|---|
| public static final String ATTRIBUTE | |
| gssContext | back to summary |
|---|---|
| private final transient GSSContext gssContext | |
| GSSContextHolder | back to summary |
|---|---|
| private GSSContextHolder(GSSContext gssContext) | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public AppConfigurationEntry[] | getAppConfigurationEntry(String
the name used to index the Configuration. name)Implements abstract javax. Retrieve the AppConfigurationEntries for the specified |
| SPNEGOConfiguration | back to summary |
|---|---|
| private SPNEGOConfiguration() | |
| getAppConfigurationEntry | back to summary |
|---|---|
| public AppConfigurationEntry[] getAppConfigurationEntry(String name) Implements abstract javax. Doc from javax. Retrieve the AppConfigurationEntries for the specified
| |
| Modifier and Type | Field and Description |
|---|---|
| private GSSCredential | |
| private Subject |
| Access | Constructor and Description |
|---|---|
| private |
| _serviceCredential | back to summary |
|---|---|
| private GSSCredential _serviceCredential | |
| _subject | back to summary |
|---|---|
| private Subject _subject | |
| SPNEGOContext | back to summary |
|---|---|
| private SPNEGOContext() | |