I am trying to automate the following steps i do through WLS Console :
a. In the Weblogic console's Home page, click on Deployments link form left, find "gateway-management-service"
b. Expand, "gateway-management-service" and click on "GatewayManagementService" ( this is a webservice module )
c. Click on Security tab then the Roles tab.
d. Click "New" in "Web Service Module Scoped Roles" section.
e. In the new windows, set the name as "Special WS Role Enforcement" and click OK.
f. click on the link "Special WS Role Enforcement".
g. In the new page, Click on "Add Conditions" and select "User" in the new page and click Next.
h. In the new page, enter "CSR.gatewaywsuser" in the "User Argument Name", then click "ADD"
i. Click on Finish.
i have test.py as:
connect('weblogic', 'welcome123', 'localhost:7001');
xacmlatz = realm.lookupAuthorizer('XACMLAuthorizer');
xacmlrm = realm.lookupRoleMapper('XACMLRoleMapper');
resourceId = 'type=<webservices>, application=gateway-management-service, contextPath=gwy_management_service, webService=GatewayOidManagerService'
xacmlatz.createPolicy(resourceId, "Rol(Special WS Role Enforcement )");
xacmlrm.createRole(resourceId, "Special WS Role Enforcement ", "Usr(CSR.obigatewaywsuser )")
I run this script like :
My problem : after executing the above script, when i go to Console -> Deployments -> gateway-management-service -> GatewayManagementService -> Security Tab -> Roles subtab, i don't see the Role. If try to run the script again it will fail with an weblogic.management.utils.AlreadyExistsException: [Security:090320]Failed to create role
What am i doing wrong?
I have tried bouncing both my managed and Admin server after running the test.py to see if that helps, but no success.
Edited by: codrguy on May 9, 2013 10:27 AM
Edited by: codrguy on May 9, 2013 10:38 AM