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
http://www.apache.org/licenses/LICENSE-2.0
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.
This document contains instructions to deploy a pre-built Apache Fortress Rest web archive (war) to Tomcat and configure the server for its use.
Minimum software requirements:
Set the java system properties in tomcat with the target ldap server's coordinates.
Edit the startup script for Tomcat
Set the java opts
a. For OpenLDAP:
JAVA_OPTS="-Dversion=2.0.1 -Dfortress.admin.user=cn=Manager,dc=example,dc=com -Dfortress.admin.pw=secret -Dfortress.config.root=ou=Config,dc=example,dc=com"
b. For ApacheDS:
JAVA_OPTS="$JAVA_OPTS -Dfortress.admin.user=uid=admin,ou=system -Dfortress.admin.pw=secret -Dfortress.config.root=ou=Config,dc=example,dc=com -Dfortress.port=10389"
Verify these settings match your target LDAP server.
Download the fortress realm proxy jar into tomcat/lib folder:
wget http://repo.maven.apache.org/maven2/org/apache/directory/fortress/fortress-realm-proxy/2.0.1/fortress-realm-proxy-2.0.1.jar -P $TOMCAT_HOME/lib
where TOMCAT_HOME matches your target env.
wget http://repo.maven.apache.org/maven2/org/apache/directory/fortress/fortress-rest/2.0.1/fortress-rest-2.0.1.war -P $TOMCAT_HOME/webapps
where TOMCAT_HOME matches your target env.
From the fortress core package perform the following steps:
wget https://github.com/apache/directory-fortress-enmasse/blob/master/src/main/resources/FortressRestServerPolicy.xml -P ldap/setup
mvn install -Dload.file=ldap/setup/FortressRestServerPolicy.xml
Note: This step must be completed before tests can be successfully run.
mvn test -Dtest=EmTest