I am trying to port a J2EE application from Tomcat to Websphere and I am not too familiar with Websphere.
The only problem I encountered is authorization (I use basic authentication in my web.xml). In Tomcat, I use the tomcat-users.xml file to determine my users / passwords and what roles they belong to.
How do I make this “simple” in Websphere? When deploying an EAR to Websphere, he also asks me to map my role to web.xml with a user or group.
Do I need to create some kind of sphere? User user registry?
Thank.
UPDATE:
I have set up a standalone custom registry, but I cannot get a login prompt for username / password. It works great on Tomcat, and it doesn't work on Websphere.
Code from web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>basic-auth security</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>HELLO_USER</role-name>
</auth-constraint>
<user-data-constraint>NONE</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<security-role>
<role-name>HELLO_USER</role-name>
</security-role>
source
share