docker - OpenAM:Web 策略代理登录到 OpenAM 失败
问题描述
我无法确定错误来源。我检查了数十次设置,尝试了本地和公共 IP,甚至尝试使用不同的 Web 代理版本,并且阅读了我能找到的关于该主题的所有内容(至少感觉是这样)。
问:为什么我的 Web Agent 无法登录 OpenAM?
初始情况:我有两个 docker 容器。第一个是使用 OpenAM 运行 Tomcat 服务器,第二个是运行 Apache 网络服务器。两个容器都部署在两个不同的虚拟机上。两台机器可以通过它们的公共 IP 和私有 IP 相互访问,并且在 docker-compose 文件中设置了“network_mode: host”。
按照这个官方指南,我使用 AM 控制台创建了一个代理配置文件,其规格如下:
- 代理 ID:WebAgent
- 代理网址:
http://<public_ip_apache_server>:80
- 服务器网址:
http://<public_ip_openam_server>:8080/openam
- 密码:密码
在运行 Apache 网络服务器的容器中,我执行以下操作:
- 停止 apache 网络服务器。
- 安装 OpenSSL。
- 导出
/<path>/libcrypto.so
和/<path>/libssl.so
到LD_LIBRARY_PATH
. - 确保 libc.so.6 可用,并且通过
strings libc.so.6 | grep GLIBC_2
在/usr/lib/x86_64-linux-gnu/
. - 通过创建密码文件,
echo password > /tmp/pwd.txt
后跟chmod 400 /tmp/pwd.txt
. - 为 Web 代理运行配置命令:
/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
系统和软件:
- OpenAM 版本:14.5.4
- 运行 Apache Webserver 的容器:x86_64 系统、Debian
- 阿帕奇版本:2.4.46
- Web 策略代理:平台 = Apache,平台版本 = 2.4,操作系统 = Linux,架构 = 64 位,平台版本 = 5.6,版本 = 5.6.2.0
- OpenSSL 版本:v1.1
解决方案
您使用的是 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
推荐阅读
- javascript - TypeError:this.state.userInfo.map 不是函数
- c# - C# 字符串长度
- c# - 解析json时如何准确获取时间
- javascript - Axios 和 SuperAgent 库有什么区别?
- ruby-on-rails - 建立关联时未定义的方法
- android - 在 Android Studio 中更改项目的“buildToolsVersion”时出错
- c++ - 包含来自另一个文件的函数会导致范围错误 (openFoam)
- php - 将信息更新到 MySQL 数据库,但每个员工的部门保持不变
- c++ - 创建二维整数数组,将使用两个函数用随机数填充矩阵。我做错了什么?
- python-3.x - 在张量流中批量处理大量数据