Creating and implementing a new Security Manager

The Component SDK includes a batch script for creating a new Security Manager.

To create a new Security Manager project:

  1. From a command prompt, change to the components/endeca-extensions directory in the Component SDK.
  2. Run the appropriate version of the create-bddsecuritymanager command.

    For Linux:

    ./create-bddsecuritymanager.sh <securityManagerName>

    For Windows:

    create-bddsecuritymanager.bat <securityManagerName>

    Where <securityManagerName> is the name you want to use for the security manager. For example:

    ./create-bddsecuritymanager.sh restrict-region-data

    The name cannot have spaces.

    This command creates a <securityManagerName> directory in bddsecuritymanager.

    This directory is an Eclipse project that you can import directly into Eclipse.

    It also contains a sample implementation that can help you understand how the Security Manager is used.

    Note: The sample implementation illustrates one way to use the API. The sample is not intended to provide a recommended design pattern for a production application.
  3. Your Security Manager must implement the applySecurity method.
    public void applySecurity(PortletRequest request, MDEXState mdexState, Query query) throws BddSecurityException;

    The Query class in this signature is com.endeca.portal.data.Query. This class provides a simple wrapper around a Conversation Service request.