Navigation Links Ten Minute Guide

Build Apache Fortress Core

Apache Fortress Core

This section provides instructions to install Fortress Core, setup usage with ApacheDS, and run the junit tests

Steps to complete:
  1. Set java and maven home env variables.

  2. Change directory:
                    

    cd directory-fortress-core/

  3. Copy build.properties.example in root folder of package, to build.properties.
                    

    cp build.properties.example build.properties

  4. Edit the build.properties in root folder of package. These parameters will be used to generate config artifacts: config/fortress.properties and ldap/setup/refreshLDAPData.xml, needed later on.
    Change the settings to:
                    

    # This points fortress to LDAP host. ldap.host=localhost ldap.port=10389 ldap.server.type=apacheds

  5. Build fortress core. This step will generate config artifacts using settings from build.properties.
                        

    mvn install

  6. Verify the following config artifacts were created by build as they are required later:
                        

    ls -l config/fortress.properties ls -l ldap/setup/refreshLDAPData.xml

  7. Load the Apache Fortress schema.

      Choose one option:

    1. Load the fortress schema contained in ldap/schema/apacheds-fortress.ldif to ApacheDS instance using command line.
                          

      ldapmodify -h localhost -p 10389 -D uid=admin,ou=system -w secret -a -f FORTRESS_HOME/ldap/schema/apacheds-fortress.ldif

    2. OR

    3. Load the fortress schema contained in ldap/schema/apacheds-fortress.ldif to ApacheDS instance using Apache Directory Studio.

      1. In Apache Directory Studio LDAP Browser perspective, select Root DSE, right-click, and choose Import->LDIF Import

      2. Schema Import


      3. Next a dialog box will appear where you can enter the fully qualified file name of the fortress schema.

      4. Schema Import 2


      5. The schema file is located under the fortress core base package/ldap/schema/apacheds-fortress.ldif

      6. Schema Import 3


      7. Verify success by viewing the cn=fortress schema node.

      8. Schema Import 4

  8. Setup partition in ApacheDS server matching ldap server params in config/fortress.properties file.

  9. Build the fortress LDAP DIT, create its config node and load the A/RBAC policies:
                        

    mvn install -Dload.file=./ldap/setup/refreshLDAPData.xml mvn install -Dload.file=./ldap/setup/DelegatedAdminManagerLoad.xml

  10. Run the Fortress Core Regression Tess:
                        

    mvn test -Dtest=FortressJUnitTest

    Tests should run with no errors.

  11. Run the Fortress Command Line Interface:
                        

    mvn test -Pcli

    This program provides a command line interface for driving the fortress APIs. It is useful for ad-hoc and automated updates to the data. It's instruction manual is here: Fortress CLI Instruction Manual

  12. Run the Fortress Console:
                        

    mvn test -Pconsole

    This program provides an interfactive console for driving the fortress functions. It is useful for testing and ad-hoc updates to the data.

Copyright 2003-2016, The Apache Software Foundation. All Rights Reserved.