Using LDAP on iSeries to authenticate a user

Posted on 2008-11-17
Last Modified: 2013-12-19

We have a web application on Websphere 6.1 (running on a RedHat server), we wish to process the logon to the server initially using LDAP against an iSeries account, then once authenticated and session established on Websphere server - we use webservices (RPG programs using HTTP CGI) that require a login in the HTTP header to run.

I need to know if I can process a "user and password are valid" operation through LDAP, i have always used the AS400Connection java objects from IBM to check users and passwords before.

The IBM documentation regarding HTTP servers running LDAP appear to indicate a usage more suited to an address book or information lookup rather than as a loging checking mechanism.

Can anyone tell me what i need to do with LDAP to allow us to process log on authentication?

Many thanks
Question by:ProgrammingSmurf
    LVL 34

    Expert Comment

    by:Gary Patterson
    Assuming AS/400 LDAP is configured in it's default configuration, if all you want to do is verify that an AS/400 user id / password pair is valid via LDAP, just bind using a projected user and the correct password:


    Basic sample Java code:

    Unless you use SSL, this information flows in the clear.  

    This also doesn't help you much if you have multiple applications, and you need to provide selective access to these applications to a group of users, or if you want to provide various application-level rights to users (view versus update).

    The WAS 6.1 Security Redbook explains web application security (including LDAP) in detail:

    - Gary Patterson
    LVL 1

    Author Comment


    I am sorry for the late reply ...

    When you say LDAP running in dft config - i can see the Directory server running which has (LDAP) in the text ... is this the same thing?

    Thank you for your help.
    LVL 34

    Accepted Solution

    Default configuration means the AS/400 LDAP server is started with it's default configuration as shipped from IBM.  Variations to default configuration can change behaviour.  If the code doesn't work, check with whoever configured your LDAP server and determine if LDAP config changes were made that interfere.

    - Gary Patterson

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
    Creating and Managing Databases with phpMyAdmin in cPanel.
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now