public class AccessAuditContext extends Object
| Modifier and Type | Method and Description |
|---|---|
static AccessAuditContext |
currentAccessAuditContext()
Deprecated.
Internal use, will be changed without warning at any time.
|
static <T> T |
doAs(org.wildfly.security.auth.server.SecurityIdentity securityIdentity,
InetAddress remoteAddress,
PrivilegedAction<T> action)
Perform work with a new
AccessAuditContext as a particular SecurityIdentity |
static <T> T |
doAs(org.wildfly.security.auth.server.SecurityIdentity securityIdentity,
InetAddress remoteAddress,
PrivilegedExceptionAction<T> action)
Perform work with a new
AccessAuditContext as a particular SecurityIdentity |
AccessMechanism |
getAccessMechanism()
Gets the mechanism via which the user initiated the access.
|
String |
getDomainUuid()
Gets the unique identifier for a multi-domain-process operation.
|
InetAddress |
getRemoteAddress()
Get the remote address of the caller.
|
org.wildfly.security.auth.server.SecurityIdentity |
getSecurityIdentity()
Get the
SecurityIdentity associated with this AccessAuditContext. |
boolean |
isDomainRollout()
Gets whether this context relates to a secondary request initiated by a remote Host Controller
process as part of its rollout of an operation initiated on that process.
|
void |
setAccessMechanism(AccessMechanism accessMechanism) |
void |
setDomainRollout(boolean domainRollout) |
void |
setDomainUuid(String domainUuid) |
public org.wildfly.security.auth.server.SecurityIdentity getSecurityIdentity()
SecurityIdentity associated with this AccessAuditContext.
This provides a way for the SecurityIdentity to be passed without the underlying SecurityDomain being known.SecurityIdentity associated with this AccessAuditContext.public InetAddress getRemoteAddress()
public String getDomainUuid()
null if this context does not relate to a multi-domain-process operationpublic void setDomainUuid(String domainUuid)
public AccessMechanism getAccessMechanism()
null if the access was initiated internallypublic void setAccessMechanism(AccessMechanism accessMechanism)
public boolean isDomainRollout()
true if this context relates to a remotely coordinated multi-process domain operationpublic void setDomainRollout(boolean domainRollout)
@Deprecated public static AccessAuditContext currentAccessAuditContext()
AccessAuditContext or null if none currently set.AccessAuditContextpublic static <T> T doAs(org.wildfly.security.auth.server.SecurityIdentity securityIdentity,
InetAddress remoteAddress,
PrivilegedAction<T> action)
AccessAuditContext as a particular SecurityIdentityT - the type of teh return valuesecurityIdentity - the SecurityIdentity that the specified action will run as. May be nullremoteAddress - the remote address of the caller.action - the work to perform. Cannot be nullrun methodNullPointerException - if the specified
PrivilegedExceptionAction is
null.SecurityException - if the caller does not have permission
to invoke this method.public static <T> T doAs(org.wildfly.security.auth.server.SecurityIdentity securityIdentity,
InetAddress remoteAddress,
PrivilegedExceptionAction<T> action)
throws PrivilegedActionException
AccessAuditContext as a particular SecurityIdentityT - the type of teh return valuesecurityIdentity - the SecurityIdentity that the specified action will run as. May be nullremoteAddress - the remote address of the caller.action - the work to perform. Cannot be nullrun methodPrivilegedActionException - if the
PrivilegedExceptionAction.run
method throws a checked exception.NullPointerException - if the specified
PrivilegedExceptionAction is
null.SecurityException - if the caller does not have permission
to invoke this method.Copyright © 2017 JBoss by Red Hat. All rights reserved.