403- Forbidden BASIC AUTHENTICATION with WebLogic

72 Views Asked by At

I'm having trouble configuring BASIC AUTHENTICATION with WebLogic Server Version: 12.2.1.3.0, specifically encountering a 403 Forbidden error. I would like to understand where the issue lies. Let me briefly explain what I have done:

I started by creating the user "user" in the "Users and Groups" section under the "Users" tab.

User tab User

enter image description here

User group enter image description here

Then, I created a group called "usergroup" in the "Groups" tab.
enter image description here After that, in the "Roles and Policies >> Realm Roles" section, I added the role condition for the consumer as "group: usergroup".

Roles enter image description here web.xml:

 <security-constraint>
       <web-resource-collection>
          <web-resource-name>webservice</web-resource-name>
          <url-pattern>/service/test</url-pattern>
          <http-method>GET</http-method>
       </web-resource-collection>
 
       <auth-constraint>
          <role-name>consumer</role-name>
       </auth-constraint>
   </security-constraint>
 
   <login-config>
      <auth-method>BASIC</auth-method>
      <realm-name>default</realm-name>
   </login-config>
   <security-role>
      <role-name>consumer</role-name>
   </security-role>

weblogic.xml:

   <security-role-assignment>
      <role-name>consumer</role-name>
      <principal-name>usergroup</principal-name>
   </security-role-assignment>
0

There are 0 best solutions below