com.sun.enterprise.container.common
Class GenericAdminAuthenticator

java.lang.Object
  extended by 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.

Note that admin security is tested only with FileRealm and LDAPRealm.
See Also:
LDAPAdminAccessConfigurator, CreateFileUser

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.glassfish.internal.api.AdminAccessController
AdminAccessController.Access
 
Constructor Summary
GenericAdminAuthenticator()
           
 
Method Summary
 Subject authenticate(Object credentials)
          The JMXAUthenticator's authenticate method.
 AdminAccessController.Access loginAsAdmin(String user, String password, String realm, String originHost)
          Ensures that authentication and authorization works as specified in class documentation.
 AdminAccessController.Access loginAsAdmin(String user, String password, String realm, String originHost, Map<String,String> authRelatedHeaders, 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
 

Constructor Detail

GenericAdminAuthenticator

public GenericAdminAuthenticator()
Method Detail

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 opearation
password - String representing clear-text password of the user doing an admin operation
realm - String representing the name of the admin realm for given server
originHost - 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 opearation
password - String representing clear-text password of the user doing an admin operation
realm - String representing the name of the admin realm for given server
originHost - the host from which the request was sent
candidateAdminIndicator - 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.