首页 > 解决方案 > OpenAM:Web 策略代理登录到 OpenAM 失败

问题描述

我无法确定错误来源。我检查了数十次设置,尝试了本地和公共 IP,甚至尝试使用不同的 Web 代理版本,并且阅读了我能找到的关于该主题的所有内容(至少感觉是这样)。

问:为什么我的 Web Agent 无法登录 OpenAM?

初始情况:我有两个 docker 容器。第一个是使用 OpenAM 运行 Tomcat 服务器,第二个是运行 Apache 网络服务器。两个容器都部署在两个不同的虚拟机上。两台机器可以通过它们的公共 IP 和私有 IP 相互访问,并且在 docker-compose 文件中设置了“network_mode: host”。

按照这个官方指南,我使用 AM 控制台创建了一个代理配置文件,其规格如下:

在运行 Apache 网络服务器的容器中,我执行以下操作:

/apache24_agent/bin/agentadmin --s "/usr/local/apache2/conf/httpd.conf" \ 
"http://<public_ip_openam_server>:8080/openam" "http://<public_ip_apache_server>:80" "/" \
"WebAgent" "/tmp/pwd.txt" --changeOwner --acceptLicence

问题:

最后一个命令总是失败并显示以下输出:

OpenAM Web Agent for Apache Server installation.
Validating...
Error validating OpenAM - Agent configuration.
Installation failed.
See installation log /usr/local/apache2/apache24_agent/bin/../log/install_20201227114136.log file for more details. Exiting.

检查错误日志:

2020-12-27 11:41:36  license accepted with --acceptLicence option
2020-12-27 11:41:36  license was accepted earlier
2020-12-27 11:41:36  Found user daemon, uid 1, gid 1
2020-12-27 11:41:36  Found group daemon, gid 1
2020-12-27 11:41:36  OpenSSL library status: <removed for readbility> OpenSSL v1.1.x library support is available
2020-12-27 11:41:36  validating configuration parameters...
2020-12-27 11:41:36  error validating OpenAM agent configuration
agent login to http://<public_ip_openam_server>:8080/openam fails
2020-12-27 11:41:36  installation error
2020-12-27 11:41:36  installation exit

系统和软件:

标签: dockeropenam

解决方案


您使用的是 Open Identity Platform 社区版吗?恐怕 Web Agent 5.6.2.0 和 OpenAM 14.5.4 可能不兼容。尝试使用较早的 Web 代理版本,例如 4.1.1,或切换到 OpenIG 作为 Web 代理的替代方案。下面有几个有用的链接:

https://github.com/OpenIdentityPlatform/OpenAM/wiki/Quick-Start-Guide

https://github.com/OpenIdentityPlatform/OpenAM/wiki/How-to-Add-Authorization-and-Protect-Your-Application-With-OpenAM-and-OpenIG-Stack


推荐阅读