org.objectweb.jonas.security.JonasSecurityServiceImpl Class Reference

Inherits org.objectweb.jonas.security.SecurityService, and org.objectweb.jonas.security.JonasSecurityServiceImplMBean.

Inheritance diagram for org.objectweb.jonas.security.JonasSecurityServiceImpl:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.jonas.security.JonasSecurityServiceImpl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void doInit (Context ctx) throws ServiceException
void removeJResource (String resourceName) throws Exception
void doStart () throws ServiceException
void doStop ()
JResource getJResource (String name)
String toXML ()
String encryptPassword (String string, String algo) throws NoSuchAlgorithmException
boolean isValidAlgorithm (String algo)
void addResources (String xml) throws Exception
void addJResourceMemory (String name) throws Exception
void addJResourceDS (String name, String dsName, String userTable, String userTableUsernameCol, String userTablePasswordCol, String roleTable, String roleTableUsernameCol, String roleTableRolenameCol, String algorithm) throws Exception
void addJResourceLDAP (String name, String initialContextFactory, String providerUrl, String securityAuthentication, String securityPrincipal, String securityCredentials, String securityProtocol, String language, String referral, String stateFactories, String authenticationMode, String userPasswordAttribute, String userRolesAttribute, String roleNameAttribute, String baseDN, String userDN, String userSearchFilter, String roleDN, String roleSearchFilter, String algorithm) throws Exception
void bindResource (String name, JResource jResource)

Static Public Attributes

final String CLASS = "jonas.service.security.class"

Protected Member Functions

File getConfigFile () throws FileNotFoundException

Static Protected Attributes

final String CONFIG_FILE = "conf" + File.separator + "jonas-realm.xml"

Detailed Description

Security Service implementation

Author:
Jeff Mesnil,Philippe Coq, John Ellis, Joe Gittings for old security service

Florent Benoit

Definition at line 66 of file JonasSecurityServiceImpl.java.


Member Function Documentation

void org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceDS String  name,
String  dsName,
String  userTable,
String  userTableUsernameCol,
String  userTablePasswordCol,
String  roleTable,
String  roleTableUsernameCol,
String  roleTableRolenameCol,
String  algorithm
throws Exception
 

Add a DS resource

Parameters:
name the name of the JResourceDS to create
dsName Name of the datasource resource to use.
userTable Name of table which have the username/password
userTableUsernameCol Column of the username of the user table
userTablePasswordCol Column of the password of the user table
roleTable Name of table which have the username/role
roleTableUsernameCol Column of the username of the role table
roleTableRolenameCol Column of the role of the role table
algorithm Default algorithm. If specified, the default is not 'clear' password
Exceptions:
Exception if the resource can't be added

Implements org.objectweb.jonas.security.JonasSecurityServiceImplMBean.

Definition at line 355 of file JonasSecurityServiceImpl.java.

References org.objectweb.jonas.security.JonasSecurityServiceImpl.addResources(), org.objectweb.jonas.security.realm.factory.JResourceDS.setAlgorithm(), org.objectweb.jonas.security.realm.factory.JResourceDS.setDsName(), org.objectweb.jonas.security.realm.factory.JResource.setName(), org.objectweb.jonas.security.realm.factory.JResourceDS.setRoleTable(), org.objectweb.jonas.security.realm.factory.JResourceDS.setRoleTableRolenameCol(), org.objectweb.jonas.security.realm.factory.JResourceDS.setRoleTableUsernameCol(), org.objectweb.jonas.security.realm.factory.JResourceDS.setUserTable(), org.objectweb.jonas.security.realm.factory.JResourceDS.setUserTablePasswordCol(), org.objectweb.jonas.security.realm.factory.JResourceDS.setUserTableUsernameCol(), and org.objectweb.jonas.security.realm.factory.JResourceDS.toXML().

Here is the call graph for this function:

void org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceLDAP String  name,
String  initialContextFactory,
String  providerUrl,
String  securityAuthentication,
String  securityPrincipal,
String  securityCredentials,
String  securityProtocol,
String  language,
String  referral,
String  stateFactories,
String  authenticationMode,
String  userPasswordAttribute,
String  userRolesAttribute,
String  roleNameAttribute,
String  baseDN,
String  userDN,
String  userSearchFilter,
String  roleDN,
String  roleSearchFilter,
String  algorithm
throws Exception
 

