Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signature validation always true with IdP initiated SLO #194

Closed
RomanKosovnenko opened this issue Oct 6, 2020 · 0 comments · Fixed by #195
Closed

Signature validation always true with IdP initiated SLO #194

RomanKosovnenko opened this issue Oct 6, 2020 · 0 comments · Fixed by #195

Comments

@RomanKosovnenko
Copy link

Hello everyone,
In one project we use Omniauth with SAML.
And we always get valid signature even it should not be valid.
After debug, I figured out that the problem in method handle_logout_request

Method:
`def handle_logout_request(raw_request, settings)
logout_request = OneLogin::RubySaml::SloLogoutrequest.new(raw_request)

    if logout_request.is_valid? &&
      logout_request.name_id == session["saml_uid"]

      # Actually log out this session
      options[:idp_slo_session_destroy].call @env, session

      # Generate a response to the IdP.
      logout_request_id = logout_request.id
      logout_response = OneLogin::RubySaml::SloLogoutresponse.new.create(settings, logout_request_id, nil, RelayState: slo_relay_state)
      redirect(logout_response)
    else
      raise OmniAuth::Strategies::SAML::ValidationError.new("SAML failed to process LogoutRequest")
    end
  end`

It creates logout_request object without any settings. But validate_signature method use it with two keys "settings" and "get_params"

Maybe someone could explain is it my fault? Or how to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant