public final class SamSubsystem
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static SamSubsystem |
instance
the SAM subsystem instance
|
private KeyIntegrityChecker |
keyChecker
the key integrity checker used by the subsystem for all sam types
|
static java.lang.String |
PROPKEY_BASE
the property key base used for SAM algorithm verifiers
|
private java.lang.String |
userBaseRdn |
private javax.naming.directory.DirContext |
userContext
the user context the SamSubsystem would use to verify passwords
|
private java.util.Map<SamType,SamVerifier> |
verifiers
a map of verifiers so we do not need to create a new one every time
|
| Constructor and Description |
|---|
SamSubsystem() |
| Modifier and Type | Method and Description |
|---|---|
static SamSubsystem |
getInstance()
Gets the singleton instance of the SamSubsystem.
|
void |
setIntegrityChecker(KeyIntegrityChecker keyChecker)
Sets the KeyIntegrityChecker used by the entire SamSubsystem.
|
void |
setUserContext(javax.naming.directory.DirContext userContext,
java.lang.String userBaseRdn)
Sets the context under which user entries can be found.
|
javax.security.auth.kerberos.KerberosKey |
verify(PrincipalStoreEntry entry,
byte[] sad)
Uses the principal entry information to load the approapriate SamVerifier
and verify the Single-use password.
|
public static final java.lang.String PROPKEY_BASE
private static SamSubsystem instance
private final java.util.Map<SamType,SamVerifier> verifiers
private KeyIntegrityChecker keyChecker
private javax.naming.directory.DirContext userContext
private java.lang.String userBaseRdn
public static SamSubsystem getInstance()
public void setIntegrityChecker(KeyIntegrityChecker keyChecker)
keyChecker - the KeyIntegrityChecker used by the entire SamSubsystempublic javax.security.auth.kerberos.KerberosKey verify(PrincipalStoreEntry entry, byte[] sad) throws SamException
entry - the store entry for the Kerberos principalsad - the single-use authentication data encrypted timestamp payloadSamException - thrown when there is a failure within the verifier
or a verifier cannot be found.public void setUserContext(javax.naming.directory.DirContext userContext,
java.lang.String userBaseRdn)
userContext - the jndi context under which users can be found.userBaseRdn - the container with users