Add a LDAP resource

Parameters:
name the name of the JResourceLDAP to create
initialContextFactory Initial context factory for the LDAp server
providerUrl Url of the ldap server
securityAuthentication Type of the authentication used during the authentication to the LDAP server
securityPrincipal DN of the Principal(username). He can retrieve the information from the user
securityCredentials Credential(password) of the principal
securityProtocol Constant that holds the name of the environment property for specifying the security protocol to use.
language Constant that holds the name of the environment property for specifying the preferred language to use with the service.
referral Constant that holds the name of the environment property for specifying how referrals encountered by the service provider are to be processed.
stateFactories Constant that holds the name of the environment property for specifying the list of state factories to use.
authenticationMode Mode for validate the authentication (BIND_AUTHENTICATION_MODE or COMPARE_AUTHENTICATION_MODE)
userPasswordAttribute Attribute in order to get the password from the ldap server
userRolesAttribute Attribute in order to get the user role from the ldap server
roleNameAttribute Attribute for the role name when performing a lookup on a role
baseDN DN used for the lookup
userDN DN used when searching the user DN. Override the baseDN if it is defined
userSearchFilter Filter used when searching the user
roleDN DN used when searching the role DN. Override the baseDN if it is defined
roleSearchFilter Filter used when searching the role
algorithm Default algorithm. If specified, the default is not 'clear' password
Exceptions:
Exception if the resource can't be added

Implements org.objectweb.jonas.security.JonasSecurityServiceImplMBean.

Definition at line 418 of file JonasSecurityServiceImpl.java.

References org.objectweb.jonas.security.JonasSecurityServiceImpl.addResources(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setAlgorithm(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setAuthenticationMode(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setBaseDN(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setInitialContextFactory(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setLanguage(), org.objectweb.jonas.security.realm.factory.JResource.setName(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setProviderUrl(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setReferral(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setRoleDN(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setRoleNameAttribute(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setRoleSearchFilter(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setSecurityAuthentication(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setSecurityCredentials(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setSecurityPrincipal(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setSecurityProtocol(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setStateFactories(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setUserDN(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setUserPasswordAttribute(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setUserRolesAttribute(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.setUserSearchFilter(), and org.objectweb.jonas.security.realm.factory.JResourceLDAP.toXML().

Here is the call graph for this function:

void org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceMemory String  name  )  throws Exception
 

Add a Memory resource

Parameters:
name the name of the JResourceMemory to create
Exceptions:
Exception if the resource can't be added

Implements org.objectweb.jonas.security.JonasSecurityServiceImplMBean.

Definition at line 320 of file JonasSecurityServiceImpl.java.

References org.objectweb.jonas.security.JonasSecurityServiceImpl.addResources(), org.objectweb.jonas.security.realm.factory.JResource.setName(), and org.objectweb.jonas.security.realm.factory.JResourceMemory.toXML().

Here is the call graph for this function:

void org.objectweb.jonas.security.JonasSecurityServiceImpl.addResources String  xml  )  throws Exception
 

Add JResources with a given xml configuration

Parameters:
xml xml representation of the resources to add
Exceptions:
Exception if the resources can't be added

Implements org.objectweb.jonas.security.JonasSecurityServiceImplMBean.

Definition at line 303 of file JonasSecurityServiceImpl.java.

Referenced by org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceDS(), org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceLDAP(), and org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceMemory().

void org.objectweb.jonas.security.JonasSecurityServiceImpl.bindResource String  name,
JResource  jResource
 

Bind the given resource with the given name and register with a new MBean.

Parameters:
name resource name
jResource resource

Implements org.objectweb.jonas.security.SecurityService.

Definition at line 480 of file JonasSecurityServiceImpl.java.

References org.objectweb.jonas.security.realm.factory.JResource.getName().

Here is the call graph for this function:

void org.objectweb.jonas.security.JonasSecurityServiceImpl.doInit Context  ctx  )  throws ServiceException
 

Init the Service. Configuration information is passed thru a Context object.

Parameters:
ctx the configuration of the Security service.
Exceptions:
ServiceException if the initialization failed.

Definition at line 104 of file JonasSecurityServiceImpl.java.

void org.objectweb.jonas.security.JonasSecurityServiceImpl.doStart  )  throws ServiceException
 

Start the Service Initialization of the service is already done.

Exceptions:
ServiceException if the stop failed.

Definition at line 176 of file JonasSecurityServiceImpl.java.

void org.objectweb.jonas.security.JonasSecurityServiceImpl.doStop  ) 
 

Stop the Service

Definition at line 194 of file JonasSecurityServiceImpl.java.

String org.objectweb.jonas.security.JonasSecurityServiceImpl.encryptPassword String  string,
String  algo
throws NoSuchAlgorithmException
 

Encrypt a string with an algorithm

Parameters:
string the string to encode
algo algorithm to apply on the given string
Returns:
the encoded string
Exceptions:
NoSuchAlgorithmException One reason could be a bad algorithm

Implements org.objectweb.jonas.security.JonasSecurityServiceImplMBean.

Definition at line 276 of file JonasSecurityServiceImpl.java.

Referenced by org.objectweb.jonas.security.JonasSecurityServiceImpl.isValidAlgorithm().

File org.objectweb.jonas.security.JonasSecurityServiceImpl.getConfigFile  )  throws FileNotFoundException [protected]
 

Return a File object representing the jonas-realm.xml configuration file.

Returns:
a File object representing the jonas-realm.xml configuration file.
Exceptions:
FileNotFoundException if the configuration file is not found.

Definition at line 249 of file JonasSecurityServiceImpl.java.

JResource org.objectweb.jonas.security.JonasSecurityServiceImpl.getJResource String  name  ) 
 

Return a resource by giving its name

Parameters:
name the wanted Resource
Returns:
a JResouce

Implements org.objectweb.jonas.security.SecurityService.

Definition at line 213 of file JonasSecurityServiceImpl.java.

References org.objectweb.jonas.security.JResources.getJResource().

Here is the call graph for this function:

boolean org.objectweb.jonas.security.JonasSecurityServiceImpl.isValidAlgorithm String  algo  ) 
 

Check if the given algorithm is a valid algorithm

Parameters:
algo algorithm to apply on the given string
Returns:
true if it is a valid algorithm

Implements org.objectweb.jonas.security.JonasSecurityServiceImplMBean.

Definition at line 288 of file JonasSecurityServiceImpl.java.

References org.objectweb.jonas.security.JonasSecurityServiceImpl.encryptPassword().

Here is the call graph for this function:

void org.objectweb.jonas.security.JonasSecurityServiceImpl.removeJResource String  resourceName  )  throws Exception
 

Remove the Resource (memory, ldap, datasource,...)

Parameters:
resourceName name of the resource
Exceptions:
Exception if the resource name does not exist

Implements org.objectweb.jonas.security.JonasSecurityServiceImplMBean.

Definition at line 136 of file JonasSecurityServiceImpl.java.

References org.objectweb.jonas.security.JResources.remove(), and org.objectweb.jonas.security.realm.factory.JResource.removeMBeans().

Here is the call graph for this function:

String org.objectweb.jonas.security.JonasSecurityServiceImpl.toXML  ) 
 

String representation of the JOnAS realm

Returns:
the xml representation of the JOnAS realm

Implements org.objectweb.jonas.security.SecurityService.

Definition at line 264 of file JonasSecurityServiceImpl.java.

References org.objectweb.jonas.security.JResources.toXML().

Here is the call graph for this function:


Member Data Documentation

final String org.objectweb.jonas.security.JonasSecurityServiceImpl.CLASS = "jonas.service.security.class" [static]
 

Security service configuration properties

Definition at line 76 of file JonasSecurityServiceImpl.java.

final String org.objectweb.jonas.security.JonasSecurityServiceImpl.CONFIG_FILE = "conf" + File.separator + "jonas-realm.xml" [static, protected]
 

Relative path of the realm configuration file

Definition at line 81 of file JonasSecurityServiceImpl.java.


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:07:38 2005 for JOnAS by  doxygen 1.3.9.1