Page Contents

OMERO

Downloads
Feature List
Licensing

Previous topic

Search bridges

Next topic

LoginAttemptListener

This Page

Note

This documentation is for the new OMERO 5.2 version. See the latest OMERO 5.1.x version or the previous versions page to find documentation for the OMERO version you are using if you have not upgraded yet.

Password Provider

A Password Provider is an implementation of the Java interface ome.security.auth.PasswordProvider. Several implementations exist currently:

The “chainedPasswordProvider” (ome.security.auth.PasswordProviders) is configured for use by default in Security under omero.security.password_provider. It first checks with the LdapPasswordProvider and then falls back to the JdbcPasswordProvider.

To write your own provider, you can either subclass from ome.security.auth.ConfigurablePasswordProvider as the providers above do, or write your own implementation from scratch. You will need to define your object in a Spring XML file matching the pattern ome/services/db-*.xml. See Extending OMERO.server more for information.

Things to keep in mind

  • All the existing implementations take care to publish a LoginAttemptMessage so that any LoginAttemptListener implementation can properly react to failed logins. Your implementation should probably do the same.
  • When dealing with chains of password providers, an implementation can safely return null from checkPassword to say “I don’t know anything about this”. This is only important if you configure your own chained password provider with your new implementation as one of the elements.