Custom User Directories in Confluence
This documentation applies to Confluence 3.5 and later.
Writing a custom user directory should be the last resort of customers who cannot use any of our supported user management configurations, and cannot use the database or remote API to manually synchronise their users with Confluence.
These instructions are written for customers who are able to write and debug Java code in a web application like Confluence. If you do not have experience doing this, custom user directories are probably not the best approach for your situation.
Writing a custom user directory
To use a custom user directory in Confluence, you need to write a custom subclass of
com.atlassian.crowd.directory.RemoteDirectory. You may wish to subclass one of the existing implementations in Crowd:
If you extend an existing implementation, an instance of your directory will be wrapped in a database-caching layer (
DbCachingRemoteDirectory) like the default implementations are. If you don't extend an existing implementation, you will not get any caching. This should be considered when evaluating the performance of your custom user directory.
Installing a custom user directory
To use a custom directory, you need to configure a directory in Confluence through the UI of the appropriate type, then modify the database to set the implementation class to the type you've created.
- Install the compiled custom user directory in Confluence's classpath – either as a JAR in
confluence/WEB-INF/lib/or as a class file in the appropriate directory under
- Using the Confluence web UI, set up one of the built-in directory types with the configuration options you need.
- Update the database to set 'impl_class' (and 'lower_impl_class') in the
cwd_directorytable in the database to the fully qualified name (and lowercase fully-qualified name) of your RemoteDirectory implementation class.
- Add any additional attributes required by your implementation to
Note: code customisations are not supported by Atlassian. If you need help with implementing this, you can try the forums.