|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ALESControl
ALESControl is a public control interface, encapsulates ALES SSM runtime APIs, and provides access to ALES SSM runtime security service in a consistent, straightforward manner. A developer can drag and drop methods from the ALEScontrol onto a WLP page flow or a WLI process in Workshop and use the data returned by a selected method (access decision, roles, etc.) to drive a downstream node in the page flow or process.
Field Summary | |
---|---|
static java.lang.String |
FLUSH_OPT_ATTRCACHE
Options value which indicates that the attribute cache should be flushed. |
static java.lang.String |
FLUSH_OPT_ATZCACHE
Options value which indicates that the authorization cache should be flushed. |
Method Summary | |
---|---|
void |
flushCache(java.lang.String[] options)
Removes all entries from the OOTB attributes cache and flushes its statistics. |
void |
flushCacheByUser(java.lang.String[] options,
java.lang.String userID)
Removes entries for the user, identified by the userID parameter. |
java.util.Collection |
getRoles(java.lang.String resource,
java.lang.String action,
java.util.Map appContext)
Gets all roles for current login user in reference to a resource, action, and application context. |
boolean |
hasRole(java.lang.String resource,
java.lang.String action,
java.util.Map appContext,
java.lang.String role)
Determines if current login user has a specific role in reference to a resource, action, and application context. |
boolean |
isAccessAllowed(java.lang.String resource,
java.lang.String action,
java.util.Map appContext)
Determines if current login user is permitted to access a specific resource with a specific action. |
boolean |
isAccessAllowedWithGrantedresources(java.lang.String resource,
java.lang.String action,
java.util.Map appContext,
java.util.Collection grantedresources)
Determines if current login user is permitted to access a specific resource with a specific action and gets all permitted to access resources from this resource. |
boolean |
isAccessAllowedWithResponseAttribues(java.lang.String resource,
java.lang.String action,
java.util.Map appContext,
java.util.Map responseAttr)
Determines if current login user is permitted to access a specific resource with a specific action and gets response attributes returned by the authorization system. |
void |
recordEvent(java.lang.String message,
java.util.Map appContext,
AuditSeverity severity)
Sends an audit message to the audit service system. |
Field Detail |
---|
static final java.lang.String FLUSH_OPT_ATTRCACHE
flushCache(java.lang.String[])
,
flushCacheByUser(java.lang.String[], java.lang.String)
,
Constant Field Valuesstatic final java.lang.String FLUSH_OPT_ATZCACHE
flushCache(java.lang.String[])
,
flushCacheByUser(java.lang.String[], java.lang.String)
,
Constant Field ValuesMethod Detail |
---|
void flushCache(java.lang.String[] options) throws ALESControlException
options
- The options can be either ALESControl.FLUSH_OPT_ATZCACHE or ALESControl.FLUSH_OPT_ATTRCACHE,
or both of them.
ALESControlException
- This exception is thrown if a parameter passed in contains an invalid option.void flushCacheByUser(java.lang.String[] options, java.lang.String userID) throws ALESControlException
userID
parameter. The options can be either
ALESControl.FLUSH_OPT_ATZCACHE or ALESControl.FLUSH_OPT_ATTRCACHE, or both of them.
options
- The options can be either ALESControl.FLUSH_OPT_ATZCACHE or ALESControl.FLUSH_OPT_ATTRCACHE,
or both of them.userID
- The user whose cache entries are to be reset. Should be a valid name (not NULL and of positive length).
The name should be in the short format and not include directory, i.e. "system" and not "//user/asi/system/"
ALESControlException
- This exception is thrown if a parameter passed in contains an invalid option or the
userID is empty.java.util.Collection getRoles(java.lang.String resource, java.lang.String action, java.util.Map appContext) throws ALESControlException
resource
- a String represents the resource, for example, a resource defined
in ALES is "//app/policy/wls9ssm/ExampleApp_EAR/jpd/ExampleApp_Web/processes.ExampleProcess/performService",
if want know current login user is permitted to perform a action on the resource, string passed as resource
to this method should be "/ExampleApp_EAR/jpd/ExampleApp_Web/processes.ExampleProcess/performService"action
- a String represents the action to be performed on a resource, which should be a defined
privilege name in ALES, for example, "execute"appContext
- a Map of name/value pairs of application context attributes,
the name type is String and value type is Object
ALESControlException
- an ALESControlException is thrown if any exception caught
while calling runtime security service.boolean hasRole(java.lang.String resource, java.lang.String action, java.util.Map appContext, java.lang.String role) throws ALESControlException
resource
- a String represents the resource, for example, a resource defined
in ALES is "//app/policy/wls9ssm/ExampleApp_EAR/jpd/ExampleApp_Web/processes.ExampleProcess/performService",
if want know current login user is permitted to perform a action on the resource, string passed as resource
to this method should be "/ExampleApp_EAR/jpd/ExampleApp_Web/processes.ExampleProcess/performService"action
- a String represents the action to be performed on a resourcee, which should be a defined
privilege name in ALES, for example, "execute"appContext
- a Map of name/value pairs of application context attributes,
the name type is String and value type is Objectrole
- a String represents the role to see if the current login user has
ALESControlException
- an ALESControlException is thrown if any exception caught
while calling runtime security service.boolean isAccessAllowed(java.lang.String resource, java.lang.String action, java.util.Map appContext) throws ALESControlException
resource
- a String represents the resource, for example, a resource defined
in ALES is "//app/policy/wls9ssm/ExampleApp_EAR/jpd/ExampleApp_Web/processes.ExampleProcess/performService",
if want know current login user is permitted to perform a action on the resource, string passed as resource
to this method should be "/ExampleApp_EAR/jpd/ExampleApp_Web/processes.ExampleProcess/performService"action
- a String represents the action to be performed on the resource, which should be a defined
privilege name in ALES, for example, "execute"appContext
- a Map of name/value pairs of application context attributes,
the name type is String and value type is Object
ALESControlException
- an ALESControlException is thrown if any exception caught
while calling runtime security service.boolean isAccessAllowedWithGrantedresources(java.lang.String resource, java.lang.String action, java.util.Map appContext, java.util.Collection grantedresources) throws ALESControlException
resource
- a String represents the resource, for example, a resource defined
in ALES is "//app/policy/wls9ssm/ExampleApp_EAR/jpd/ExampleApp_Web/processes.ExampleProcess/performService",
if want know current login user is permitted to perform a action on the resource, string passed as resource
to this method should be "/ExampleApp_EAR/jpd/ExampleApp_Web/processes.ExampleProcess/performService"action
- a String represents the action to be performed on a resource, which should be a defined
privilege name in ALES, for example, "execute"appContext
- a Map of name/value pairs of application context attributes,
the name type is String and value type is Objectgrantedresources
- a Collection of Strings represents resources from the
resource passed in that the current login user can perform the action passed in
, returned by the authorization system, it's an out parameter.
ALESControlException
- an ALESControlException is thrown if any exception caught
while calling runtime security service.boolean isAccessAllowedWithResponseAttribues(java.lang.String resource, java.lang.String action, java.util.Map appContext, java.util.Map responseAttr) throws ALESControlException
resource
- a String represents the resource, for example, a resource defined
in ALES is "//app/policy/wls9ssm/ExampleApp_EAR/jpd/ExampleApp_Web/processes.ExampleProcess/performService",
if want know current login user is permitted to perform a action on the resource, string passed as resource
to this method should be "/ExampleApp_EAR/jpd/ExampleApp_Web/processes.ExampleProcess/performService"action
- a String represents the action to be performed on a resource, which should be a defined
privilege name in ALES, for example, "execute"appContext
- a Map of name/value pairs of application context attributes,
the name type is String and value type is ObjectresponseAttr
- a Map of name/value pairs of response attributes returned by the authorization system
the name and value type is String, it's an out parameter.
ALESControlException
- an ALESControlException is thrown if any exception caught
while calling runtime security service.void recordEvent(java.lang.String message, java.util.Map appContext, AuditSeverity severity) throws ALESControlException
message
- a String repesents the message to pass to the audit systemappContext
- a Map of name/value pairs of application context attributes,
the name type is String and value type is Objectseverity
- a AuditSeverity represents the severity of the audit message, could be
AuditSeverity.INFORMATIONAL, AuditSeverity.WARNING, AuditSeverity.ERROR,
AuditSeverity.SUCCESS or AuditSeverity.FAILURE
ALESControlException
- an ALESControlException is thrown if any exception caught
while calling runtime security service.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |