com.sun.enterprise.container.common
Class GenericAdminAuthenticator
java.lang.Object
com.sun.enterprise.container.common.GenericAdminAuthenticator
- All Implemented Interfaces:
- javax.management.remote.JMXAuthenticator, AdminAccessController, org.jvnet.hk2.component.PostConstruct
@Service
public class GenericAdminAuthenticator
- extends java.lang.Object
- implements AdminAccessController, javax.management.remote.JMXAuthenticator, org.jvnet.hk2.component.PostConstruct
Implementation of AdminAccessController that delegates to LoginContextDriver.
- Since:
- GlassFish v3
- Author:
- Kedar Mhaswade (km@dev.java.net)
This is still being developed. This particular implementation both authenticates and authorizes
the users directly or indirectly.
- Authentication works by either calling FileRealm.authenticate() or by calling LoginContextDriver.login
- The admin users in case of administration file realm are always in a fixed group called "asadmin". In case
of LDAP, the specific group relationships are enforced.
Note that admin security is tested only with FileRealm and LDAPRealm.
- See Also:
LDAPAdminAccessConfigurator,
CreateFileUser
|
Method Summary |
javax.security.auth.Subject |
authenticate(java.lang.Object credentials)
The JMXAUthenticator's authenticate method. |
AdminAccessController.Access |
loginAsAdmin(java.lang.String user,
java.lang.String password,
java.lang.String realm,
java.lang.String originHost)
Ensures that authentication and authorization works as specified in class documentation. |
AdminAccessController.Access |
loginAsAdmin(java.lang.String user,
java.lang.String password,
java.lang.String realm,
java.lang.String originHost,
java.util.Map<java.lang.String,java.lang.String> authRelatedHeaders,
java.security.Principal requestPrincipal)
Ensures that authentication and authorization works as specified in class documentation. |
void |
postConstruct()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericAdminAuthenticator
public GenericAdminAuthenticator()
postConstruct
public void postConstruct()
- Specified by:
postConstruct in interface org.jvnet.hk2.component.PostConstruct
loginAsAdmin
public AdminAccessController.Access loginAsAdmin(java.lang.String user,
java.lang.String password,
java.lang.String realm,
java.lang.String originHost)
throws javax.security.auth.login.LoginException
- Ensures that authentication and authorization works as specified in class documentation.
- Specified by:
loginAsAdmin in interface AdminAccessController
- Parameters:
user - String representing the user name of the user doing an admin opearationpassword - String representing clear-text password of the user doing an admin operationrealm - String representing the name of the admin realm for given serveroriginHost - the host from which the request was sent
- Returns:
- AdminAcessController.Access level of access to grant
- Throws:
javax.security.auth.login.LoginException
loginAsAdmin
public AdminAccessController.Access loginAsAdmin(java.lang.String user,
java.lang.String password,
java.lang.String realm,
java.lang.String originHost,
java.util.Map<java.lang.String,java.lang.String> authRelatedHeaders,
java.security.Principal requestPrincipal)
throws javax.security.auth.login.LoginException
- Ensures that authentication and authorization works as specified in class documentation.
- Specified by:
loginAsAdmin in interface AdminAccessController
- Parameters:
user - String representing the user name of the user doing an admin opearationpassword - String representing clear-text password of the user doing an admin operationrealm - String representing the name of the admin realm for given serveroriginHost - the host from which the request was sentcandidateAdminIndicator - String containing the special admin indicator (null if absent)requestPrincipal - Principal, typically as reported by the secure transport delivering the admin request
- Returns:
- AdminAcessController.Access level of access to grant
- Throws:
javax.security.auth.login.LoginException
authenticate
public javax.security.auth.Subject authenticate(java.lang.Object credentials)
- The JMXAUthenticator's authenticate method.
- Specified by:
authenticate in interface javax.management.remote.JMXAuthenticator
Copyright © 2012 GlassFish Community. All Rights Reserved.