JAAS with user registry - Websphere

This is a discussion on JAAS with user registry - Websphere ; Hi, I created a standalone custom registry in my application server was v6.1. How to write a loginModule in my jaas standalone client program to autheticate username and password with standalone custom registry. Friends please help me out from this. ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: JAAS with user registry

  1. JAAS with user registry

    Hi,

    I created a standalone custom registry in my application server was v6.1. How to write a loginModule in my jaas standalone client program to autheticate username and password with standalone custom registry. Friends please help me out from this. Me unable to sort out how to connect my custom login module with the standalone custom registry.

  2. Re: JAAS with user registry

    potti.nareshkumar@gmail.com wrote:
    > Hi,
    >
    > I created a standalone custom registry in my application server was
    > v6.1. How to write a loginModule in my jaas standalone client program
    > to autheticate username and password with standalone custom registry.
    > Friends please help me out from this. Me unable to sort out how to
    > connect my custom login module with the standalone custom registry.


    Jaas login modules run on the server, not the client. And I still don't
    understand why you need one. If you configure WAS to use your custom
    user registry, it will authenticate against it without the need to write
    any specific custom login modules. If you have other requirements you
    need to explain them more clearly.

  3. Re: JAAS with user registry

    On Jul 27, 10:51*am, Paul Ilechko wrote:
    > potti.nareshku...@gmail.com wrote:
    > > Hi,

    >
    > > I created a standalone custom registry in my application server was
    > > v6.1. How to write a loginModule in my jaas standalone client program
    > > to autheticate username and password with standalone custom registry.
    > > Friends please help me out from this. Me unable to sort out how to
    > > connect my custom login module with the standalone custom registry.

    >
    > Jaas login modules run on the server, not the client. And I still don't
    > understand why you need one. If you configure WAS to use your custom
    > user registry, it will authenticate against it without the need to write
    > any specific custom login modules. If you have other requirements you
    > need to explain them more clearly.


    Hi,
    How to configure WAS to use custom registry. Here is my code for
    jaas client without using custom login module.

    Hashtable env = new Hashtable();


    env.put(Context.INITIAL_CONTEXT_FACTORY,



    "com.ibm.websphere.naming.WsnInitialContextFactory");


    env.put(Context.PROVIDER_URL,


    "corbaloc:iiop:localhost:2810");


    final Context initialContext = new
    InitialContext(env);


    initialContext.lookup("");


    String username = "user1";


    String password =
    "user1";


    try{


    loginContext = new
    LoginContext("WSLogin", new WSCallbackHandlerImplusername,password));


    }catch(LoginException le) {


    System.err.println("LoginContext
    cannot be created. "+ le.getMessage());


    System.exit(-1);


    } catch(SecurityException se) {


    System.err.println("LoginContext
    cannot be created. "+ se.getMessage());


    }


    System.out.println("Trying to Login Now");


    if (loginContext!=null) {


    try{


    loginContext.login();


    }catch(LoginException le) {



    System.out.println("Authentication failed. " + le.getMessage());


    System.exit(-1);


    }


    }

    Is this code sufficient to authenticate using standalone custom
    registry. What additional configuration do i need to do.





+ Reply to Thread