public interface PolicyRuntime
oracle.security.am.common.policy.PolicyRuntimeFactory
,
oracle.security.am.common.policy.PolicyRuntimeProvider
Modifier and Type | Method and Description |
---|---|
void |
addPolicyChangeEventListener(PolicyChangeEventListener listener)
Adds the specified event listener to receive policy runtime change events.
|
OAuthClient |
createClient(OAuthClientImpl clientMetadata) |
java.util.List<PolicyChangeEvent> |
getAllPolicyChangeEvents()
Returns all the policy change events.
|
java.util.List<PolicyChangeEvent> |
getAllPolicyChangeEvents(long fromChangeVersion)
Returns all the policy change events starting from the
input change version to the latest version.
|
RuntimeAuthnScheme |
getAuthnScheme(java.lang.String schemeName)
Returns
RuntimeAuthnScheme for the given scheme name. |
OAuthClient |
getClient(java.lang.String clientId,
java.lang.String domainName) |
java.lang.String |
getHostIdentifier(java.lang.String host,
int port)
Returns Host Identifier associated with a host and port.
|
OAuthIdentityDomain |
getIdentityDomain(java.lang.String domainName) |
PolicyChangeEvent |
getLatestPolicyChangeEvent()
Returns the latest policy change event.
|
PolicyChangeEvent |
getPolicyChangeEvent(long changeVersion)
Returns the policy change event associated with the input change version.
|
OAuthResourceServer |
getResource(java.lang.String resourceServerName,
OAuthIdentityDomain domain) |
OAuthResourceServer |
getResource(java.lang.String resourceId,
java.lang.String domainName) |
ServerDiagnosticsDataInfo |
getServerDiagnostics(boolean verbose) |
long |
getStoreVersionInUse()
Returns the policy store version currently in use.
|
AccessResult |
isAuthorized(AccessRequest request)
Determines if a given Subject is permitted to access a RuntimeResource.
|
java.lang.Boolean |
isPolicyCacheValid()
returns true if cache has been initialized otherwise return false.
|
AccessResult |
isResourceProtected(AccessRequest request)
Determines if a given RuntimeResource is protected with an authentication policy,
if so, it evaluates the policy and returns the evaluation result,the authentication scheme
specified for the resource, and any responses specified in the authentication policy.
|
AccessResult |
isSessionValid(AccessRequest request)
Determines if a given user session is valid for the access request.
|
AccessResult |
isTokenRequestAuthorized(AccessRequest request)
Determines if a given Subject is permitted to request a token that will
be used to access RuntimeResource.
|
PolicyCacheRefreshResponse |
refreshPolicyCacheOnDemand(java.lang.String desiredVersion) |
void |
removePolicyChangeEventListener(PolicyChangeEventListener listener)
Removes the specified policy runtime change event listener.
|
void |
shutdown()
Shutdown hook for cleaning up
|
PolicyCacheWriteResponse |
writePolicyCacheToFile() |
AccessResult isResourceProtected(AccessRequest request) throws PolicyEvaluationException
request
- AccessRequest containing resource (required), identity (optional), and access context (optional).PolicyEvaluationException
- stores root cause for failure.AccessResult isAuthorized(AccessRequest request) throws PolicyEvaluationException
request
- AccessRequest containing resource (required), identity (required), and access context (optional).PolicyEvaluationException
- stores root cause for failure.AccessResult isSessionValid(AccessRequest request) throws PolicyEvaluationException
request
- AccessRequest containing resource (required), and access context (required, should contain session)PolicyEvaluationException
AccessResult isTokenRequestAuthorized(AccessRequest request) throws PolicyEvaluationException
request
- access requestPolicyEvaluationException
RuntimeAuthnScheme getAuthnScheme(java.lang.String schemeName) throws PolicyEvaluationException
RuntimeAuthnScheme
for the given scheme name.String
- scheme name.PolicyEvaluationException
java.lang.String getHostIdentifier(java.lang.String host, int port) throws PolicyEvaluationException
host
- - hostnameport
- - for preferred hosts port value is 0PolicyEvaluationException
PolicyChangeEvent getPolicyChangeEvent(long changeVersion) throws PolicyEvaluationException
version
- PolicyEvaluationException
java.util.List<PolicyChangeEvent> getAllPolicyChangeEvents() throws PolicyEvaluationException
version
- PolicyEvaluationException
java.util.List<PolicyChangeEvent> getAllPolicyChangeEvents(long fromChangeVersion) throws PolicyEvaluationException
version
- PolicyEvaluationException
PolicyChangeEvent getLatestPolicyChangeEvent() throws PolicyEvaluationException
version
- PolicyEvaluationException
void addPolicyChangeEventListener(PolicyChangeEventListener listener) throws PolicyEvaluationException
listener
- PolicyEvaluationException
void removePolicyChangeEventListener(PolicyChangeEventListener listener) throws PolicyEvaluationException
listener
- PolicyEvaluationException
long getStoreVersionInUse() throws PolicyEvaluationException
PolicyEvaluationException
OAuthClient getClient(java.lang.String clientId, java.lang.String domainName) throws PolicyEvaluationException
PolicyEvaluationException
OAuthClient createClient(OAuthClientImpl clientMetadata) throws PolicyEvaluationException
PolicyEvaluationException
OAuthResourceServer getResource(java.lang.String resourceId, java.lang.String domainName) throws PolicyEvaluationException
PolicyEvaluationException
OAuthIdentityDomain getIdentityDomain(java.lang.String domainName) throws PolicyEvaluationException
PolicyEvaluationException
OAuthResourceServer getResource(java.lang.String resourceServerName, OAuthIdentityDomain domain) throws PolicyEvaluationException
PolicyEvaluationException
ServerDiagnosticsDataInfo getServerDiagnostics(boolean verbose)
verbose
- Boolean parameter when set to true provides additional information such
Application domains and their IDs. The number of application domains displayed is controlled
by the VerboseMaxSize configuration parameter the defauly value of which is 50.PolicyCacheWriteResponse writePolicyCacheToFile()
PolicyCacheRefreshResponse refreshPolicyCacheOnDemand(java.lang.String desiredVersion)
desiredVersion
- Cache version which it desire for the server to sync to.
This can be null or empty string, in that case cache will be refreshed to latest version.
If this is provided and provided version is incorrect or not available in persistent store,
then cache will be refreshed to latest version available in the store.void shutdown() throws PolicyEvaluationException
PolicyEvaluationException
java.lang.Boolean isPolicyCacheValid()