OpenIdentityPlatform / OpenAM-JEE-Agents

OpenAM Java EE Policy Agents is an OpenAM add-on component that functions as a Policy Enforcement Point (PEP) for applications deployed on a Java EE-based servlet container or application server. The policy agent protects web-based applications and implements single sign-on (SSO) capabilities for the applications deployed in the container.
Other
6 stars 13 forks source link

Is tomcat 9 supported? #15

Closed samene closed 10 months ago

samene commented 3 years ago

`[08/30/2021 08:26:20:062 BST] TomcatVersionValidator.getTomcatVersion() - validating ServerInfo:Server version: Apache Tomcat/9.0.41 Server built: Dec 3 2020 11:43:00 UTC Server number: 9.0.41.0 OS Name: Linux OS Version: 3.10.0-1160.el7.x86_64 Architecture: amd64 JVM Version: 1.8.0_152-b16 JVM Vendor: Azul Systems, Inc.

[08/30/2021 08:26:20:062 BST] TomcatVersionValidator.getTomcatVersion() - version:9.0.41.0 found version: null [08/30/2021 08:26:20:062 BST] OpenAM Tomcat Agent does not support this tomcat server version [08/30/2021 08:26:20:062 BST] Interaction failed to continue since one or more of the validators failed. [08/30/2021 08:26:20:062 BST] InstallHandler: Failed to process install request [ProductInstallException Stack] com.sun.identity.install.tools.configurator.InstallException: Invalid directory specified for the $CATALINA_HOME environment variable at com.sun.identity.install.tools.configurator.UserDataInteraction.interactSilent(UserDataInteraction.java:114) at com.sun.identity.install.tools.configurator.InteractionsRunnerBase.runInteraction(InteractionsRunnerBase.java:157) at com.sun.identity.install.tools.configurator.InteractionsRunnerBase.runInteractions(InteractionsRunnerBase.java:96) at com.sun.identity.install.tools.configurator.Driver.executeInstanceInteractions(Driver.java:132) at com.sun.identity.install.tools.configurator.Driver.executeAllInteractions(Driver.java:76) at com.sun.identity.install.tools.configurator.InstallDriver.install(InstallDriver.java:82) at com.sun.identity.install.tools.handler.InstallHandler.handleRequest(InstallHandler.java:75) at com.sun.identity.install.tools.admin.AdminTool.dispatch(AdminTool.java:232) at com.sun.identity.install.tools.admin.AdminTool.run(AdminTool.java:135) at com.sun.identity.install.tools.launch.AdminToolLauncher.launchAdminTool(AdminToolLauncher.java:201) at com.sun.identity.install.tools.launch.AdminToolLauncher.main(AdminToolLauncher.java:295) [08/30/2021 08:26:20:064 BST] Exiting with code: 0 `

deftdawg commented 2 years ago

Invalid directory specified for the $CATALINA_HOME environment variable

Looks like it failed to install whatever it was trying because you didn't set CATALINA_HOME in the env

starkgate commented 1 year ago

I tried running the agentAdmin without --useResponse:

/opt/j2ee_agents/tomcat_v6_agent/bin/agentadmin --install --acceptLicense

This prompts the tool to ask for the environment variables it usually gets from the response.txt file, and gives a bit more debugging information. The issue here is that Tomcat 9 is simply not supported: OpenAM Tomcat Agent does not support this tomcat server version.

Complete log:

************************************************************************
Welcome to the OpenAM Policy Agent for Apache Tomcat 6.0 Servlet/JSP
Container

************************************************************************

...

$CATALINA_HOME environment variable is the root of the tomcat
installation.
[ ? : Help, < : Back, ! : Exit ]
Enter the $CATALINA_HOME environment variable: /opt/liferay/tomcat-9.0.73

Invalid directory specified for the $CATALINA_HOME environment variable
OpenAM Tomcat Agent does not support this tomcat server version

$CATALINA_HOME environment variable is the root of the tomcat
installation.
[ ? : Help, < : Back, ! : Exit ]
Enter the $CATALINA_HOME environment variable: 
FireBurn commented 1 year ago

Looking at the code, no

But it could be added by following what was done for 8.5

https://github.com/OpenIdentityPlatform/OpenAM-JEE-Agents/commit/b822ac91b9e49462fe12b3ca99dbc3bdc1839b8f

lscorcia commented 11 months ago

It is supported now, but you have to build the project yourself, there's no release yet. We are using it in production with no issues.

vharseko commented 10 months ago

https://github.com/OpenIdentityPlatform/OpenAM-JEE-Agents/suites/17878425269/artifacts/1026386984