Tuesday, 23 June 2015

OBIEE 11g: Create Users/Groups/Application Roles Using WLST Script



If AD is not integrated generally we create users manually and assign them to groups, application roles as per the security. Let’s try to create users using Weblogic scripts (WLS) instead of manual intervention.

1.      Navigate to below mention path:

$Oracle_BI1/common/bin

2.      Start up the Weblogic scripts(WLS) using the below command:


./wlst.sh

3.      Connect to weblogic server.

connect(“weblogic”,”Password″,”localhost:7001″)

4.      Get the DefaultAuthenticatorMBean using the following command

atnr=cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvider(“DefaultAuthenticator”)
5.      To create a new user.

atnr.createUser(‘sudipta’,’sudipta123’,’User Description’)

6.      To create a new group.

atnr.createGroup(‘SudiptaGroup’,’Group Description’)

7.      To assign user to group.

atnr.addMemberToGroup(group,user)

8.      To create a new Application Role.

createAppRole(“obi”,”SudiptaAppRole”)

9.      To assign user/group/application role to Application Role.

9.1  To assign user to Application Role

grantAppRole(“obi”,”sudipta”,”weblogic.security.principal.WLSUserImpl”,”Sudipta AppRole”)
9.2  To assign group to Application Role

grantAppRole(“obi”,”Sudipta Group”,”weblogic.security.principal.WLSGroupImpl”,”Sudipta AppRole”)

9.3  To assign Application Role to Application Role

grantAppRole(“obi”,”Sudipta AppRole”,”oracle.security.jps.service.policystore.ApplicationRole”,”Sudipta AppRole”)

10.  To list out the members of Application role.

listAppRoleMembers(“obi”,”Sudipta AppRole”)



Now once we will login to Weblogic Console& EM  page, we can see the user /group/application role are available.

Enjoy and stay well !! :)


No comments:

Post a Comment

Power BI: Show Last Data Refresh on Dashboard

 To show last data refresh on Power BI report follow the below steps. 1. Open Report Query Editor Mode. 2. Clink on Get Data -> Blank...