Search This Blog

Monday, January 25, 2016

Multitenancy in WebLogic 12c Part -5: Identity Domain (IDD) for Partition

Welcome back to the series of Multitenancy experiments on partitioned domain.


Resource groups in WebLogic Multitenancy Domain partition
Prerequsites
  1. Configure Security Realm
  2. Create Users & Groups for Partition domain
  3. Configure Virtual Target
  4. Creating Partition Domain
  5. Configure IDD for Partition
  6. Partition Control (start/stop using WLST)


def add_IDD4_Partition(realmName, partitionName, primary_IDD ): 
 """
 This function is developed for generic  use to adding Identity domain 
 to a partition domain.
 """
 sec = cmo.getSecurityConfiguration()
 sec.setAdministrativeIdentityDomain("AdminIDD")
 
 realm = cmo.getSecurityConfiguration().lookupRealm(realmName)
 
 # Authentication 
 defAtnP = realm.lookupAuthenticationProvider('ATNPartition')
 defAtnP.setIdentityDomain(primary_IDD)
 defAtnA = realm.lookupAuthenticationProvider('ATNAdmin')
 defAtnA.setIdentityDomain("AdminIDD")
 
 # Search for the Partition and set it as primary IDD
 p= cmo.lookupPartition(partitionName)
 p.setPrimaryIdentityDomain(primary_IDD)
 
 # For Default realm setting the IDD
 realm = sec.getDefaultRealm()
 defAtn = realm.lookupAuthenticationProvider('DefaultAuthenticator')
 defAtn.setIdentityDomain("AdminIDD")
 
 
def main():
 connect("weblogic","welcome1","t3://192.168.33.100:6100")
 edit()
 startEdit()
 
 add_IDD4_Partition('Corporate_Realm', "Corporate_partition", "Corporate_IDD" )
 add_IDD4_Partition('Online_Realm', "Online_partition", "Online_IDD" )
 
 save()
 activate()
 disconnect()
 
main()



Lets run the script that will add the Identity Domain for each partition.

WebLogic Multitenancy Partition domain with Security Realm
Select the Corporate Realm in the Security


Now select one of the security realm which you have created for the partition.




No comments:

Facebook Blogger Plugin: By RNHckr.com

Post a Comment

Please write your comment here

Popular Posts