|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tyrex.security.cert.X509CertificateLoginModule
Implements an X509 certificate validation login module.
This module will read the client certificates associated with the subject and determine whether at least one of them was issued by a trusted party. These certificates will further be validated and against a CRL list. The principal of all the validated certificates are added to the subject.
A login exception is reported only if the client certificate failed validation (indicates a forged certificate), has expired, or has been listed as revoked in the CRL.
This module should be used in one of two modes:
The following options are supported:
By using this module with no configuration options, the default key store for the JVM will be used (typically JKS) and all the trusted certificates in that key store will be used. If at least one client certificate is found that is trusted, the login will succeed. If no client certificate is found that is trusted, the login will fail.
Field Summary | |
static java.lang.String |
OPTION_CRL_CLASS
The CRL class (crl-class). |
static java.lang.String |
OPTION_KEY_STORE
The key store name (key-store). |
static java.lang.String |
OPTION_LOG_ERRORS
Log errors (log-errors). |
static java.lang.String |
OPTION_TRUSTED_CERTS
The trusted certificate list (trusted-certs). |
Constructor Summary | |
X509CertificateLoginModule()
|
Method Summary | |
boolean |
abort()
|
boolean |
commit()
|
void |
initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler handler,
java.util.Map sharedState,
java.util.Map options)
|
boolean |
login()
|
boolean |
logout()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String OPTION_KEY_STORE
public static final java.lang.String OPTION_TRUSTED_CERTS
public static final java.lang.String OPTION_CRL_CLASS
public static final java.lang.String OPTION_LOG_ERRORS
Constructor Detail |
public X509CertificateLoginModule()
Method Detail |
public void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler handler, java.util.Map sharedState, java.util.Map options)
initialize
in interface javax.security.auth.spi.LoginModule
public boolean login() throws javax.security.auth.login.LoginException
login
in interface javax.security.auth.spi.LoginModule
javax.security.auth.login.LoginException
public boolean commit() throws javax.security.auth.login.LoginException
commit
in interface javax.security.auth.spi.LoginModule
javax.security.auth.login.LoginException
public boolean abort() throws javax.security.auth.login.LoginException
abort
in interface javax.security.auth.spi.LoginModule
javax.security.auth.login.LoginException
public boolean logout() throws javax.security.auth.login.LoginException
logout
in interface javax.security.auth.spi.LoginModule
javax.security.auth.login.LoginException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |