In Oracle Business Intelligence (OBIEE) we can add a user to the specific role by logging to the em and add the user to the specific role in security.
For example: In http://slc03lmn.us.oracle.com:7001/em
In WebLogicDomain -> bifoundation_domain ->Security ->Application Roles Search for OBI roles and add the user to the role.
We do this manually.
I want to automate this from a python script. Explored the Weblogic scripts but could not find a solution. Any inputs will be helpful
You can try with a WLST script using the grantAppRole command like the following:
connect(“weblogic”,”welcome1″,”localhost:7001″)
grantAppRole(“obi”,”ReportWLSTRole”,”oracle.security.jps.service.policystore.ApplicationRole”,”BIAuthor”)
grantAppRole(“obi”,”ReportWLSTRole”,”weblogic.security.principal.WLSUserImpl”,”weblogic”)
grantAppRole(“obi”,”ReportWLSTRole”,”weblogic.security.principal.WLSGroupImpl”,”BIAdministrators”)
This example shows how to assign a group, a user and a role to the "ReportWLSTRole". (Example taken from the RittmanMead blog)
Does it have to be a python script? You can automate this with an init block on the RPD:
Create a table that contains the mapping between users and application roles and then create a row-wise init block for the ROLES variable in the RPD, for example:
select 'ROLES', p.rolename from p roles_table where p.user=':USER'