Documentation for Crowd 1.4. Documentation for other versions of Crowd is available too.

Crowd comes with a number of supplied directory connectors. If your directory is not listed in Supported Applications and Directories then you will need to create your own custom directory connector.

Error rendering macro 'excerpt-include'

No link could be created for '2.2.3 Configuring a Custom Directory Connector'.

The directory connectors that come with Crowd implement the Java interface RemoteDirectory. The RemoteDirectory interface defines generic methods for authentication, searching and entity create, remove and update operations.

To connect Crowd to a custom directory server, you will need to write a Java class file that implements the RemoteDirectory interface.

In our example below, the MyCustomDirectoryServer class extends the Crowd DirectoryEntity utility class. The utility class manages setting runtime properties that may be used by the Crowd server in the future for operations such as getting the Crowd ID number of the directory server.

package com.atlassian.crowd.integration.directory.custom;

import com.atlassian.crowd.integration.SearchContext;
import com.atlassian.crowd.integration.authentication.PasswordCredential;
import com.atlassian.crowd.integration.directory.RemoteDirectory;
import com.atlassian.crowd.integration.exception.*;
import com.atlassian.crowd.integration.model.DirectoryEntity;
import com.atlassian.crowd.integration.model.RemoteGroup;
import com.atlassian.crowd.integration.model.RemotePrincipal;
import com.atlassian.crowd.integration.model.RemoteRole;

import java.rmi.RemoteException;
import java.util.List;

public class MyCustomDirectoryServer extends DirectoryEntity implements RemoteDirectory
{
    public RemotePrincipal authenticate(String name, PasswordCredential[] credentials) throws RemoteException, 
            InvalidPrincipalException, InactiveAccountException, InvalidAuthenticationException {
        // Perform your custom directory server authentication code here.
        // 
        // The source code to the InternalDirectory, which comes with your commercial license is a good implementation example.
    }

    // Other RemoteDirectory interface methods will also need to be implemented ...
}

Once you have finished implementing all of the methods defined by the RemoteDirectory interface, you will then need to:

  1. Create a JAR of the MyCustomDirectoryServer and any supporting class files.
  2. Shut down Crowd.
  3. Place the newly-created JAR from step one in the CROWD/crowd-webapp/WEB-INF/lib folder.
  4. Start Crowd.
  5. Follow the instructions on configuring a custom directory connector through the Crowd Administration Console.

A 'principal' is a 'user'

In Crowd, the term 'principal' is equivalent to the term 'user'. In Crowd 1.3.0 and later, the Crowd Administration Console uses the term 'user'. Earlier versions of Crowd, and also certain API libraries, use the term 'principal'.

次のステップ

After creating your directory connector, please see Configuring a Custom Directory Connector.

関連トピック

Crowd Documentation

  • ラベルなし