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

Does not validate Signature when authenticating via HTTP redirect #36

Open
Yanchek99 opened this issue Mar 9, 2016 · 2 comments
Open
Milestone

Comments

@Yanchek99
Copy link

When using HTTP-Redirect Binding for SSO, the Signature Algorithm and the Signature are parameters in the request. This gem does not currently support getting those attributes from the request and validating them. Only when the data comes from a HTTP post is the Signature and Algorithm part of the AuthRequest xml. Therefore no signing validation is done when Authentication is happening from an HTTP Redirect.

Example:

Started GET "/saml/auth?SAMLRequest=jZJRb9sgFIXf9ysQ7wSwldhGcaqsUbVI3RY17h76MlFMEiR88QC3278fsRep09aqvHHvubrfObrLq5%2BdRU%2FaB%2BOgxnzGMNKgXGvgWOP75oaU%2BGq1DLKzvVgP8QR3%2BsegQ0RpDoIYGzUePAgngwkCZKeDiErs159vRTZjovcuOuUsnkbeFssQtI%2BJBaPtpsbfi7zNVJVlcp7njB2YKuYZk8Wc80KVRV6ydrGQVXV45Bh9u7jIzi62IQx6CyFKiKnE%2BIKwnLCq4QvBS8GrB4x2f9A%2BGpgMv4X2OImC%2BNQ0O7L7um8wWl9wrx2EodN%2Br%2F2TUfr%2B7rbGpxh7Qal1StqTC1GUrGQUo02Kz4CMI%2Bs%2FomST0XOsVKa48ZS9GN34F6G%2FN8bV%2Fymee6IcRA2R9nY4Ggi0M2Ccl3DU5LyAZIyE5NemrzkCcUCX9AXL5Si%2BpOXbzc5Zo36htbXu%2BdprGXWNox80RjfOdzK%2BjstnfKyYlhxGqRgg9FqZg9Et%2FoBeeXQ10fx9lavf&RelayState=testValidate&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=eIHdZLz5VL0OF6ZkieDWcEDFWQ40yyKavS2jQMj1EplB8hsRbsplOyq%2B8gj5F91UBJIfaz8jKNXULDyeY7iXjX4kIDUqJuX69CgY7GS%2Fb%2FTpsRc7l4YDyhlhzHOH%2B2WSjiMzrofTYhh8zNiXJeXyHHhwvg0EleAJc8Uz2892NXFDWIxXfbY%2FA4cbBqUTz0vvl4q99Kns6v%2BDBHntA52W%2FjgMEed08GGTP2vQewUpT3V3eJb98nHJOqvJzu8qK8YM%2Fv9xGNMc1nvt8UJ8kY8uaLjWVg1ABs0X2mjqDfc5yXHqZQThlSSUBX3N1w%2FvZBzVtYjtkuJVWEpnejazJ8ginw%3D%3D" for 127.0.0.1 at 2016-03-09 09:18:18 -0700
Processing by SamlIdpController#create as HTML
  Parameters: {"SAMLRequest"=>"jZJRb9sgFIXf9ysQ7wSwldhGcaqsUbVI3RY17h76MlFMEiR88QC3278fsRep09aqvHHvubrfObrLq5+dRU/aB+OgxnzGMNKgXGvgWOP75oaU+Gq1DLKzvVgP8QR3+segQ0RpDoIYGzUePAgngwkCZKeDiErs159vRTZjovcuOuUsnkbeFssQtI+JBaPtpsbfi7zNVJVlcp7njB2YKuYZk8Wc80KVRV6ydrGQVXV45Bh9u7jIzi62IQx6CyFKiKnE+IKwnLCq4QvBS8GrB4x2f9A+GpgMv4X2OImC+NQ0O7L7um8wWl9wrx2EodN+r/2TUfr+7rbGpxh7Qal1StqTC1GUrGQUo02Kz4CMI+s/omST0XOsVKa48ZS9GN34F6G/N8bV/ymee6IcRA2R9nY4Ggi0M2Ccl3DU5LyAZIyE5NemrzkCcUCX9AXL5Si+pOXbzc5Zo36htbXu+dprGXWNox80RjfOdzK+jstnfKyYlhxGqRgg9FqZg9Et/oBeeXQ10fx9lavf", "RelayState"=>"testValidate", "SigAlg"=>"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", "Signature"=>"eIHdZLz5VL0OF6ZkieDWcEDFWQ40yyKavS2jQMj1EplB8hsRbsplOyq+8gj5F91UBJIfaz8jKNXULDyeY7iXjX4kIDUqJuX69CgY7GS/b/TpsRc7l4YDyhlhzHOH+2WSjiMzrofTYhh8zNiXJeXyHHhwvg0EleAJc8Uz2892NXFDWIxXfbY/A4cbBqUTz0vvl4q99Kns6v+DBHntA52W/jgMEed08GGTP2vQewUpT3V3eJb98nHJOqvJzu8qK8YM/v9xGNMc1nvt8UJ8kY8uaLjWVg1ABs0X2mjqDfc5yXHqZQThlSSUBX3N1w/vZBzVtYjtkuJVWEpnejazJ8ginw=="}
@jphenow jphenow added this to the 0.4 milestone Jun 7, 2016
@jphenow
Copy link
Collaborator

jphenow commented Jun 7, 2016

This seems to be related or is the same as #42, but leaving for now.

@militarpancho
Copy link

Hi!, Any advances on this feature?

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

No branches or pull requests

3 participants