com.sun.enterprise.container.common
Class GenericAdminAuthenticator
java.lang.Object
com.sun.enterprise.container.common.GenericAdminAuthenticator
- All Implemented Interfaces:
- JMXAuthenticator, AdminAccessController, org.jvnet.hk2.component.PostConstruct
@Service
public class GenericAdminAuthenticator
- extends Object
- implements AdminAccessController, 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
| 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(String user,
String password,
String realm,
String originHost)
throws 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:
LoginException
loginAsAdmin
public AdminAccessController.Access loginAsAdmin(String user,
String password,
String realm,
String originHost,
Map<String,String> authRelatedHeaders,
Principal requestPrincipal)
throws 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:
LoginException
authenticate
public Subject authenticate(Object credentials)
- The JMXAUthenticator's authenticate method.
- Specified by:
authenticate in interface JMXAuthenticator
Copyright © 2012 GlassFish Community. All Rights Reserved.