-
-
Notifications
You must be signed in to change notification settings - Fork 574
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
Support idp cert multi with string keys #576
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -972,6 +972,16 @@ def generate_audience_error(expected, actual) | |
assert_empty response_valid_signed.errors | ||
end | ||
|
||
it "return true when at least a cert on idp_cert_multi is valid and keys are strings" do | ||
settings.idp_cert_multi = { | ||
"signing" => [ruby_saml_cert_text2, ruby_saml_cert_text], | ||
"encryption" => [] | ||
} | ||
response_valid_signed.settings = settings | ||
res = response_valid_signed.send(:validate_signature) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In addition to this unittest, I expect one using a call to get_idp_cert_multi as well that verifies the certs were properly loaded on the settings object at settings_test.rb There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added tests verifying that calls to get_idp_cert_multi are in fact working: 01c95db |
||
assert_empty response_valid_signed.errors | ||
end | ||
|
||
it "return false when none cert on idp_cert_multi is valid" do | ||
settings.idp_cert_fingerprint = ruby_saml_cert_fingerprint | ||
settings.idp_cert_multi = { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be:
So we always generate certs with the symbol index, as it used to be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type
is a symbol, it can only be one of[:signing, :encryption]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alxckn 's code is correct here.