Search code examples
securityauthenticationwebsphererole

Security role to user/group mapping in WebSphere 7 with file-based user registry


I am trying to make a form-based authentication. I configured my deployment descriptor correctly, did all the actions listed in IBM Infocenter related to "enabling user authentication using file-based registry only", mapped my users to appropriate roles, clicked OK, tested and it worked. But when I moved on to something else in the administrative console, I realised that there are no "OK", "Save" or "Apply" buttons in "Security role to user/group mapping", thus all my changes can take action only while I stay on that page, and as soon as I click a link in the console all the changes are instantly reset. I think it might be a bug in the console. Is there a solution to it? Perhaps a way to directly edit an xml file with these properties?

Thanks in advance.


Solution

  • Okay, so apparently WAS7 has this bug where you can't save the stated configuration. I somehow managed to find a solution for my own question, and here it is: I created a file named ibm-application-bnd.xml in META-INF folder of my EAR which has a structure like this:

    <?xml version="1.0" encoding="UTF-8"?>    
    <application-bnd
        xmlns="http://websphere.ibm.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee
             http://websphere.ibm.com/xml/ns/javaee/ibm-application-bnd_1_0.xsd"
       version="1.0">
    
        <security-role name="operator">
            <user name="admin" />
            <group name="operator" />
        </security-role>
    </application-bnd>
    

    Seems to work alright.