To modify a component’s security permissions, use the following rhino-console command or related MBean operation.

Note The security permissions for a component may be shared with multiple other components. For example, SBBs in the same jar may share their permissions.

Console command: setsecuritypolicy

Command

setsecuritypolicy (<ComponentID> | <LibraryID> [jarname]) <SecurityPolicy>
  Description
    Sets the current security policy associated with the specified ComponentID.

Example

To set the security permissions for the SIP resource adaptor:

./rhino-console setsecuritypolicy 'ResourceAdaptorID[name=OCSIP,vendor=OpenCloud,version=2.3.1]' 'grant { permission java.net.SocketPermission "*:53", "connect,accept"; };'
Setting security policy for component: ResourceAdaptorID[name=OCSIP,vendor=OpenCloud,version=2.3.1]
Warning The command-line console only supports a single line as an argument. To easily modify multi-line security policies, use the Rhino Element Manager instead.

MBean operation: getSecurityPolicy

MBean

Rhino operation

public void setSecurityPolicy(ComponentID id, String subId, String policyText)
    throws NullPointerException, UnrecognizedComponentException,
           IllegalArgumentException, ManagementException;

This operation sets the security permissions associated with a component.

Previous page Next page
Rhino Version 3.1