Package org.yamcs.security
Class LdapAuthModule
- java.lang.Object
-
- org.yamcs.security.LdapAuthModule
-
- All Implemented Interfaces:
AuthModule
public class LdapAuthModule extends Object implements AuthModule
-
-
Constructor Summary
Constructors Constructor Description LdapAuthModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidauthenticationSucceeded(AuthenticationInfo authenticationInfo)Hook that is called on all AuthModules when a login attempt was successful.AuthenticationInfogetAuthenticationInfo(AuthenticationToken token)Identify the subject based on the given information.AuthorizationInfogetAuthorizationInfo(AuthenticationInfo authenticationInfo)Retrieve access control information based on the given AuthenticationInfo.SpecgetSpec()Returns the valid configuration of the input args of this AuthModule.voidinit(YConfiguration args)Initialize this AuthModule.booleanverifyValidity(AuthenticationInfo authenticationInfo)Verify if previously generated authentication info is (still) valid.
-
-
-
Method Detail
-
getSpec
public Spec 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
public void init(YConfiguration args) throws InitException
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 null if the login failed
- Throws:
AuthenticationException
-
authenticationSucceeded
public void authenticationSucceeded(AuthenticationInfo authenticationInfo)
Description copied from interface:AuthModuleHook that is called on all AuthModules when a login attempt was successful.An example use case is an LDAP AuthModule that queries for additional user information after a successful Kerberos login.
The default implementation does nothing.
- Specified by:
authenticationSucceededin interfaceAuthModule
-
getAuthorizationInfo
public AuthorizationInfo getAuthorizationInfo(AuthenticationInfo authenticationInfo)
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
-
verifyValidity
public boolean verifyValidity(AuthenticationInfo authenticationInfo)
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
-
-