问题描述
我在构建认证请求时,断言的回调地址assertionConsumerServiceUrl,如果域名带‘-’(比如https://auth-b.abc.com),认证会报“未知错误”。 这个是bug?还是我需要对回调地址做一些特殊编码处理?
我在构建认证请求时,断言的回调地址assertionConsumerServiceUrl,如果域名带‘-’(比如https://auth-b.abc.com),认证会报“未知错误”。 这个是bug?还是我需要对回调地址做一些特殊编码处理?
可以把报错信息贴一下,特别是 requestId 和 errorId
message: 未知错误
error_id: 04719d47-b3dc-4194-8041-93820a1d8fc0
request_id: f8ba3550-4156-4d61-b47c-8e1a52e1f3d8
现在发现域名:https://pdemo.dsphere.com.cn 报如下错误
error_id: cc24ec37-8840-4b20-aada-5a4e628ce123
status_code: 400
message: SAML Request 格式无效:Cannot read property ‘attributes’ of null
request_id: 8a14008c-f2bd-4e6b-8c48-e310b50e4be0
但如果回调域名改为:https://pdemo.dsphere.com.cn:1112。则能成功
发起 SAML 请求时的 SAMLRequest 也发一份哈, 我们排查是解析出来有乱码
以下域名:https://pdemo.dsphere.com.cn
https://ovehj9vny27v.authing.cn/api/v2/saml-idp/66c3fb9318e9ea7e37da2dc5?SAMLRequest=PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c2FtbDJwOkF1dGhuUmVxdWVzdCB4bWxuczpzYW1sMnA9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpwcm90b2NvbCIgQXNzZXJ0aW9uQ29uc3VtZXJTZXJ2aWNlVVJMPSJodHRwczovL3BkZW1vLmRzcGhlcmUuY29tLmNuL2F1dGgvYXBpL3YxL2F1dGgvc3NvL3NhbWwvbG9naW4iIERlc3RpbmF0aW9uPSJodHRwczovL292ZWhqOXZueTI3di5hdXRoaW5nLmNuL2FwaS92Mi9zYW1sLWlkcC82NmMzZmI5MzE4ZTllYTdlMzdkYTJkYzUiIEZvcmNlQXV0aG49ImZhbHNlIiBJRD0iYWVhODRkMWM1MzMxNGUxZjhlM2NiYTA1OTYxMmZiNzYiIElzUG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