Skip to content

Commit 7f58410

Browse files
committed
Update J2EE Agent Jetty installation docs
1 parent 816c0f0 commit 7f58410

File tree

2 files changed

+53
-155
lines changed

2 files changed

+53
-155
lines changed

openam-documentation/openam-doc-source/src/main/asciidoc/jee-users-guide/chap-apache-tomcat.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ You must install Apache Tomcat before you install the policy agent, and you must
3434
3535
All of the Tomcat scripts must be present in `$CATALINA_HOME/bin`. The Tomcat Windows executable installer does not include the scripts, for example. If the scripts are not present in your installation, copy the contents of the `bin` directory from a .zip download of Tomcat of the same version as the one you installed.
3636
37-
You must install a supported version of the Java runtime environment. Set the `JAVA_HOME` environment variable accordingly. The policy agent installer requires Java.
37+
You must install a supported version of the Java runtime environment. Set the `JAVA_HOME` environment variable accordingly. The policy agent requires Java.
3838
3939
[source, console]
4040
----
@@ -157,7 +157,7 @@ If the agent is in a different domain than the server, refer to the __Administra
157157
======
158158
159159
--
160-
160+
+
161161
. If your policy agent configuration is not in the top-level realm (/), then you must edit config/OpenSSOAgentBootstrap.properties to identify the sub-realm that has your policy agent configuration. Find com.sun.identity.agents.config.organization.name and change the "/" to the path to your policy agent profile. This allows the policy agent to properly identify itself to the OpenAM server.
162162
163163
. If you want to protect all applications in the container, you must add a filter manually for each protected application's `WEB-INF/web.xml` deployment descriptor file, following the opening <web-app> tag. Make sure that the agent filter is first in the filter chain:

openam-documentation/openam-doc-source/src/main/asciidoc/jee-users-guide/chap-jetty.adoc

Lines changed: 51 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
information: "Portions copyright [year] [name of copyright owner]".
1313

