BEA Systems, Inc.

WebLogic Server 8.1 API Reference

weblogic.security.spi
Interface DeployableAuthorizationProvider


public interface DeployableAuthorizationProvider
extends AuthorizationProvider

An Authorization provider that supports deploying policies on behalf of Web application and EJB deployment needs to implement this interface.

A policy states which roles are allowed to perform particular actions on a resource (for example, who is allowed to call a particular method on a certain EJB).

When a Web application or EJB is deployed, policies need to be created. Similarly, when the Web application or EJB is re/hot deployed, the policies need to be updated. And, when the Web application or EJB is undeployed, the policies should be removed. This work needs to be done by an Authorization provider.

Not all Authorization providers need to support this interface. However, in a realm, at least one of the Authorization providers must support this interface. Otherwise, it is impossible to deploy Web applications and EJBs. To help with this, there are two MBeans associated with Authorization providers: one for providers who support deployment and one for those that do not support deployment. The one for deployment has an attribute that indicates whether this provider should be used for deployment. This way, when the realm is configured, it is possible to detect illegal configurations (for example, none of the Authorization providers support Web application/EJB deployment).

Author:
Copyright © 2004 BEA Systems, Inc. All Rights Reserved.

Method Summary
 void deployPolicy(Resource resource, java.lang.String[] roleNames)
          Deploys a policy (that is, creates a policy on behalf of a deployed Web application or EJB).
 void undeployPolicy(Resource resource)
          Undeploys a policy (that is, deletes a policy on behalf of an undeployed Web application or EJB).
 
Methods inherited from interface weblogic.security.spi.AuthorizationProvider
getAccessDecision
 
Methods inherited from interface weblogic.security.spi.SecurityProvider
getDescription, initialize, shutdown
 

Method Detail

deployPolicy

public void deployPolicy(Resource resource,
                         java.lang.String[] roleNames)
                  throws ResourceCreationException
Deploys a policy (that is, creates a policy on behalf of a deployed Web application or EJB). If the policy already exists, it is removed and replaced by this policy.

Parameters:
resource - the Resource object to which the policy applies. (For example, for a Web application, the resource is tied to a <web-resource-name> in the web.xml deployment descriptor file, which is specified as the resourceName attribute on the WebResource class.)

roleNames - a String array of roles (within this application) that are in this policy. (For example, for a Web application, the <role-name> from the <auth-constraint> portion of the web.xml deployment descriptor file.)

Throws:
ResourceCreationException - if an unexpected error occurs while deploying the policy for the specified resource.


undeployPolicy

public void undeployPolicy(Resource resource)
                    throws ResourceRemovalException
Undeploys a policy (that is, deletes a policy on behalf of an undeployed Web application or EJB). This method is a no-op if the policy does not exist.

Parameters:
resource - the Resource object to which the policy applies. (For example, for a Web application, the resource is tied to a <web-resource-name> in the web.xml deployment descriptor file, which is specified as the resourceName attribute on the WebResource class.)

Throws:
ResourceRemovalException - if an unexpected error occurs while undeploying the specified resource.


Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs81