Using SCA authorization and security identity policies

Use two Service Component Architecture (SCA) declarative policies (authorization and security identity) to protect SCA components and operations and to declare the security identity under which the SCA components or operations are executed.

Before you begin

A user registry must be configured and an SCA component must first have been developed. You must also enable application security.

About this task

Note: An authorization policy controls who can access protected SCA components and operations. A security identity policy declares the security identity under which an SCA component or operation is executed. You can limit access to an SCA component or to an operation to particular users or groups. You can also delegate access to another user when executing an SCA component or an operation.

Note the following limitations:

Access to an SCA component is permitted or denied by using the following steps:

Procedure

  1. The policy administrator creates one or more policy sets in the file named definitions.xml as shown in the following example:
    <definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
      targetNamespace="http://smallvilleBank"
      xmlns:sca="http://www.osoa.org/xmlns/sca/1.0">
      <policySet name="StaffAuthorizationPolicy"
     	appliesTo="sca:implementation.java"
     	xmlns="http://www.osoa.org/xmlns/sca/1.0">
        <authorization>
          <allow roles="staff"/>
        </authorization>
      </policySet>
      <policySet name="SupervisorAuthorizationPolicy"
     	appliesTo="sca:implementation.java"
     	xmlns="http://www.osoa.org/xmlns/sca/1.0">
        <authorization>
          <allow roles="supervisor manager specialist"/>
        </authorization>
        <securityIdentity>
          <runAs role="specialist"/>
        </securityIdentity>
     </policySet>
    </definitions>
  2. The assembler attaches the policy to the SCA composite as in the following example:
    <?xml version="1.0" encoding="UTF-8"?>
    <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
      xmlns:bank="http://smallvilleBank"
      name="AccountServices">
      <component name="AccountAccess">
            <implementation.java class="smallvilleBank.AccountAccessImpl"
                 policySets="bank:staffAuthorizationPolicy"/>
      </component>
      <component name="AccountAudit">
            <implementation.java class="smallvilleBank.AccountAuditImpl"
                 policySets="bank:supervisorAuthorizationPolicy"/>
      </component>
    </composite>
  3. The deployer assigns users and or groups to the roles that are defined in the composite.
  4. The deployer assigns a user to the runAs roles that are defined in the composite.

What to do next

Access to the SCA component is permitted or denied according to the authorization policy.




In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms of Use | Feedback

Last updatedLast updated: Sep 19, 2011 6:15:55 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-express-dist&topic=tsec_authsoa_policy
File name: tsec_authsoa_policy.html