Matrix-synapse不检索CAS属性。

huangapple go评论71阅读模式
英文:

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:

&lt;cas:serviceResponse xmlns:cas=&#39;http://www.yale.edu/tp/cas&#39;&gt;
    &lt;cas:authenticationSuccess&gt;
        &lt;cas:user&gt;MYUSER&lt;/cas:user&gt;
    &lt;/cas:authenticationSuccess&gt;
&lt;/cas:serviceResponse&gt;

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

huangapple
  • 本文由 发表于 2023年6月19日 20:26:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/76506616.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定