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.
Fortress uses the following source property files to bootstrap configuration:
Which are used to produce new artifacts used by Fortress runtime:
Notice the substitution parameters, @name@, contained within the above config artifacts. These are used by an Ant config task to replace values into the actual target artifact using values found inside the source property files. Thus Fortress uses simple Apache Ant substitution to seed implementation specific variables, e.g. host names, ports, pw's, into its config artifacts used at runtime.
Fortress configuration artifacts are seeded using Ant property files.
The ant config task, init-fortress-config, uses the values found within the Ant property files to seed into the following targets:.
These fortress properties may be overridden at runtime by setting as Java System Properties:
The minimum system.properties to enable fortress apis to work:
If the ldap host and port are not localhost:389 set these two:
This subsystem has been hard wired to the following order:
Properties found in LDAP config node will override Java system properties which will override fortress.properties.
The general flow is the fortress.properties provide the coordinates to locate an ldap entry on a remote server. That file is found on the runtime classpath during startup. Some of its props may be overridden as Java system properties. The combination of Fortress and Java system properties are used to connect to remote ldap server and read its configuration entry where the remainder of Fortress' properties are stored.
The remote server node's dn is constructed from fortress.property values:
The above would be combined to create the dn: cn=Default, ou=Config, [whatever the @SUFFIX@ is]
When reinitialization of properties is needed, to the ldap config node or the DIT itself, re-run this command:
# mvn install
Followed by A:
mvn install -Dload.file=./ldap/setup/refreshLDAPData.xml
mvn install -Dload.file=./ldap/setup/ConfigNodeUpdate.xml
A refreshes the entire LDAP server DIT, deletes of all entries under the suffix, recreating the DIT node structure, and re-adding of the config node. B just updates the config node with the new values, preserving the other data.