Map resources to security domains using scripting


 

+

Search Tips   |   Advanced Search

 

After creating a security domain, or copying an existing security domain, we can map management resources to the security domain at the server, cell, and cluster level.

Launch wsadmin using Jython and run..

### View a list of security domains in the configuration.

print AdminTask.listSecurityDomains('-listDescription true')

### Example output...
###
###     {{name myDomain}
###     {description {security domain for admin applications}}}
###     {{name domain2}
###     {description {new domain for cell123}}}


### Assign a management resource to the security domain.
###
### use the following Jython command to secure all applications on the server1 cell
### with the security attributes in the domain2 security domain:

AdminTask.mapResourceToSecurityDomain('-securityDomainName domain2 -resourceName Cell=myCell:Node=myNode:Server=server1')


### Save the configuration changes.

AdminConfig.save()

 

Results

Your security domain is updated in the configuration. All applications in the specified resource use the security attributes specified by the security domain. If the security domain does not contain all security attributes, then the missing attributes are obtained from the global security configuration.

 

What to do next

Restart each resource that you assigned to a security domain.

 

Related tasks


Set security domains using scripting
Manage servers and nodes with scripting