|
Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services 11g Release 1 (11.1.1) E14650-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.jps.runtime.AppSecurityContext
public abstract class AppSecurityContext
This class defines application security context with application security attributes for OPSS policy providers and other security services. Examples of security attributes include application ID and identity context. Policy providers use application ID in application security context to make authorization decisions and perform application policy provisioning tasks. Applications and components can retrieve identity context from application security context to access identity claims.
This class provides a thread-scoped API for accessing application security attributes. The thread scoped API uses a threadlocal variable of an AppSecurityContext instance to encapsulate the application security attributes, e.g. application ID and identity context ID.
AppSecurityContext
supports two modes in setting and getting application ID, the new "AppSecurityContext" mode and "PolicyContext" mode. The "PolicyContext" mode provides backward-compatibility in setting and getting context ID with JACC PolicyContext
, the "AppSecurityContext" mode creates a new thread-scoped variable to store application ID. This class checks system property "oracle.security.jps.appsecuritycontext.appsecuritycontextmode" to decide which mode to use for setting and getting application ID. If this system property is not set or set to false, "PolicyContext" mode is enabled. Otherwise, "AppSecurityContext" mode is enabled.
When calling AppSecurityContext.setApplicationID
method, it requires callers to have codebase permission grant of JpsPermission("AppSecurityContext.setApplicationID.<app ID>").
Method Summary | |
---|---|
static java.lang.String |
getApplicationID() Gets application ID from thread-scoped variables. |
abstract java.lang.Object |
getAttribute(java.lang.String attributeName) Gets the security attribute object given its name. |
static AppSecurityContext |
getSecurityContext() Gets the instance of AppSecurityContext . |
static oracle.security.opss.service.ServiceContext |
getTenantContext() Gets the current tenant context. |
static oracle.security.opss.runtime.UserSecurityContext |
getUserSecurityContext() Gets the current user security context. |
static void |
setApplicationID(java.lang.String applicationID) Sets application ID in thread-scoped variables. |
static void |
setAppSecCtxtMode(boolean appSecCtxtMode) Sets the application security context mode to enable or disable "AppSecurityContext" mode. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void setAppSecCtxtMode(boolean appSecCtxtMode)
appSecCtxtMode
- set to true to enable "AppSecurityContext" mode, false to disable this modepublic static void setApplicationID(java.lang.String applicationID)
It requires callers to have codebase permission grant of JpsPermission("AppSecurityContext.setApplicationID.<app ID>") to invoke this method.
When PolicyContext mode is true and security manager is turned on, PolicyContext
requires callers to have permission grant of SecurityPermission("setPolicy").
applicationID
-public static java.lang.String getApplicationID()
When PolicyContext mode is true and security manager is set, PolicyContext
requires callers to have permission grant of SecurityPermission("getPolicy").
public static AppSecurityContext getSecurityContext()
AppSecurityContext
.AppSecurityContext
public static oracle.security.opss.service.ServiceContext getTenantContext() throws JpsException
JpsException
- when fail to create tenant context.public static oracle.security.opss.runtime.UserSecurityContext getUserSecurityContext()
UserSecurityContext
.public abstract java.lang.Object getAttribute(java.lang.String attributeName)
attributeName
- the security attribute name
|
Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services 11g Release 1 (11.1.1) E14650-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |