The Role Mapping Process

Role Mapping Providers 9-3 The computed security role is able to access a number of pieces of information that make up the context of the request, including the identity of the target if available and the parameter values of the request. The context information is typically used as values of parameters in an expression that is evaluated by the WebLogic Security Framework. This functionality is also responsible for computing security roles that were statically defined through a deployment descriptor or through the WebLogic Server Administration Console.

9.2 The Role Mapping Process

The WebLogic Security Framework calls each Role Mapping provider that is configured for a security realm as part of an authorization decision. For related information, see Section 7.2, The Authorization Process. The result of the dynamic security role computation performed by the Role Mapping providers is a set of security roles that apply to the principals stored in a subject at a given moment. These security roles can then be used to make authorization decisions for protected WebLogic resources, as well as for resource container and application code. For example, an Enterprise JavaBean EJB could use the Java EE isCallerInRole method to retrieve fields from a record in a database, without having knowledge of the business policies that determine whether access is allowed. Figure 9–1 shows how the Role Mapping providers interact with the WebLogic Security Framework to create dynamic security role computations, and an explanation follows. Figure 9–1 Role Mapping Providers and the Role Mapping Process Note: The computation of security roles for an authenticated user enhances the Role-Based Access Control RBAC security defined by the Java EE specification. You create dynamic security role computations by defining role statements in the WebLogic Server Administration Console. For more information, see Users, Groups, and Security Roles in Securing Resources Using Roles and Policies for Oracle WebLogic Server. 9-4 Developing Security Providers for Oracle WebLogic Server Generally, role mapping is performed in the following manner: 1. A user or system process requests a WebLogic resource on which it will attempt to perform a given operation. 2. The resource container that handles the type of WebLogic resource being requested receives the request for example, the EJB container receives the request for an EJB resource. 3. The resource container constructs a ContextHandler object that may be used by Role Mapping providers to obtain information associated with the context of the request. The resource container calls the WebLogic Security Framework, passing in the subject which already contains user and group principals, an identifier for the WebLogic resource, and optionally, the ContextHandler object to provide additional input.

4. The WebLogic Security Framework calls each configured Role Mapping provider

to obtain a list of the security roles that apply. This works as follows:

a. The Role Mapping providers use the ContextHandler to request various