|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
jrunx.kernel.ServiceAdapter | +--jrun.security.JRunSecurityManagerService
Default Service Implementation of JRunSecurityManager Interface
| Field Summary | |
boolean |
checkForSharedPrincipals
Flag to turn on or off the checkForSharedPrincipals behavior. |
static java.lang.String |
DEFAULT_SECURITY_ID
|
static java.lang.String |
DEFAULT_USER_PRINCIPAL
Default User Principal is "guest". |
boolean |
guestAccessAllowed
Flag set in jrun.xml to allow remote access as guest without providing username and password Set to true by default |
java.util.ArrayList |
hostNames
List of Trusted hosts for interop |
static java.lang.String |
SECURITY_CONTEXT_CACHE_NAME
|
static java.lang.String |
SECURITY_CONTEXT_CACHE_PREFIX
|
| Fields inherited from class jrunx.kernel.ServiceAdapter |
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER |
| Fields inherited from interface jrunx.kernel.Service |
INITIALIZED, STARTED, STARTING, STOPPED, STOPPING, UNINITIALIZED |
| Constructor Summary | |
JRunSecurityManagerService()
|
|
| Method Summary | |
void |
addLoginModule(java.lang.String domain,
java.util.Properties loginModule)
Add the specified login module to the security configuration. |
protected boolean |
authenticate(java.lang.String mode,
java.security.Principal p,
java.lang.Object credential,
java.lang.String securityDomain)
Authenticate the User against the Credential (which can be a password) or a role depending on the mode param |
java.lang.Object |
authenticateInternalSecurityContext(java.security.Principal principal,
java.lang.Object credential)
|
java.lang.Object |
authenticateSecurityContext(java.lang.Object principalname,
java.lang.Object credential)
Authenticate the Principal Credential pair and return Object containing SecurityContextId Uses the default SecurityContext implementation, JRunSecurityContext |
java.lang.Object |
authenticateSecurityContext(java.lang.Object principalname,
java.lang.Object credential,
java.lang.String hostName)
Authentication for trusted hosts If the hostname is part of the trusted hosts collection, no authentication is needed We create a new security context andd return the securityID |
java.lang.Object |
authenticateSecurityContext(java.security.Principal principal,
java.lang.Object credential)
Authenticate this principal/credential pair and return a SecurityContextId |
boolean |
checkSharedPrincipals(java.util.Collection permissions,
SimplePrincipal thisRole)
This method is called when a bean has a runAs identity and the runAs role is not one of the permissioned roles for the current EJB method. |
void |
closeSecurityContext(java.lang.Object securityContextId)
Close the SecurityContext |
java.lang.String |
getAuthConfig()
|
boolean |
getCheckForSharedPrincipals()
|
JRunSecurityManager |
getJRunSecurityManager()
Return this instance. |
java.util.ArrayList |
getLoginModules(java.lang.String domain)
|
java.lang.String |
getRoleMappingDomain()
|
SimplePrincipal |
getRunAsIdentityPrincipal(SimplePrincipal thisRole)
This calls returns a principal associated with the role. |
SecurityContext |
getSecurityContext(java.lang.Object Id)
Returns the SecurityContext for the given Id Returns a null if the Context id is invalid |
java.lang.String |
getSecurityDomain()
|
void |
init()
Sets the auth.config property if it has not been set. |
boolean |
isGuestAccessAllowed()
Flag set in jrun.xml to allow remote access as guest without providing username and password Set to true by default |
boolean |
isPrincipalInRole(java.security.Principal principal,
java.util.Collection roles,
java.lang.String containerRoleMapDomain)
Is the principal set up to play one of the roles in the set ? |
boolean |
isPrincipalValid(java.security.Principal p,
java.lang.Object credential,
java.lang.String containerSecurityDomain)
Authenticate without Client Id, but specify a securityDomain |
void |
modifyLoginModule(java.lang.String domain,
java.util.Properties originalModule,
java.util.Properties updateModule)
Update the properties for the specified login module in the specified domain. |
void |
removeLoginModule(java.lang.String domain,
java.util.Properties loginModule)
Remove the specified login module from the security configuration. |
void |
setAuthConfig(java.lang.String configFileName)
filename for JAAS configuration |
void |
setCheckForSharedPrincipals(boolean checkForSharedPrincipals)
Flag to turn ON checking for shared principals when method authorization fails for an EJB running under runAS identity. |
void |
setGuestAccessAllowed(boolean guestAccessAllowed)
|
void |
setRoleMappingDomain(java.lang.String domain)
The RoleMappingDomain value for Role Resource Authorization can be customized according to the container type. |
void |
setSecurityDomain(java.lang.String domain)
SecurityDomain property decides the configuration in the auth.config file that JAAS uses for authentication This is only for Principal, Credential Authentication. |
void |
setTrustedHost(java.lang.String hostName)
List of trusted hosts for interop |
void |
start()
Every service other than mere data collections should start |
| Methods inherited from interface jrunx.kernel.ServiceMBean |
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind |
| Methods inherited from interface jrunx.kernel.Service |
destroy, getStatus, stop, updateStatus |
| Field Detail |
public boolean checkForSharedPrincipals
public java.util.ArrayList hostNames
public boolean guestAccessAllowed
public static final java.lang.String DEFAULT_USER_PRINCIPAL
public static final java.lang.String DEFAULT_SECURITY_ID
public static final java.lang.String SECURITY_CONTEXT_CACHE_PREFIX
public static final java.lang.String SECURITY_CONTEXT_CACHE_NAME
| Constructor Detail |
public JRunSecurityManagerService()
| Method Detail |
public void setSecurityDomain(java.lang.String domain)
JRunSecurityManagerServiceMBeanSecurityDomain property decides the configuration in the auth.config file that JAAS uses for authentication This is only for Principal, Credential Authentication.
setSecurityDomain in interface JRunSecurityManagerServiceMBeanpublic java.lang.String getSecurityDomain()
getSecurityDomain in interface JRunSecurityManagerServiceMBeanpublic void setRoleMappingDomain(java.lang.String domain)
JRunSecurityManagerServiceMBeanThe RoleMappingDomain value for Role Resource Authorization can be customized according to the container type. The default value comes from jrun.xml
setRoleMappingDomain in interface JRunSecurityManagerServiceMBeanpublic java.lang.String getRoleMappingDomain()
getRoleMappingDomain in interface JRunSecurityManagerServiceMBeanpublic void setAuthConfig(java.lang.String configFileName)
JRunSecurityManagerServiceMBeansetAuthConfig in interface JRunSecurityManagerServiceMBeanpublic java.lang.String getAuthConfig()
getAuthConfig in interface JRunSecurityManagerServiceMBeanpublic boolean getCheckForSharedPrincipals()
getCheckForSharedPrincipals in interface JRunSecurityManagerServiceMBeanpublic void setCheckForSharedPrincipals(boolean checkForSharedPrincipals)
JRunSecurityManagerServiceMBeansetCheckForSharedPrincipals in interface JRunSecurityManagerServiceMBeanpublic void setTrustedHost(java.lang.String hostName)
JRunSecurityManagerServiceMBeansetTrustedHost in interface JRunSecurityManagerServiceMBeanpublic boolean isGuestAccessAllowed()
JRunSecurityManagerServiceMBeanisGuestAccessAllowed in interface JRunSecurityManagerServiceMBeanpublic void setGuestAccessAllowed(boolean guestAccessAllowed)
setGuestAccessAllowed in interface JRunSecurityManagerServiceMBean
public void init()
throws java.lang.Exception
init in interface Serviceinit in class ServiceAdapter
public void start()
throws java.lang.Exception
ServiceAdapterstart in interface Servicestart in class ServiceAdapter
public java.lang.Object authenticateSecurityContext(java.lang.Object principalname,
java.lang.Object credential)
throws JRunSecurityException
authenticateSecurityContext in interface JRunSecurityManagerServiceMBean
public java.lang.Object authenticateSecurityContext(java.lang.Object principalname,
java.lang.Object credential,
java.lang.String hostName)
throws java.lang.Exception
authenticateSecurityContext in interface JRunSecurityManagerServiceMBean
public java.lang.Object authenticateSecurityContext(java.security.Principal principal,
java.lang.Object credential)
throws JRunSecurityException
JRunSecurityManagerServiceMBeanauthenticateSecurityContext in interface JRunSecurityManagerServiceMBean
public java.lang.Object authenticateInternalSecurityContext(java.security.Principal principal,
java.lang.Object credential)
throws JRunSecurityException
public SecurityContext getSecurityContext(java.lang.Object Id)
getSecurityContext in interface JRunSecurityManagerServiceMBean
public boolean isPrincipalValid(java.security.Principal p,
java.lang.Object credential,
java.lang.String containerSecurityDomain)
isPrincipalValid in interface JRunSecurityManagerServiceMBean
public boolean isPrincipalInRole(java.security.Principal principal,
java.util.Collection roles,
java.lang.String containerRoleMapDomain)
isPrincipalInRole in interface JRunSecurityManagerServiceMBean
protected boolean authenticate(java.lang.String mode,
java.security.Principal p,
java.lang.Object credential,
java.lang.String securityDomain)
throws JRunSecurityException
public void closeSecurityContext(java.lang.Object securityContextId)
closeSecurityContext in interface JRunSecurityManagerServiceMBeanpublic JRunSecurityManager getJRunSecurityManager()
getJRunSecurityManager in interface JRunSecurityManagerServiceMBean
public boolean checkSharedPrincipals(java.util.Collection permissions,
SimplePrincipal thisRole)
checkSharedPrincipals in interface JRunSecurityManagerServiceMBeanpublic SimplePrincipal getRunAsIdentityPrincipal(SimplePrincipal thisRole)
getRunAsIdentityPrincipal in interface JRunSecurityManagerServiceMBeanpublic java.util.ArrayList getLoginModules(java.lang.String domain)
getLoginModules in interface JRunSecurityManagerServiceMBean
public void addLoginModule(java.lang.String domain,
java.util.Properties loginModule)
throws JRunSecurityException
addLoginModule in interface JRunSecurityManagerServiceMBean
public void removeLoginModule(java.lang.String domain,
java.util.Properties loginModule)
throws JRunSecurityException
removeLoginModule in interface JRunSecurityManagerServiceMBean
public void modifyLoginModule(java.lang.String domain,
java.util.Properties originalModule,
java.util.Properties updateModule)
throws JRunSecurityException
modifyLoginModule in interface JRunSecurityManagerServiceMBean
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||