Class JaasSecurityDomainIdentityLoginModule

  • All Implemented Interfaces:
    LoginModule

    @Deprecated
    public class JaasSecurityDomainIdentityLoginModule
    extends AbstractPasswordCredentialLoginModule
    Deprecated.
    security domains are not used for encryption currently
    A login module for statically defining a data source username and password that uses a password that has been ecrypted by a JaasSecurityDomain. The base64 format of the data source password may be generated using the PBEUtils command: java -cp jbosssx.jar org.jboss.security.plugins.PBEUtils salt count domain-password data-source-password salt : the Salt attribute from the JaasSecurityDomain count : the IterationCount attribute from the JaasSecurityDomain domain-password : the plaintext password that maps to the KeyStorePass attribute from the JaasSecurityDomain data-source-password : the plaintext password for the data source that should be encrypted with the JaasSecurityDomain password for example: java -cp jbosssx.jar org.jboss.security.plugins.PBEUtils abcdefgh 13 master '' Encoded password: E5gtGMKcXPP A sample login-config.xml configuration entry would be: sa E5gtGMKcXPP jboss.jca:service=LocalTxCM,name=DefaultDS jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword
    Version:
    $Revision: 71545 $
    Author:
    Scott.Stark@jboss.org, Noel Rocher 29, june 2004 username & userName issue
    • Constructor Detail

      • JaasSecurityDomainIdentityLoginModule

        public JaasSecurityDomainIdentityLoginModule()
        Deprecated.
    • Method Detail

      • initialize

        public void initialize​(Subject subject,
                               CallbackHandler handler,
                               Map sharedState,
                               Map options)
        Deprecated.
        Description copied from class: AbstractServerLoginModule
        Initialize the login module. This stores the subject, callbackHandler and sharedState and options for the login session. Subclasses should override if they need to process their own options. A call to super.initialize(...) must be made in the case of an override.

        Specified by:
        initialize in interface LoginModule
        Overrides:
        initialize in class AbstractServerLoginModule
        Parameters:
        subject - the Subject to update after a successful login.
        handler - the CallbackHandler that will be used to obtain the the user identity and credentials.
        sharedState - a Map shared between all configured login module instances
        options - the parameters passed to the login module.
      • login

        public boolean login()
                      throws LoginException
        Deprecated.
        Description copied from class: AbstractServerLoginModule
        Looks for javax.security.auth.login.name and javax.security.auth.login.password values in the sharedState map if the useFirstPass option was true and returns true if they exist. If they do not or are null this method returns false. Note that subclasses that override the login method must set the loginOk ivar to true if the login succeeds in order for the commit phase to populate the Subject. This implementation sets loginOk to true if the login() method returns true, otherwise, it sets loginOk to false.
        Specified by:
        login in interface LoginModule
        Overrides:
        login in class AbstractServerLoginModule
        Throws:
        LoginException
      • commit

        public boolean commit()
                       throws LoginException
        Deprecated.
        Description copied from class: AbstractServerLoginModule
        Method to commit the authentication process (phase 2). If the login method completed successfully as indicated by loginOk == true, this method adds the getIdentity() value to the subject getPrincipals() Set. It also adds the members of each Group returned by getRoleSets() to the subject getPrincipals() Set.
        Specified by:
        commit in interface LoginModule
        Overrides:
        commit in class AbstractServerLoginModule
        Returns:
        true always.
        Throws:
        LoginException
      • getRoleSets

        protected Group[] getRoleSets()
                               throws LoginException
        Deprecated.
        Description copied from class: AbstractServerLoginModule
        Overriden by subclasses to return the Groups that correspond to the to the role sets assigned to the user. Subclasses should create at least a Group named "Roles" that contains the roles assigned to the user. A second common group is "CallerPrincipal" that provides the application identity of the user rather than the security domain identity.
        Specified by:
        getRoleSets in class AbstractServerLoginModule
        Returns:
        Group[] containing the sets of roles
        Throws:
        LoginException