Search code examples
javasecurityweblogicoracle-adfjdeveloper

How to link my WebLogic users in my ADF application


I tried to solve this problem by myself before coming here. I'll try to explain the problem clearly. I have a WebLogic server with my user list and my groups. I have also an ADF application secured with "ADF Authentication and Authorization". I try to assign rights to my WebLogic users from JDeveloper.

I have tried to create an entreprise role in my application with the same name of one of my weblogics groups. And I gave the good rights to this group, but i still cannot access to the page.

I think that users or groups i manage in my application are not linked with the weblogic users. The Realm used in my application is "jazn.com", I think that I must change that, but how ?

thanks


Solution

  • I think you can link your users in this way:

    a) You have this tag in your web.xml file:

    <"security-role>
    <"description>Role Description <"/description>
    <"role-name>my_role<"/role-name>
    <"/security-role>

    b) You need to create a weblogic.xml file inside WEB-INF folder, with the following content:

    <"?xml version = '1.0' encoding = 'windows-1252'?>
    <"weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd" xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
    <"security-role-assignment>
    <"role-name>my_role<"/role-name>
    <"principal-name>group_name<"/principal-name>
    <"/security-role-assignment>
    <"/weblogic-web-app>

    Here is where you specify that the role that you set in your jazn-data.xml file will be assigned to the users in the group that you specify in the principal-name tag. This is linked with your default realm, I think you can add other tag specifying the realm if you need a different realm.

    Note: I added a lot of quotes after "<" because I don't know how to show xml code. Erase those quotes after copying it