Configuring Realm support

I wanted to learn how to use the realm support but i do have only one LDAP server, so i decided that i will create two realms first realm will have all the users from my LDAP other realm would have all users from my file based repository and my default realm has users from both LDAP and file based repository.

Important NOteEnsure that the distinguished names and the logon attributes are unique among the different LDAP servers that you configure to use same LDAP server

I followed these steps to try the realm support

  • First i configured my Portal to Add LDAP user registry in my federated user repository. By default portal is configured to use federated user repository

  • Now log into the WebSphere Application Server and take a look at the configuration of defaultWIMFileBasedRealm. As you can see it is configured to use both file InternalFileRepository as well adminldap repository.

  • Now lets configure ldap user based repository. In order to do that create file like this


    In this file value of realmName is the name that you want to give to this realm and value of addBaseEntry is one that you see as value of Base Entry for that repository in the WAS Admin Console

  • Now execute this configuration task to create ldap realm

    ./ wp-create-realm -DWasPassword=wasadmin -DparentProperties=/software/WebSphere/wp_profile/ConfigEngine/config/helpers/

  • Once the build is successful restart the WebSphere_Portal server

  • Now next step is to configure base for users and accounts for this realm. Create file like this


    If your not sure about what these values should be you can look for them in WAS Admin Console

  • Now execute following configuration task

    ./ wp-modify-realm-defaultparents -DWasPassword=wasadmin -DparentProperties=/software/WebSphere/wp_profile/ConfigEngine/config/helpers/

  • Restart the WebSphere_Portal server for your changes to take effect

  • At this point my ldap realm is ready so i will create a new LDAP vritual portal that will only allow users from LDAP server to login. Go to Manage Virtual Portal and create LDAP Virtual portal like this

Now go to http://localhost:10040/wps/portal/ldap and you should be able to login with user configured in LDAP but not with users from filesystemrepository.

You can follow same steps to create fileSystembase reposority

No comments: