|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.management.NotificationBroadcasterSupport org.objectweb.jonas.management.ReconfigDispatcher org.objectweb.jonas.security.realm.factory.JResource org.objectweb.jonas.security.realm.factory.JResourceLDAP
public class JResourceLDAP
This class extends the JResource class for the LDAP implementation.
Field Summary |
---|
Fields inherited from class org.objectweb.jonas.management.ReconfigDispatcher |
---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
Constructor Summary | |
---|---|
JResourceLDAP()
Constructor : use the super constructor |
Method Summary | |
---|---|
User |
findUser(java.lang.String username)
Check if a user is found and return it |
java.lang.String |
getAlgorithm()
Get the default algorithm |
java.util.ArrayList |
getArrayListCombinedRoles(User user)
Get all the roles (from the roles and from the groups) of the given user |
java.lang.String |
getAuthenticationMode()
Get the mode for validate the authentication of this LDAP realm |
java.lang.String |
getBaseDN()
Get the DN used for the lookup of this LDAP realm |
protected javax.naming.directory.DirContext |
getDirContext()
Return a dircontext for this LDAP server |
java.lang.String |
getInitialContextFactory()
Return the initial context factory of this LDAP realm |
java.lang.String |
getLanguage()
Get the preferred language to use with the service of this LDAP realm |
java.lang.String |
getProviderUrl()
Get the Url of the ldap server of this LDAP realm |
javax.naming.Reference |
getReference()
Retrieves the Reference of the object. |
java.lang.String |
getReferral()
Get how referrals encountered by the service provider are to be processed |
java.lang.String |
getRoleDN()
Get the DN used when searching the role DN. |
java.lang.String |
getRoleNameAttribute()
Get the role name when performing a lookup on a role |
java.lang.String |
getRoleSearchFilter()
Get the filter used when searching the role |
java.lang.String |
getSecurityAuthentication()
Get the authentication used during the authentication to the LDAP server of this LDAP realm |
java.lang.String |
getSecurityCredentials()
Get the Credential(password) of the principal of this LDAP realm |
java.lang.String |
getSecurityPrincipal()
Get the DN of the Principal(username) of this LDAP realm |
java.lang.String |
getSecurityProtocol()
Get the security protocol to use of this LDAP realm |
java.lang.String |
getStateFactories()
Get the the list of state factories of this LDAP realm |
java.lang.String |
getUserDN()
Get the DN used when searching the user DN. |
java.lang.String |
getUserPasswordAttribute()
Get the attribute in order to get the password of this LDAP realm |
java.lang.String |
getUserRolesAttribute()
Get the attribute in order to get the user role from the ldap server |
java.lang.String |
getUserSearchFilter()
Get the filter used when searching the user |
boolean |
isValidUser(User user,
java.lang.String credentials)
Check if the given user with the given credential is a valid user |
boolean |
isValidUserBind(User user,
java.lang.String credentials)
Check if the given user with the given credential is a valid user. |
boolean |
isValidUserCompare(User user,
java.lang.String credentials)
Check if the given user with the given credential is a valid user. |
void |
removeMBeans()
Remove all the Mbeans used by this resource |
void |
setAlgorithm(java.lang.String algorithm)
Set the default algorithm to use |
void |
setAuthenticationMode(java.lang.String authenticationMode)
Set the mode for validate the authentication of this LDAP realm |
void |
setBaseDN(java.lang.String baseDN)
Set the DN used for the lookup of this LDAP realm |
void |
setInitialContextFactory(java.lang.String initialContextFactory)
Set the initial context factory of this LDAP realm |
void |
setLanguage(java.lang.String language)
Set the preferred language to use with the service of this LDAP realm |
void |
setProviderUrl(java.lang.String providerUrl)
Set the Url of the ldap server of this LDAP realm |
void |
setReferral(java.lang.String referral)
Set how referrals encountered by the service provider are to be processed |
void |
setRoleDN(java.lang.String roleDN)
Set the DN used when searching the role DN. |
void |
setRoleNameAttribute(java.lang.String roleNameAttribute)
Set the role name when performing a lookup on a role |
void |
setRoleSearchFilter(java.lang.String roleSearchFilter)
Set the filter used when searching the role |
void |
setSecurityAuthentication(java.lang.String securityAuthentication)
Set the authentication used during the authentication to the LDAP server of this LDAP realm |
void |
setSecurityCredentials(java.lang.String securityCredentials)
Set the Credential(password) of the principal of this LDAP realm |
void |
setSecurityPrincipal(java.lang.String securityPrincipal)
Set the DN of the Principal(username) of this LDAP realm |
void |
setSecurityProtocol(java.lang.String securityProtocol)
Set the security protocol to use of this LDAP realm |
void |
setStateFactories(java.lang.String stateFactories)
Set the the list of state factories of this LDAP realm |
void |
setUserDN(java.lang.String userDN)
Set the DN used when searching the user DN. |
void |
setUserPasswordAttribute(java.lang.String userPasswordAttribute)
Set the attribute in order to get the password of this LDAP realm |
void |
setUserRolesAttribute(java.lang.String userRolesAttribute)
Set the attribute in order to get the user role from the ldap server |
void |
setUserSearchFilter(java.lang.String userSearchFilter)
Set the filter used when searching the user |
java.lang.String |
toString()
The string representation of this object is an XML value |
java.lang.String |
toXML()
String representation of the LDAP realm |
Methods inherited from class org.objectweb.jonas.security.realm.factory.JResource |
---|
clearCache, getLogger, getMBeanServer, getName, getSequenceNumber, getUsers, saveConfig, setLogger, setName, setUsers |
Methods inherited from class org.objectweb.jonas.management.ReconfigDispatcher |
---|
addNotificationListener, getFilter, getHandback, getListener, getNotificationInfo, initLogger, removeNotificationListener, sendReconfigNotification, sendSaveNotification |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
handleNotification, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.objectweb.jonas.security.realm.factory.JResourceLDAPMBean |
---|
clearCache |
Methods inherited from interface org.objectweb.jonas.security.realm.factory.JResourceMBean |
---|
getName, saveConfig |
Constructor Detail |
---|
public JResourceLDAP() throws java.lang.Exception
java.lang.Exception
- if the super constructor failMethod Detail |
---|
public User findUser(java.lang.String username) throws JResourceException
findUser
in class JResource
username
- the wanted user name
JResourceException
- if there is a NamingExceptionpublic boolean isValidUser(User user, java.lang.String credentials)
isValidUser
in class JResource
user
- the given usercredentials
- credential of the user
public boolean isValidUserBind(User user, java.lang.String credentials)
user
- the given usercredentials
- credential of the user
public boolean isValidUserCompare(User user, java.lang.String credentials)
user
- the given usercredentials
- credential of the user
public java.util.ArrayList getArrayListCombinedRoles(User user) throws JResourceException
getArrayListCombinedRoles
in class JResource
user
- the given user
JResourceException
- if there is a naming exceptionpublic java.lang.String toXML()
public java.lang.String toString()
toString
in class java.lang.Object
public javax.naming.Reference getReference() throws javax.naming.NamingException
getReference
in interface javax.naming.Referenceable
getReference
in class JResource
javax.naming.NamingException
- if a naming exception was encountered while
retrieving the reference.public void setInitialContextFactory(java.lang.String initialContextFactory)
setInitialContextFactory
in interface JResourceLDAPMBean
initialContextFactory
- the initial context factorypublic void setProviderUrl(java.lang.String providerUrl)
setProviderUrl
in interface JResourceLDAPMBean
providerUrl
- Url of the ldap serverpublic void setSecurityAuthentication(java.lang.String securityAuthentication)
setSecurityAuthentication
in interface JResourceLDAPMBean
securityAuthentication
- authentication used during the
authentication to the LDAP serverpublic void setSecurityPrincipal(java.lang.String securityPrincipal)
setSecurityPrincipal
in interface JResourceLDAPMBean
securityPrincipal
- DN of the Principal(username)public void setSecurityCredentials(java.lang.String securityCredentials)
setSecurityCredentials
in interface JResourceLDAPMBean
securityCredentials
- Credential(password) of the principalpublic void setSecurityProtocol(java.lang.String securityProtocol)
setSecurityProtocol
in interface JResourceLDAPMBean
securityProtocol
- security protocol to usepublic void setLanguage(java.lang.String language)
setLanguage
in interface JResourceLDAPMBean
language
- preferred language to use with the servicepublic void setReferral(java.lang.String referral)
setReferral
in interface JResourceLDAPMBean
referral
- how referrals encountered by the service provider are to
be processedpublic void setStateFactories(java.lang.String stateFactories)
setStateFactories
in interface JResourceLDAPMBean
stateFactories
- list of state factoriespublic void setAuthenticationMode(java.lang.String authenticationMode)
setAuthenticationMode
in interface JResourceLDAPMBean
authenticationMode
- BIND_AUTHENTICATION_MODE or
COMPARE_AUTHENTICATION_MODEpublic void setUserPasswordAttribute(java.lang.String userPasswordAttribute)
setUserPasswordAttribute
in interface JResourceLDAPMBean
userPasswordAttribute
- attribute in order to get the password of
this LDAP realmpublic void setUserRolesAttribute(java.lang.String userRolesAttribute)
setUserRolesAttribute
in interface JResourceLDAPMBean
userRolesAttribute
- attribute in order to get the user role from
the ldap serverpublic void setRoleNameAttribute(java.lang.String roleNameAttribute)
setRoleNameAttribute
in interface JResourceLDAPMBean
roleNameAttribute
- role name when performing a lookup on a rolepublic void setBaseDN(java.lang.String baseDN)
setBaseDN
in interface JResourceLDAPMBean
baseDN
- DN used for the lookuppublic void setUserDN(java.lang.String userDN)
setUserDN
in interface JResourceLDAPMBean
userDN
- DN used when searching the user DNpublic void setUserSearchFilter(java.lang.String userSearchFilter)
setUserSearchFilter
in interface JResourceLDAPMBean
userSearchFilter
- filter used when searching the userpublic void setRoleDN(java.lang.String roleDN)
setRoleDN
in interface JResourceLDAPMBean
roleDN
- DN used when searching the role DN. Override the baseDN if
it is definedpublic void setRoleSearchFilter(java.lang.String roleSearchFilter)
setRoleSearchFilter
in interface JResourceLDAPMBean
roleSearchFilter
- filter used when searching the rolepublic void setAlgorithm(java.lang.String algorithm)
setAlgorithm
in interface JResourceLDAPMBean
algorithm
- algorithm to be usedpublic java.lang.String getInitialContextFactory()
getInitialContextFactory
in interface JResourceLDAPMBean
public java.lang.String getProviderUrl()
getProviderUrl
in interface JResourceLDAPMBean
public java.lang.String getSecurityAuthentication()
getSecurityAuthentication
in interface JResourceLDAPMBean
public java.lang.String getSecurityPrincipal()
getSecurityPrincipal
in interface JResourceLDAPMBean
public java.lang.String getSecurityCredentials()
getSecurityCredentials
in interface JResourceLDAPMBean
public java.lang.String getSecurityProtocol()
getSecurityProtocol
in interface JResourceLDAPMBean
public java.lang.String getLanguage()
getLanguage
in interface JResourceLDAPMBean
public java.lang.String getReferral()
getReferral
in interface JResourceLDAPMBean
public java.lang.String getStateFactories()
getStateFactories
in interface JResourceLDAPMBean
public java.lang.String getAuthenticationMode()
getAuthenticationMode
in interface JResourceLDAPMBean
public java.lang.String getUserPasswordAttribute()
getUserPasswordAttribute
in interface JResourceLDAPMBean
public java.lang.String getUserRolesAttribute()
getUserRolesAttribute
in interface JResourceLDAPMBean
public java.lang.String getRoleNameAttribute()
getRoleNameAttribute
in interface JResourceLDAPMBean
public java.lang.String getBaseDN()
getBaseDN
in interface JResourceLDAPMBean
public java.lang.String getUserDN()
getUserDN
in interface JResourceLDAPMBean
public java.lang.String getUserSearchFilter()
getUserSearchFilter
in interface JResourceLDAPMBean
public java.lang.String getRoleDN()
getRoleDN
in interface JResourceLDAPMBean
public java.lang.String getRoleSearchFilter()
getRoleSearchFilter
in interface JResourceLDAPMBean
public java.lang.String getAlgorithm()
getAlgorithm
in interface JResourceLDAPMBean
protected javax.naming.directory.DirContext getDirContext() throws javax.naming.NamingException
javax.naming.NamingException
- if we can't retrieve a DirContextpublic void removeMBeans() throws JResourceException
removeMBeans
in class JResource
JResourceException
- if the MBeans can not be removed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |