Alexander
(Alexander Barrios)
1
您好
!下午好,我有一个关于 OpenID Connect 插件的问题
我正在尝试使用 ID Uruguay(一个政府 OpenID Connect“提供商”)与 Discourse 集成,我注册了测试服务器,他们发送了必要的数据给我。
所有流程似乎都运行正常,除了回调,显然 JWT 中发送的 Issuer 与发现文档中的不符。
我已经联系了支持部门,他们说错误基本上是 Discourse 的(我不这么认为)。
是否可以为“ excepted issuer”添加另一个值?
发现文档:https://auth-testing.iduruguay.gub.uy/oidc/v1/.well-known/openid-configuration
日志
OIDC Log: Loaded JWT
---
iss: https://auth-testing.iduruguay.gub.uy/oidc/v1
sub: '7630'
aud: '862271'
exp: 1656363519
iat: 1656362919
auth_time: 1656362918
amr:
- urn:iduruguay:am:password
acr: urn:iduruguay:nid:1
nonce: 94d556d732db0db8dff0e09a174c27f2943cfe1740845abf537ff768e96c8ddf
at_hash: eokMw_xDlqb6cXB-DkDA_A
pais_documento:
codigo: uy
nombre: Uruguay
tipo_documento:
codigo: 68909
nombre: C.I.
numero_documento: '54682086'
email: alexander.barrios@estudiante.ceibal.edu.uy
email_verified: true
name: Yanquis Alexander Barrios Espíndola
given_name: Yanquis Alexander
family_name: Barrios Espíndola
nickname: uy-ci-54682086
idp: Usuario gub.uy
(oidc) Authentication failure! jwt_decode_failed: JWT::InvalidIssuerError, Invalid issuer. Expected ["https://auth-testing.iduruguay.gub.uy"], received https://auth-testing.iduruguay.gub.uy/oidc/v1
提前非常感谢! 
RGJ
(Richard - Communiteq)
2
嗯。
根据发现文档的位置,您需要假定颁发者是 https://auth-testing.iduruguay.gub.uy/oidc/v1,因为发现文档就是颁发者加上 /.well-known/openid-configuration。
现在文档本身说 issuer\t\"https://auth-testing.iduruguay.gub.uy\"
然后我们有 OpenID Connect Discovery 文档,其中规定:
而最后一句中的两个要求均未满足。iss 声明值与用于检索配置的颁发者 URL 相同,但两者均与返回的 issuer 值不相同。
所以,依我之见,我认为他们是错的,而你是对的。可惜这并不能让你走得更远。
3 个赞
Alexander
(Alexander Barrios)
3
很有趣,我不知道 
我已经报告了这个问题并链接了你的答案,我将等待 ID Uruguay 支持部门的回复
。
目前我正在使用一个包含正确签发者的 pastebin(无论如何,这只是为了测试),并且一切似乎都运行正常,我希望支持团队能在将 ID Uruguay 应用于生产模式之前解决这个细节。
2 个赞
Alexander
(Alexander Barrios)
5
好吧,我得到了答复,他们就是不修复它,“因为他们那边没有问题,而且它被广泛使用” 
我在文档中没有看到任何关于检查 JWT 的内容,所以这一定就是它“就是能用”的原因 
文档(谷歌翻译):
https://centroderecursos-agesic-gub-uy.translate.goog/web/seguridad/wiki/-/wiki/Main/ID+Uruguay+-+Integración+con+OpenID+Connect?_x_tr_sl=es&_x_tr_tl=en&_x_tr_hl=es&_x_tr_pto=wapp
我创建了一个“代理”proxy 来发现文档,它修改了返回的签发者,而且它也“就是能用”,我报告了这个问题,他们接受了 
我感觉将来这会失败,因为它不符合规范,但目前还可以。
感谢 Richard 花时间提供帮助! 
2 个赞
system
(system)
关闭
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.