public class SimpleSecurityManager extends Object implements ServerSecurityManager
Constructor and Description |
---|
SimpleSecurityManager() |
SimpleSecurityManager(SimpleSecurityManager delegate) |
Modifier and Type | Method and Description |
---|---|
void |
authenticate() |
void |
authenticate(String runAs,
String runAsPrincipal,
Set<String> extraRoles) |
boolean |
authorize(String ejbName,
CodeSource ejbCodeSource,
String ejbMethodIntf,
Method ejbMethod,
Set<Principal> methodRoles,
String contextID) |
Principal |
getCallerPrincipal() |
Subject |
getSubject() |
boolean |
isCallerInRole(Object incommingMappedRoles,
Map<String,Collection<String>> roleLinks,
String... roleNames) |
void |
pop()
Must be called from within a privileged action.
|
void |
push(String securityDomain)
Must be called from within a privileged action.
|
void |
push(String securityDomain,
String userName,
char[] password,
Subject subject) |
void |
setSecurityManagement(org.jboss.security.ISecurityManagement iSecurityManagement) |
public SimpleSecurityManager()
public SimpleSecurityManager(SimpleSecurityManager delegate)
public void setSecurityManagement(org.jboss.security.ISecurityManagement iSecurityManagement)
public Principal getCallerPrincipal()
getCallerPrincipal
in interface ServerSecurityManager
public Subject getSubject()
getSubject
in interface ServerSecurityManager
public boolean isCallerInRole(Object incommingMappedRoles, Map<String,Collection<String>> roleLinks, String... roleNames)
isCallerInRole
in interface ServerSecurityManager
incommingMappedRoles
- The principal vs roles mapping (if any). Can be null.roleLinks
- The role link map where the key is an alias role name and the value is the collection of
role names, that alias represents. Can be null.roleNames
- The role names for which the caller is being checked forroleNames
. Else returns falsepublic boolean authorize(String ejbName, CodeSource ejbCodeSource, String ejbMethodIntf, Method ejbMethod, Set<Principal> methodRoles, String contextID)
authorize
in interface ServerSecurityManager
public void push(String securityDomain)
push
in interface ServerSecurityManager
securityDomain
- public void push(String securityDomain, String userName, char[] password, Subject subject)
push
in interface ServerSecurityManager
public void authenticate()
authenticate
in interface ServerSecurityManager
public void authenticate(String runAs, String runAsPrincipal, Set<String> extraRoles)
authenticate
in interface ServerSecurityManager
public void pop()
pop
in interface ServerSecurityManager
Copyright © 2014 JBoss by Red Hat. All rights reserved.