java.lang.Object
org.yamcs.http.HttpHandler
org.yamcs.security.SpnegoAuthModule
- All Implemented Interfaces:
AuthModule
Implements SPNEGO authentication against an external Kerberos host.
Upon succesful authentication, Kerberos issues a 'ticket' with limited lifetime. SpnegoAuthModule maps this
ticket to an internally generated authorization code which can be used for repeat identity checks against the
SecurityStore.
-
Field Summary
Fields inherited from class org.yamcs.http.HttpHandler
MIME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIdentify the subject based on the given information.getAuthorizationInfo(AuthenticationInfo authenticationInfo) Retrieve access control information based on the given AuthenticationInfo.getSpec()Returns the valid configuration of the input args of this AuthModule.voidhandle(HandlerContext ctx) voidinit(YConfiguration args) Initialize this AuthModule.booleanbooleanverifyValidity(AuthenticationInfo authenticationInfo) Verify if previously generated authentication info is (still) valid.Methods inherited from class org.yamcs.http.HttpHandler
doHandle, getAccessTokenFromCookieMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.yamcs.security.AuthModule
authenticationSucceeded
-
Constructor Details
-
SpnegoAuthModule
public SpnegoAuthModule()
-
-
Method Details
-
getSpec
Description copied from interface:AuthModuleReturns the valid configuration of the input args of this AuthModule.- Specified by:
getSpecin interfaceAuthModule- Returns:
- the argument specification.
-
init
Description copied from interface:AuthModuleInitialize this AuthModule.- Specified by:
initin interfaceAuthModule- Parameters:
args- The configured arguments for this AuthModule. IfAuthModule.getSpec()is implemented then this contains the arguments after being validated (including any defaults).- Throws:
InitException- When something goes wrong during the execution of this method.
-
getAuthenticationInfo
public AuthenticationInfo getAuthenticationInfo(AuthenticationToken token) throws AuthenticationException Description copied from interface:AuthModuleIdentify the subject based on the given information.- Specified by:
getAuthenticationInfoin interfaceAuthModule- Returns:
- an info object containing the principal of the subject, or
nullif the login failed - Throws:
AuthenticationException
-
verifyValidity
Description copied from interface:AuthModuleVerify if previously generated authentication info is (still) valid. For example, if the authentication info references an externally issued expiring ticket, this can be validated here.This method is called very frequently, so implementations must take care to limit external requests.
- Specified by:
verifyValidityin interfaceAuthModule- Parameters:
authenticationInfo- information relevant to the authentication process- Returns:
- true if the authentication info is valid, false otherwise
-
getAuthorizationInfo
Description copied from interface:AuthModuleRetrieve access control information based on the given AuthenticationInfo. This AuthenticationInfo may have been generated by a different AuthModule.- Specified by:
getAuthorizationInfoin interfaceAuthModule- Returns:
- an info object containing role/privilege information of the subject
-
requireAuth
public boolean requireAuth()- Specified by:
requireAuthin classHttpHandler
-
handle
- Specified by:
handlein classHttpHandler
-