SAML with pingfederate


(Jay Pfaffman) #1

I’m helping someone get SAML configured with PingFederate.

SAML GitHub - discourse/discourse-saml: Support for SAML in Discourse plugin is installed and configured.

  1. User goes to forum login page: https://discuss.myforumnamehere.org/login
  2. User clicks to log in with “SSO with SAML”
  3. SSO does not happen. User is brought back to the very same login page.

When I visit the DISCOURSE_SAML_TARGET_URL in my browser, I get the login screen, so it would seem that we should be getting the login screen, but instead we’re immediately redirected to the Discourse login page.

By checking the production.log, the following error can be found (full log is shown below)

Filter chain halted as :redirect_to_login_if_required rendered or redirected
Started GET "/login.html?_=1525295104063" for [my_IP_Address] at 2018-05-02 21:05:04 +0000

Processing by StaticController#show as HTML
  Parameters: {"_"=>"1525295104063", "id"=>"login"}
  Rendering static/login.html.erb
  Rendered static/login.html.erb (29.8ms)
Completed 200 OK in 32ms (Views: 30.6ms | ActiveRecord: 7.4ms)
Started GET "/discourse_saml" for [my_IP_Address] at 2018-05-02 21:05:07 +0000
Processing by DiscourseSaml::DiscourseSamlController#index as HTML
Redirected to https://discuss.myforumnamehere.org/login
Filter chain halted as :redirect_to_login_if_required rendered or redirected
Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
Started GET "/login" for [my_IP_Address] at 2018-05-02 21:05:07 +0000
Processing by StaticController#show as HTML
  Parameters: {"id"=>"login"}
  Rendering static/login.html.erb within layouts/application
  Rendered static/login.html.erb within layouts/application (15.6ms)
  Rendered layouts/_head.html.erb (0.3ms)
  Rendered common/_discourse_stylesheet.html.erb (0.1ms)
  Rendered common/_special_font_face.html.erb (0.2ms)
  Rendered application/_header.html.erb (0.3ms)
  Rendered common/_discourse_javascript.html.erb (0.3ms)
Completed 200 OK in 33ms (Views: 20.1ms | ActiveRecord: 4.3ms)
Started GET "/login.html?_=1525295107717" for [my_IP_Address] at 2018-05-02 21:05:07 +0000
Processing by StaticController#show as HTML
  Parameters: {"_"=>"1525295107717", "id"=>"login"}
  Rendering static/login.html.erb
  Rendered static/login.html.erb (14.0ms)
Completed 200 OK in 16ms (Views: 14.3ms | ActiveRecord: 0.4ms)

Any ideas of where to look next would be appreciated.