IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Check password to authenticate user with Java

  • 1.  Check password to authenticate user with Java

    Posted Wed May 04, 2005 03:19 PM

    Hi,

    We are using a Java servlet to inteface with our Tamino Database.
    Now we want to use securityand did set up users, groups and ACL’s and authentication=“Tamino”.

    How can we check a userid and password against the tamino database, to see if the pair is matched with the values set in Tamino.

    I figure we may need to encrypt the password and check it against the encrypted password that is stored in the ino:security collection.

    How can we do this in Java?

    Kees


    #API-Management
    #webMethods-Tamino-XML-Server-APIs
    #webMethods


  • 2.  RE: Check password to authenticate user with Java

    Posted Wed May 04, 2005 03:58 PM

    The connection to the database is created with the unencrypted password:

    
    // Establish the connection to Tamino
    TConnection connection = TConnectionFactory.getInstance().newConnection( DATABASE_URL, USER, PASSWORD );

    If the combination of user/password has insufficient privileges (e.g. because it is unknown), you will get an exception.

    Regards,

    Julius Geppert
    Software AG


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs


  • 3.  RE: Check password to authenticate user with Java

    Posted Wed May 04, 2005 04:45 PM

    Thanks Julius for your response,

    We did try this already, but it doesn’t work in our setup.

    A short technical description:
    You need an accessor after this getInstance().newConnection to check it against a collection. Now if you do this on the collection ino:security and the password validation fails, then the request is handled by the java.net.Authenticator. (We use the authenticator for gaining access with an elevated privilege) .
    In that case the Tamino API apparently falls back by triing authentication on port 80, which, succeeds while it should not.

    So we need another way. Can we encrypt the password ourselves to check it against the stored password?

    Kees


    #API-Management
    #webMethods-Tamino-XML-Server-APIs
    #webMethods