1414
Copyright 2017 ForgeRock AS.
15-
Portions Copyright 2024 3A Systems LLC.
15+
Portions Copyright 2024-2025 3A Systems LLC.
1616
////
1717
1818
:figure-caption!:
@@ -32,65 +32,31 @@ Make sure OpenAM is installed and running, and that you can contact OpenAM from
3232
3333
You must install Jetty before you install the policy agent, and you must stop the server during installation.
3434
35-
You must install a supported version of the Java runtime environment. Set the `JAVA_HOME` environment variable accordingly. The policy agent installer requires Java.
35+
You must install a supported version of the Java runtime environment. Set the `JAVA_HOME` environment variable accordingly. The policy agent requires Java.
3636
3737
[source, console]
3838
----
3939
$ echo $JAVA_HOME
4040
/path/to/java
4141
----
42-
See the OpenAM __Installation Guide__ section, link:../../../openam/13/install-guide/#download-openam-software[Obtaining OpenAM Software, window=\_blank] to determine which version of the agent to download, and download the agent. Also verify the checksum of the file you download against the checksum posted on the download page.
42+
Download the agent distribution of the J2EE Agent from link:https://github.com/OpenIdentityPlatform/OpenAM-JEE-Agents/releases/[GitHub, window=\_blank].
43+
Also verify the checksum of the file you download against the checksum posted on the download page.
4344
44-
[NOTE]
45-
====
46-
Command line examples in this chapter show Jetty accessed remotely. If you are following the examples and have issues accessing Jetty remotely, you might have to change filter settings in the deployment descriptor file, such as `/path/to/jetty/webapps/test/WEB-INF/web.xml`, as shown in the following example:
47-
48-
[source, xml]
49-
----
50-
<filter>
51-
<filter-name>TestFilter</filter-name>
52-
<filter-class>com.acme.TestFilter</filter-class>
53-
<init-param>
54-
<param-name>remote</param-name>
55-
<param-value>true</param-value> <!-- default: false -->
56-
</init-param>
57-
</filter>
58-
----
59-
====
6045
Unzip the file in the directory where you plan to install the J2EE policy agent. The agent you install stores its configuration and logs under this directory.
6146
62-
When you unzip the policy agent, you find the following directories under the `j2ee_agents/jetty_v61_agent` directory.
47+
When you unzip the policy agent, you find the following files and directories under the `jee-agent-uberjar` or `jee-agent-jar-with-lib` directory.
6348
6449
Despite the directory name, the policy agent supports multiple container versions.
6550
--
6651
67-
`bin`::
68-
The installation and configuration program `agentadmin`. For more details about the available command-line tools, see xref:tools-reference.adoc#tools-reference[Command-Line Tool Reference].
69-
70-
`config`::
71-
Configuration templates used by the `agentadmin` command during installation
52+
`agent.jar`::
53+
The policy agent JAR file itself.
7254
73-
`data`::
74-
Not used
75-
76-
`etc`::
77-
Configuration templates used during installation
78-
79-
`installer-logs`::
80-
Location for log files written during installation
81-
82-
`legal-notices`::
83-
Contains licensing information including third-party licenses
84-
85-
`lib`::
86-
Shared libraries used by the Java EE policy agent
87-
88-
`locale`::
89-
Property files used by the installation program
90-
91-
`README`::
92-
README file containing platform and install information for the agent
55+
`agent-lib`::
56+
For the `jar-with-lib` distribution. Contains external libraries that the agent needs to run.
9357
58+
`agent-locale`::
59+
Locale files and templates
9460
--
9561
9662
@@ -133,123 +99,65 @@ In centralized configuration mode, the Agent URL is used to populate the Agent P
13399
134100
====
135101
136-
[#d0e5817]
137-
.To Create a Password File
138-
====
139-
140-
. Create a text file containing only the password specified when creating the agent profile.
141-
+
142-
UNIX example:
143-
+
144-
145-
[source, console]
146-
----
147-
$ echo password > /tmp/pwd.txt
148-
----
149-
+
150-
Windows example:
151-
+
152-
153-
[source, console]
154-
----
155-
C:\> echo password > pwd.txt
156-
----
157-
158-
. Protect the password file you create as appropriate for your operating system:
159-
+
160-
UNIX example:
161-
+
162-
163-
[source, console]
164-
----
165-
$ chmod 400 /tmp/pwd.txt
166-
----
167-
+
168-
Windows example:
169-
+
170-
In Windows Explorer, right-click the created password file, for example `pwd.txt`, select Read-Only, and then click OK.
171102
172-
====
173103
174104
[#install-agent-into-jetty]
175105
.To Install the Policy Agent into Jetty
176106
====
177107
178108
. Shut down the Jetty server where you plan to install the agent.
179109
180-
. Make sure OpenAM is running.
181-
182-
. Run `agentadmin --install` to install the agent.
183-
+
184-
When you run the command, you will be prompted to read and accept the software license agreement for the agent installation. You can suppress the license agreement prompt by including the `--acceptLicence` parameter. The inclusion of the option indicates that you have read and accepted the terms stated in the license. To view the license agreement, open `<server-root>/legal-notices/license.txt`.
110+
. Create the Agent configuration files
185111
+
112+
--
113+
`debugconfig.properties`:
186114
187-
[source, console]
115+
[source, properties]
188116
----
189-
$ /path/to/j2ee_agents/jetty_v61_agent/bin/agentadmin --install --acceptLicense
190-
...
191-
-----------------------------------------------
192-
SUMMARY OF YOUR RESPONSES
193-
-----------------------------------------------
194-
Jetty Server Config Directory : /path/to/jetty/etc
195-
OpenAM server URL : http://openam.example.com:8080/openam
196-
Jetty installation directory. : /path/to/jetty
197-
Agent URL : http://www.example.com:8080/agentapp
198-
Agent Profile name : Jetty Agent
199-
Agent Profile Password file name : /tmp/pwd.txt
117+
org.forgerock.openam.debug.prefix=
118+
org.forgerock.openam.debug.suffix=
119+
org.forgerock.openam.debug.rotation=
120+
----
121+
and
200122
201-
...
202-
SUMMARY OF AGENT INSTALLATION
203-
-----------------------------
204-
Agent instance name: Agent_001
205-
Agent Bootstrap file location:
206-
/path/to/j2ee_agents/jetty_v61_agent/Agent_001/config/
207-
OpenSSOAgentBootstrap.properties
208-
Agent Configuration file location
209-
/path/to/j2ee_agents/jetty_v61_agent/Agent_001/config/
210-
OpenSSOAgentConfiguration.properties
211-
Agent Audit directory location:
212-
/path/to/j2ee_agents/jetty_v61_agent/Agent_001/logs/audit
213-
Agent Debug directory location:
214-
/path/to/j2ee_agents/jetty_v61_agent/Agent_001/logs/debug
215-
216-
217-
Install log file location:
218-
/path/to/j2ee_agents/jetty_v61_agent/installer-logs/audit/install.log
219-
...
123+
`OpenSSOAgentBootstrap.properties`:
124+
[source, properties]
220125
----
221-
+
222-
Upon successful completion, the installer updates Jetty's `start.jar` to reference the agent, sets up the agent web application, and also sets up configuration and log directories for the agent.
223-
+
126+
com.iplanet.am.naming.url=http://openam.example.org:8080/openam/namingservice
127+
com.sun.identity.agents.config.service.resolver=org.openidentityplatform.identity.agents.GenericAgentServiceResolver
128+
com.sun.identity.agents.app.username=amadmin
129+
com.iplanet.am.service.secret = AQIC5wM2LY4SfcwrWIPia7mlGbsTreZGLWhi
130+
am.encryption.pwd = KmhUnWR1MYWDYW4xuqdF5nbm+CXIyOVt
131+
com.sun.identity.agents.config.profilename=myAgent
132+
133+
com.iplanet.services.debug.level=message
134+
com.iplanet.services.debug.directory=/path/to/j2ee_agents/Agent_001/logs/debug
135+
com.sun.services.debug.mergeall=on
136+
com.sun.identity.agents.config.local.logfile=/path/to/j2ee_agents/Agent_001/logs/debug/debug.out
137+
com.sun.identity.agents.config.organization.name=/
138+
com.sun.identity.agents.config.lock.enable=false
139+
140+
com.iplanet.am.server.protocol=http
141+
com.iplanet.am.server.host=openam.example.org
142+
com.iplanet.am.server.port=8080
143+
com.iplanet.am.services.deploymentDescriptor=/openam
144+
----
145+
146+
Adjust configuration parameters to your needs according to xref:./chap-jee-agent-config.adoc#configure-j2ee-policy-agent[Configuring Java EE Policy Agent Properties]
224147
225148
[NOTE]
226149
======
227-
If the agent is in a different domain than the server, refer to __Administration Guide__ procedure, link:../../../openam/13/admin-guide/#chap-cdsso[Configuring Cross-Domain Single Sign On, window=\_blank].
150+
If the agent is in a different domain than the server, refer to the __Administration Guide__ procedure, link:../../../openam/admin-guide/chap-cdsso[Configuring Cross-Domain Single Sign On, window=\_blank].
228151
======
229-
230-
. Take note of the configuration files and log locations.
231-
+
232-
Each agent instance that you install on the system has its own numbered configuration and logs directory. The first agent's configuration and logs are thus located under the directory `j2ee_agents/jetty_v61_agent/Agent_001/`:
233-
+
234152
--
153+
. If your policy agent configuration is not in the top-level realm (/), then you must edit config/OpenSSOAgentBootstrap.properties to identify the sub-realm that has your policy agent configuration. Find com.sun.identity.agents.config.organization.name and change the "/" to the path to your policy agent profile. This allows the policy agent to properly identify itself to the OpenAM server.
235154
236-
`config/OpenSSOAgentBootstrap.properties`::
237-
Used to bootstrap the Java EE policy agent, allowing the agent to connect to OpenAM and download its configuration.
238-
239-
`config/OpenSSOAgentConfiguration.properties`::
240-
Only used if you configured the Java EE policy agent to use local configuration.
241-
242-
`logs/audit/`::
243-
Operational audit log directory, only used if remote logging to OpenAM is disabled.
244-
245-
`logs/debug/`::
246-
Debug directory where the `debug.out` debug file resides. Useful in troubleshooting policy agent issues.
247-
248-
--
155+
. If you want to protect all applications in the container, you must add a filter manually for each protected application's `WEB-INF/web.xml` deployment descriptor file, following the opening <web-app> tag. Make sure that the agent filter is first in the filter chain:
156+
+
249157
250-
. If your policy agent configuration is not in the top-level realm (/), then you must edit config/OpenSSOAgentBootstrap.properties to identify the sub-realm that has your policy agent configuration. Find com.sun.identity.agents.config.organization.name and change the / to the path to your policy agent profile. This allows the policy agent to properly identify itself to the OpenAM server.
158+
Add the `agent.jar` file to the Jetty's `resources` directory and contents of the `agent-lib` directory, for `jee-agent-jar-with-lib` distribution, and contents of the `agent-locale` to the Jetty's `resources` directory.
251159
252-
. To protect a web application, you must add the following filter to the application's `WEB-INF/web.xml` deployment descriptor, following the opening <web-app> tag.
160+
Add filter to the Jetty's `etc/webdefault.xml` configuration file:
253161
+
254162
255163
[source, xml]
@@ -286,20 +194,10 @@ $ cd /path/to/jetty ; java -jar start.jar
286194
287195
====
288196
289-
290-
[#silent-jetty-agent-installation]
291-
=== Silent Jetty Policy Agent Installation
292-
293-
When performing a scripted, silent installation, use `agentadmin --acceptLicense --saveResponse response-file` to create a response file for scripted installation. Then install silently using `agentadmin --install --acceptLicense --useResponse response-file`.
294-
295-
296197
[#uninstall-jetty-agent]
297198
=== Removing Jetty Policy Agent Software
298199
299-
Shut down the Jetty server before you uninstall the policy agent.
300-
301-
To remove the Java EE policy agent, use `agentadmin --uninstall`. You must provide the Jetty configuration directory location.
302-
303-
Uninstall does not remove the agent instance directory, but you can do so manually after removing the agent configuration from Jetty.
200+
. Remove agent files from the Jetty's `lib` and `resources` directories.
201+
. Remove the Agent filter from the Jetty's `etc/webdefault.xml` configuration file
304202
305203

0 commit comments

Comments
 (0)