Package ome.security.auth.providers
Class LdapPasswordProvider431
- java.lang.Object
-
- ome.security.auth.ConfigurablePasswordProvider
-
- ome.security.auth.providers.LdapPasswordProvider431
-
- All Implemented Interfaces:
PasswordProvider,PasswordUtility,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class LdapPasswordProvider431 extends ConfigurablePasswordProvider
LDAPPasswordProviderwhich can create users onrequestto synchronize with an LDAP directory. Assuming that a user exists in the configured LDAP store but not in the database, then a new user will be created. Authentication, however, always takes place against LDAP, and changing passwords is not allowed. Note: deleted LDAP users will not be removed from OMERO, but will not be able to login. Note: unlikeLdapPasswordProvider, this implementation (the default LDAP password provider up until 4.3.2) does not check the user_filter on every login, but only when a user does not exist. This means that when using this implementation it is not possible to remove a user's login simply by modifying a part of the user_filter. To workaround various issues described under tickets #6248 and #6885, it was necessary to retain this logic in 4.3.3.- Since:
- 4.0
- See Also:
SecuritySystem,Permissions
-
-
Field Summary
Fields Modifier and Type Field Description protected LdapImplldapUtil-
Fields inherited from class ome.security.auth.ConfigurablePasswordProvider
ctx, hash, ignoreUnknown, legacyUtil, log, salt, util
-
-
Constructor Summary
Constructors Constructor Description LdapPasswordProvider431(PasswordUtil util, LdapImpl ldap)LdapPasswordProvider431(PasswordUtil util, LdapImpl ldap, boolean ignoreUnknown)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.BooleancheckPassword(java.lang.String user, java.lang.String password, boolean readOnly)If this was constructed with theignoreUnknownargument set totrue, returnsnull, since the base class knows no users.booleanhasPassword(java.lang.String user)Only returns if the user is already in the database and has a DN value in the password table.-
Methods inherited from class ome.security.auth.ConfigurablePasswordProvider
changePassword, comparePasswords, comparePasswords, comparePasswords, encodePassword, encodePassword, encodeSaltedPassword, loginAttempt, setApplicationContext, setLegacyUtil
-
-
-
-
Field Detail
-
ldapUtil
protected final LdapImpl ldapUtil
-
-
Constructor Detail
-
LdapPasswordProvider431
public LdapPasswordProvider431(PasswordUtil util, LdapImpl ldap)
-
LdapPasswordProvider431
public LdapPasswordProvider431(PasswordUtil util, LdapImpl ldap, boolean ignoreUnknown)
-
-
Method Detail
-
hasPassword
public boolean hasPassword(java.lang.String user)
Only returns if the user is already in the database and has a DN value in the password table. Note: after a call tocheckPassword(String, String,boolean)with this same user value, this method might begin to returntruedue to a call toLdapImpl.createUser(String, String).- Specified by:
hasPasswordin interfacePasswordProvider- Overrides:
hasPasswordin classConfigurablePasswordProvider
-
checkPassword
public java.lang.Boolean checkPassword(java.lang.String user, java.lang.String password, boolean readOnly)Description copied from class:ConfigurablePasswordProviderIf this was constructed with theignoreUnknownargument set totrue, returnsnull, since the base class knows no users. Otherwise, returnsBoolean.FALSEspecifying that authentication should fail.- Specified by:
checkPasswordin interfacePasswordProvider- Overrides:
checkPasswordin classConfigurablePasswordProvider
-
-