Akhil Nambiar
Akhil Nambiar

Reputation: 325

JBoss to WebSphere 8.5 migration error

I am migrating one of my old application from JBoss to WebSphere 8.5.

As I have given the job of migrating from one server, I don't know the exact working of the application. Also, in JBoss, they have used a file, login-config.xml which has various values of realms. I was told to recreate the realm in WAS 8.5. I have no idea how to proceed with this in WAS 8.5

This is the login-config.xml file which was used in JBoss server

<application-policy name="glsa-realm">
        <authentication>
            <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
                <module-option name="unauthenticatedIdentity">guest</module-option>
                <module-option name="dsJndiName">java:/ABCDS4x</module-option>
                <module-option name="principalsQuery">select password from USERS where username=?</module-option>
                <module-option name="rolesQuery">select roles, roleGroup from ROLES where username=?</module-option>
                <module-option name="hashAlgorithm">SHA-1</module-option>
                <module-option name="hashEncoding">base64</module-option>
                <module-option name="hashCharset">UTF-8</module-option>
            </login-module>
        </authentication>
    </application-policy>

How do I recreate the same file using IBM WAS 8.5? Does IBM WAS have any settings to include these realm settings?

Also, I found the basic realm settings, but it doesn't support any option for running any sql query.

Upvotes: 2

Views: 310

Answers (1)

Gas
Gas

Reputation: 18050

WebSphere doesn't have exactly the same database realm. So you will have to make some changes here.

You have several choices:
1) Use database realm provided by WebSphere.
You can add database repository to the WebSphere federated repository. This is not available via admin console, but can be set up via wsadmin tasks. The little drawback here is that it is using proprietary schema, so you will need to migrate your users and groups/roles to that schema afterwards. Benefit is that you will be able to manage your users/groups via admin console later on.

See Expand your user registry options with a federated repository article for detailed description how to setup DB repository.

2) Write custom UserRegistry/Custom adapter.
You can create custom user registry that will access your database and query for users and groups.
The custom registry can either be standalone - see Developing the UserRegistry interface for using custom registries, integrated into federated via bridge - User registry bridge for federated repositories, or provided as custom adapter - Sample custom adapters for federated repositories .

Main benefit is that you can use your existing database, drawback is that you will have to develop and test quite a lot of new code.

3) Other solutions like using TAI (Trust association interceptor), custom LoginModule or JASPIC.
These, again, are complex solutions that would require developing lot of new code and quite complex setup.

Upvotes: 1

Related Questions