Quality of service –Implementation policy
IBM WebSphere Application Server V7 Feature Pack for Service Component Architecture Quality of service –Implementation policy
This presentation covers the implementation policy of a service for the SCA feature pack.
Implementation security policy
Implementation security policy Implementation security policy is defined in SCA policy sets (these are different than web services policy sets) Two types of implementation security policy Authorization controls who can access the protected SCA resources Security identity declares the security identity under which an operation is executed Policy assertions include
, , Example policy assertion
Two policy assertions are defined which apply to implementations – Authorization and Security Identity. Authorization controls who can access the protected SCA resources. A security role is an abstract concept that represents a set of access control constraints on SCA resources such as composites, components, and operations. The approach and scope of the mapping of role names to security principals is SCA runtime implementation dependent. Scope implies the set of artifacts contained by some higher-level artifact, so that a composite contains components, a component contains services and references, services and references contain an interface, and an interface contains operations. Security Identity declares the security identity under which an operation is executed. Both are represented as policy assertions that are used within policySets created for implementations (like implementation policies). In the example shown here, the policy assertion is “allow”. When the element is included in a policySet used on a component, that component can only be accessed by principal. The principal role corresponds to one of the role names listed in the @roles attribute. How role names are mapped to security principals is implementation dependent, because SCA does not define this.
Implementation policy example
Implementation policy example policySet definition Composite that contains AccountServiceComponent
Shown here is an example implementation, written in Java, The AccountService implements the AccountService interface, which is defined through a Java interface. Notice the policySets and policySet definition. The composite that contains an AccountServiceComponent should be accessible by anyone with the “customer” role.
Authorization policy
Authorization policy Controls who can access protected SCA components Uses a role-based permission model similar to JEE SCA policy sets are created that grant permission to invoke components to one or more roles Users or groups are assigned to the roles * Note: Operation level policy is performed using annotations
Authorization policy controls who can access protected SCA components and operations and applies to implementations. Authorization controls who can access the protected SCA resources. A security role is an abstract concept that represents a set of access control constraints on SCA resources such as composites, components, and operations. The approach and scope of the mapping of role names to security principals is SCA runtime implementation dependent. Security Identity policy declares the security identity under which an SCA component or operation is executed, allowing you to limit access to an SCA component or operation to particular users or groups, and to delegate to another user when executing an SCA component or operation. Note: Operation level policy is performed using annotations. Policy set attachments to operations are not permitted in the composite file.
Authorization policy task flow
Authorization policy task flow Section
This section describes the steps necessary to set up authorization policy
Authorization policy: Step 1 (Definitions.xml)
Authorization policy: Step 1 (Definitions.xml)
Step 1: First, the policy administrator creates one or more policy sets in the file named definitions.xml as shown in this example. This file is normally packaged at the root of META-INF directory of the jar. Notice the policySet names, user roles and runAs roles.
Definitions.xml
Definitions.xml Definitions.xml X
This graphic shows you exactly where the Definitions.xml file is located in your SCA jar file. The definitions.xml file can be at any location in the jar; it does not have to be under META-INF.
Authorization policy: Step 2 (SCA composite)
Authorization policy: Step 2 (SCA composite)
Step 2: Next, the assembler attaches the policy set to the SCA composite as in the example shown to protect each component. Attaching no policy set will result in access to all users. The policySets names specified are the same names that you saw in the definitions.xml file.
Authorization policy: Step 3 (roles)
Authorization policy: Step 3 (roles) Deployer assigns users/groups roles defined in the policy sets WebSphere Application Server version 7 WebSphere application server version 7 SCA Feature Pack SCA Composite Application (JAXB Databinding) User assigned roles WebSphere Application Server version 7 Admin console/wsadmin Deployer assigns roles
Step 3: Next, the deployer assigns users and or groups to the roles that are defined in the policy sets referenced in the composite file. This is done when creating a new business level application and can be done through scripting or using the administrative console. This is very similar to the role mapping that is done for JEE applications.
Map security roles to users
Map security roles to users
This is the screen you use to work with roles through the administrative console when creating a business level application.
Map users to the roles
Map users to the roles
The next step is to search for users and groups to add them to the selected roles.
Authorization policy: Step 4 (runAs roles)
Authorization policy: Step 4 (runAs roles)
Step 4:Next, the deployer assigns a runAs role to users as defined in the policy sets referenced in the composite file.
Authorization policy summary
Authorization policy summary PolicySet Java Implementation classes Composite file specify policySet Jar Implementation classes Composite Definitions.xml Definitions.xml 1 2 3 4 Admin console Assign users/groups roles Assign users to the runAs roles 5 6 Deploy to the administrative console
In summary, here are the steps necessary to set up an authorization policy. 1) Create a PolicySet - defined in the definitions.xml. 2) Create implementation classes and compile - Policy can be annotated also 3) Create a composite file specifying the policySet to declare the SCA composite 4) Create a jar file containing the implementation classes, the composite file and possibly the contribution file and definitions.xml. 5) Deploy the jar file into the administrative console as an asset that can be added to a business level application. 5b) During deployment of the jar assign users/groups to the roles defined in the composite file. 6) Assign users to the runAs role defined in the composite. 7) You are now ready to start your application Administrative and application security must be enabled at the beginning before deploying the application.
Authorization policy: Limitations
Authorization policy: Limitations SCA authorization policy is not supported for composites packaged in a WAR The definitions.xml file must be packaged in the same asset as the composites that reference its policy sets Role assignments are scoped to a configuration unit If authorization policy is not attached to a given component and operation, the operation runs unprotected The role names specified on @RolesAllowed and @RunAs annotations are actual role names The schema prevents the use of conflicting elements (example: and ) within the same policy set
SCA authorization policy is only supported for composites packaged in a .WAR file. The definitions.xml file must be packaged in the same asset as the composites that reference its policy sets. That is, it is not supported to package the policy sets separately from the composites. Role assignments are scoped to a configuration unit. Role assignments are required for all roles used in all composites within the configuration unit. These role assignments are completely independent of any role assignments made for other configuration units in the same business level application. If an authorization policy is not attached to a given component and operation, the operation runs unprotected. The authorization policy does not have the option to run as system identity. The role names specified on @RolesAllowed and @RunAs annotations are actual role names. There is no "role reference" capability to map roles used within code to actual roles as there is in EJB. The schema prevents the use of conflicting elements (example. and ) within the same policy set. However it is possible to create conflicts by specifying multiple policy sets in the @policySets attribute or by inheriting policy sets across elements. In this case, these rules are used: takes precedence over , which takes precedence over . Roles from multiple elements and from @RolesAllowed annotations are aggregated. Note: Operation level policy is performed using annotations. Policy set attachments to operations are not permitted in the composite file.
Summary
Summary Two types of implementation security policy: authorization and security identity. Used to protect SCA and to declare Run-as credentials You can limit or delegate access to components Mapping users or groups to a role authorizes access to applications by role Users, groups, and roles defined when application is installed or configured
There are two types of implementation security policies, authorization and security identity. Authorization controls who can access the protected SCA resources. Security identity declares the security identity under which an operation is run. Both of these types are used to protect SCA components and operations and to declare the security identity under which the SCA components or operations run. 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. Different roles can have different security authorizations. Mapping users or groups to a role authorizes those users or groups to access applications defined by the role. Users, groups, and roles are defined when an application is installed or configured. The next several slides are an appendix that contain lists of supported intents and a list of old and new names for intents.
Appendix
Appendix Section
This next section will show the appendix.
Intents supported by each binding (1 of 3)
Intents supported by each binding (1 of 3) Intent binding.ws binding.ejb binding.sca authentication.message Requires the attachment of a WebSphere policy set and policy binding that contains the WSSecurity policy type Not supported; CSIv2 can be configured to use basic auth and security token (LTPA, Kerberos) confidentiality.message integrity.message Requires the attachment of a WebSphere policy set and policy binding that contains the Security policy type Not supported
Intents supported by each binding.
Intents supported by each binding (2 of 3)
Intents supported by each binding (2 of 3) Intent binding.ws binding.ejb binding.sca authentication.transport Basic auth only. Reference requires the attachment of a WebSphere policy set that contains the HTTPTransport policy type. Service does not require any attachments. Intent is not supported. CSIv2 can be configured to use client certificates for authentication. confidentiality.transport integrity.transport Requires the attachment of a WebSphere policy set that contains the SSLTransport policy type Intent is not supported. CSIv2 can be configured to require SSL.
No notes to accompany slide.
Intents supported by each binding (3 of 3)
Intents supported by each binding (3 of 3) Intent binding.ws propagatesTransaction Requires the attachment of a web services policy set that contains the WSTransaction policy type
No notes to accompany slide.
Old and new intent names
Old and new intent names SOA feature pack for WebSphere 6.1 SCA feature pack for WebSphere 7.0 managedTransaction.global (default) managedTransaction.global (default) managedTransaction.local managedTransaction.local managedTransaction.none noManagedTransaction managedTransaction.any No equivalent intent propagatesTransaction.true (default) propagatesTransaction propagatesTransaction.false suspendsTransaction (default)
The SOA feature pack for WebSphere 6.1 used different names for some of the transactional intents and different default intents. This table shows the old and new intent names and the default intents.
References
References SCA specifications http://www.osoa.org/display/Main/Service+Component+Architecture+Specifications SCA policy framework http://www.osoa.org/download/attachments/35/SCA_Policy_Framework_V100.pdf?version=1
This slide contains links of references.
Feedback
Feedback Your feedback is valuable You can help improve the quality of IBM Education Assistant content to better meet your needs by providing feedback. Did you find this module useful? Did it help you solve a problem or answer a question? Do you have suggestions for improvements? Click to send email feedback: mailto:iea@us.ibm.com?subject=Feedback_about_WASv7SCA_QOS_ImplementationPolicy.ppt This module is also available in PDF format at: ../WASv7SCA_QOS_ImplementationPolicy.pdf
You can help improve the quality of IBM Education Assistant content by providing feedback.
Trademarks