Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Platform Security Services
11g Release 1 (11.1.1)

E14650-05


oracle.security.jps.runtime
Interface ActionExecutor


public interface ActionExecutor

An ActionExecutor allows applications to run any application logic within a user's platform security context and JDK AccessControlContext.

An ActionExecutor is only associated with one unique identity.

Applications can implement PrivilegedAction or PrivilegedExceptionAction, and put application logic that needs to be run within a user's security context in its run method, and invoke the ActionExecutor.execute method with PrivilegedAction or PrivilegedExceptionAction as input parameter.

Only the application logic that runs in PrivilegedAction or PrivilegedExceptionAction is associated with the user's platform security context automatically by ActionExecutor, in case of Weblogic server, it's associated with WLS subject by invoking Security.runAs(Subject, PrivilegedAction). As such, application operations required platform security will be handled by the platform security context implicitly, e.g. EJB invocation and secure resource access.

The ActionExecutor execution will also bind the user's subject with JDK AccessControlContext by JDK Subject.doAs(Subject, PrivilegedAction). Application logic in PrivilegedAction can perform the standard JDK permission checks.

The security context, such as AccessControlContext subject or the platform security context subject, will not be altered after invoking ActionExecutor.execute method.

This class also provides an API for establishing OPSS AppSecurityContext with security attributes before executing application logic. The security attributes in the AppSecurityContext will remain unchanged after application logic invocation.


Method Summary
<T> T
execute(java.security.PrivilegedAction<T> action)
          Executes the PrivilegedAction in a user's platform security context and AccessControlContext.
<T> T
execute(java.security.PrivilegedExceptionAction<T> action)
          Executes PrivilegedExceptionAction in a user's platform security context and AccessControlContext.
 void setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
          Sets the security attributes to be used with the OPSS AppSecurityContext that will be established before executing application logic.

 

Method Detail

execute

<T> T execute(java.security.PrivilegedAction<T> action)
Executes the PrivilegedAction in a user's platform security context and AccessControlContext.
Parameters:
action - an instance of PrivilegedAction

execute

<T> T execute(java.security.PrivilegedExceptionAction<T> action)
          throws java.security.PrivilegedActionException
Executes PrivilegedExceptionAction in a user's platform security context and AccessControlContext.
Parameters:
action - an instance of PrivilegedExceptionAction
Throws:
java.security.PrivilegedActionException - if the PrivilegedExceptionAction.run method throws a checked exception

setAttributes

void setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Sets the security attributes to be used with the OPSS AppSecurityContext that will be established before executing application logic.
Parameters:
attributes - the security attributes

Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Platform Security Services
11g Release 1 (11.1.1)

E14650-05


Copyright © 2011, Oracle. All rights reserved.