英文:
Matrix-synapse doesn't retrieve CAS attributes
问题
Matrix-Synapse使用CAS进行SSO时出现问题。
Synapse未检索到CAS属性 synapse.handlers.sso - 1262 - INFO - GET-50 - SSO attribute missing
。
但CAS发送了这些属性,我可以通过同一服务器上的PHP脚本检索到它们。
我无法确定问题出在哪里,是CAS Python库的问题,CAS协议配置的问题还是其他什么问题?
我已经修改了/opt/venvs/matrix-synapse/lib/python3.9/site-packages/synapse/handlers/cas.py
以记录CAS响应,以下是我收到的内容:
<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
<cas:authenticationSuccess>
<cas:user>MYUSER</cas:user>
</cas:authenticationSuccess>
</cas:serviceResponse>
信息:
- 平台:KVM / Debian 11
- Synapse版本:1.85.0
- 安装方法:从packages.matrix.org的Debian软件包
- 数据库:PostgreSQL
- 工作进程:单进程
英文:
I have a problem on Matrix-Synapse with the SSO using CAS.
Synapse doesn't retrieve CAS attributes synapse.handlers.sso - 1262 - INFO - GET-50 - SSO attribute missing
.
But CAS sends the attributes and I can retrieve them with a PHP script on the same server.
I can't figure out where it's coming from, CAS Python library problem or CAS protocol configuration problem or anything else ?
I've modified /opt/venvs/matrix-synapse/lib/python3.9/site-packages/synapse/handlers/cas.py
to log the CAS response, here's what I get back:
<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
<cas:authenticationSuccess>
<cas:user>MYUSER</cas:user>
</cas:authenticationSuccess>
</cas:serviceResponse>
Informations :
- Platform : KVM / Debian 11
- Synapse Version : 1.85.0
- Installation Method : Debian packages from packages.matrix.org
- Database : PostgreSQL
- Workers : Single process
答案1
得分: 0
这是Synapse源代码中的问题,它使用硬编码的协议版本2的URL。
我在Synapse存储库上提出了一个拉取请求,以便您可以在homeserver.yaml中设置CAS协议版本:
https://github.com/matrix-org/synapse/pull/15816
英文:
This is a problem in synapse source code which uses hard coded protocol version 2 url.
I proposed a pull request on the Synapse repository so you can set the CAS protocol version in homeserver.yaml :
https://github.com/matrix-org/synapse/pull/15816
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论