Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

README-QUICKSTART for Apache Fortress Rest

  • version 2.0.3

Table of Contents

  • Document Overview
  • SECTION 1. Prerequisites
  • SECTION 2. Configure Tomcat and Deploy Fortress Rest
  • SECTION 3. Load Sample Security Policy
  • SECTION 4. Test
  • SECTION 5. Table with External Config Switches
  • SECTION 6. Sample Config

Document Overview

This document contains instructions to deploy a pre-built Apache Fortress Rest web archive (war) to Tomcat and configure the server for its use.

SECTION 1. Prerequisites

Minimum software requirements:

SECTION 2. Configure Tomcat and Deploy Fortress Rest

Set the java system properties in tomcat with the target ldap server's coordinates.

  1. Edit the startup script for Tomcat

  2. Set the java opts

a. For OpenLDAP:

JAVA_OPTS="-Dversion=2.0.3 -Dfortress.admin.user=cn=Manager,dc=example,dc=com -Dfortress.config.root=ou=Config,dc=example,dc=com"

b. For ApacheDS:

JAVA_OPTS="$JAVA_OPTS -Dfortress.admin.user=uid=admin,ou=system -Dfortress.config.root=ou=Config,dc=example,dc=com -Dfortress.port=10389"
  1. Verify these settings match your target LDAP server.

  2. Download the fortress realm proxy jar into tomcat/lib folder:

wget -P $TOMCAT_HOME/lib

where TOMCAT_HOME matches your target env.

  1. Download the fortress rest war into tomcat/webapps folder:
wget -P $TOMCAT_HOME/webapps

where TOMCAT_HOME matches your target env.

  1. Restart Tomcat.

SECTION 3. Load Sample Security Policy

From the fortress core package perform the following steps:

  1. Download the load file from git:
wget -P ldap/setup
  1. Run maven install with load file:
mvn install -Dload.file=ldap/setup/FortressRestServerPolicy.xml

Note: This step must be completed before tests can be successfully run.


  1. Smoke test:
mvn test -Dtest=EmTest
  1. Complete SECTION 7: Alternate testing procedures in Fortress Core

SECTION 5. Table with External Config Switches

Below is the list of Fortress config properties that can be set via Java System Property.

#NameSample Values
1fortress.hostlocalhost(default), myhostname,
2fortress.port389 (default), 636, 1389, 1636
11fortress.enable.ldap.sslfalse(default), true
12fortress.enable.ldap.starttlsfalse(default), true
13fortress.enable.ldap.ssl.debugfalse(default), true, true
19fortress.ldap.server.typeapacheds, openldap, other, true

SECTION 6. Sample Config

Setting Apache Fortress external configurations via Java System properties can be done using the startup scripts for the instance. For example the following are valid configurations.

a. Connect to an OpenLDAP over localhost, port 389 (defaults) using unencrypted connections. The runtime has ARBAC02 checks enabled.

JAVA_OPTS=" -Dversion=2.0.4-SNAPSHOT   \ 
           -Dfortress.admin.user=cn=Manager,dc=example,dc=com  \ 
           -Dfortress.config.root=ou=Config,dc=example,dc=com  \
           -Dfortress.ldap.server.type=openldap   \

b. The following will connect to ApacheDS over encrypted connection, truststore on the classpath.

JAVA_OPTS=" -Dversion=2.0.4-SNAPSHOT   \
           -Dfortress.ldap.server.type=apacheds   \             
           -Dfortress.admin.user=uid=admin,ou=system  \ 
           -Dfortress.config.root=ou=Config,dc=example,dc=com  \
           -Dfortress.enable.ldap.ssl=true"     \

c. This one OpenLDAP again, encrypted connections, truststore found on fully qualified path.

JAVA_OPTS=" -Dversion=2.0.4-SNAPSHOT   \
           -Dfortress.ldap.server.type=openldap   \             
           -Dfortress.admin.user=cn=Manager,dc=example,dc=com  \ 
           -Dfortress.config.root=ou=Config,dc=example,dc=com  \
           -Dfortress.enable.ldap.ssl=true"     \