로날드님 안녕하세요 점점 더 많은 대학이 디스코urs 가족에 합류하는 것을 보니 정말 기쁩니다
흥미로운 문제를 겪고 계시네요! 제 SAML/SSO 관련 지식은 깊지 않아서 정확히 어떤 일이 일어나고 있는지 확신할 수 없지만, verbose sso logging 사이트 설정을 활성화해 보실 수 있을까요? /logs에서 유용한 오류 메시지를 확인할 수 있게 되어, 이 문제가 발생하는 이유를 파악하거나 여기서 공유할 수 있는 더 구체적인 정보를 얻을 수 있을 것 같습니다. 그러면 더 잘 도와드릴 수 있습니다.
SSO 로그를 verbose로 설정한 후 production.log에서 발견한 내용은 다음과 같습니다:
Started GET "/session/csrf" for <IP> at 2020-07-24 14:32:51 +0000
Processing by SessionController#csrf as JSON
Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 321)
Started POST "/auth/saml" for <IP> at 2020-07-24 14:32:51 +0000
(saml) Request phase initiated.
Started POST "/auth/saml/callback" for <IP> at 2020-07-24 14:33:23 +0000
(saml) Callback phase initiated.
Processing by Users::OmniauthCallbacksController#complete as HTML
Parameters: {"SAMLResponse"=>"<SNIP>", "provider"=>"saml"}
Redirected to https://discourse-imphys.tudelft.nl/
Completed 302 Found in 24ms (ActiveRecord: 0.0ms | Allocations: 10562)
Started GET "/" for <IP> at 2020-07-24 14:33:24 +0000
Processing by ListController#latest as HTML
Rendering list/list.erb within layouts/application
Rendered list/list.erb within layouts/application (Duration: 3.8ms | Allocations: 1991)
Rendered layouts/_head.html.erb (Duration: 1.9ms | Allocations: 911)
Rendered common/_discourse_stylesheet.html.erb (Duration: 0.4ms | Allocations: 267)
Rendered application/_header.html.erb (Duration: 2.2ms | Allocations: 1022)
Completed 200 OK in 34ms (Views: 13.1ms | ActiveRecord: 0.0ms | Allocations: 15963)
Started GET "/u/hp.json" for <IP> at 2020-07-24 14:33:24 +0000
Processing by UsersController#get_honeypot_value as JSON
Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 812)
Started GET "/u/check_username?username=&email=94422472fbfb32fdd22eaa2f88c723fb44be9958" for <IP> at 2020-07-24 14:33:25 +0000
Processing by UsersController#check_username as JSON
Parameters: {"username"=>"", "email"=>"94422472fbfb32fdd22eaa2f88c723fb44be9958"}
Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 316)
Started GET "/u/check_username?username=94422472fbfb32fdd22e&email=94422472fbfb32fdd22eaa2f88c723fb44be9958" for <IP> at 2020-07-24 14:33:25 +0000
Processing by UsersController#check_username as JSON
Parameters: {"username"=>"94422472fbfb32fdd22e", "email"=>"94422472fbfb32fdd22eaa2f88c723fb44be9958"}
Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 1421)
제3자의 확인을 통해 이러한 속성들이 실제로 IdP에서 전송되고 있음이 확인되었습니다. 하지만 어떤 이유에서인지 Discourse의 가입 양식(이전에 보여드린 바와 같이)에서 이러한 속성의 값들이 사용되지 않고 있습니다. 저는 양식에서 다음과 같이 매핑되기를 기대했습니다:
Email은 urn:mace:dir:attribute-def:mail의 값을,
Username은 urn:mace:dir:attribute-def:mail의 값을,
Name은 urn:mace:dir:attribute-def:displayName(권장) 또는 urn:mace:dir:attribute-def:cn의 값을 가질 것이라고 예상했습니다.
Discourse-SAML을 설정하여 이러한 속성을 올바르게 매핑할 수 있는 방법이 있을까요?