How do I get basic authentication working on WebSphere?

前端 未结 2 757
栀梦
栀梦 2021-02-10 06:36

Okay, so I\'ve been running a Java/Jersey webservice on Tomcat with basic authentication which works perfectly fine. I\'ve got permissions set up in the web.xml file of my proje

2条回答
  •  庸人自扰
    2021-02-10 07:07

    After writing all this below I remember I have blogged about this for myself here:

    WebSphere 6.1 and Application Authentication

    As I understand you have setup your web.xml correctly thus:

         
        myrole
      
    
      
        
          mySec
          /yourUrl
          DELETE
          GET
          POST
          PUT
          HEAD
          TRACE
          OPTIONS
        
        
          myrole
        
        
          SSL or MSSL not required
          NONE
        
      
    
      
        BASIC
        my login
      
    

    This is if you are using the administration console you dont state that you are not so go to the console:

    http://localhost:9060/ibm/console
    

    Then login (if you have administrative security setup)

    Then go here

    1. left hand panel click Security
    2. Secure administration, applications, and infrastructure
    3. There is then a section on the page Application security
    4. Check the box Enable application security
    5. click apply, then save to master config.

    Then you have application security turned on. Now you need to map the users of your application to users within websphere.

    Go here

    1. List item
    2. Applications > Enterprise Applications
    3. Click your application
    4. Under the Detailed Properties section you will see a link Security role to user/group mapping
      you will only see this link if your web.xml is setup correctly
    5. click the Security role to user/group mapping
    6. Select the roles you wish to use for authentication
    7. Click look up users or look up groups
    8. click search and select users (that are setup in your websphere under Users and Groups menu
    9. use the arrows to move the selected users/groups to the right hand box
    10. click ok and save to master configuration.
    11. restart your server.

    Administration security (security of Websphere itself) must be turned on for it to work.

    WebSphere can be complex but it is powerful and capable.

提交回复
热议问题