[LG-7676] Add logging of matching certificate for SAML AuthnRequests#7047
Merged
[LG-7676] Add logging of matching certificate for SAML AuthnRequests#7047
Conversation
orenyk
commented
Sep 29, 2022
spec/support/fake_saml_request.rb
Outdated
Contributor
Author
There was a problem hiding this comment.
I hate this but currently we set FakeSamlRequest#service_provider to the instance of FakeSamlRequest and I didn't want to go down a rabbit hole untangling it (I tried using instance_double but ran into RSpec loading issues).
orenyk
commented
Sep 29, 2022
Contributor
Author
There was a problem hiding this comment.
This turns off the SAML assertion signature for the AuthnRequest, so there can be no matching cert. I didn't write an explicit test for when the signature is invalid or uses a cert that isn't configured, but the result should be the same.
Resolves LG-7676 Adds a new attribute to successful `SAML Auth` events to track the serial number of the matching cert identified through signature validation. If the signature validation fails, this attribute will be `nil`, indicating that none of the configured SP public certificates could be used to validate the signature in the SAML AuthnRequest. changelog: Improvements, Authentication, Add logging of matching certificate for SAML AuthnRequests
d5ad160 to
75e8c02
Compare
mitchellhenke
approved these changes
Sep 29, 2022
Merged
jskinne3
pushed a commit
that referenced
this pull request
Oct 12, 2022
Resolves LG-7676 Adds a new attribute to successful `SAML Auth` events to track the serial number of the matching cert identified through signature validation. If the signature validation fails, this attribute will be `nil`, indicating that none of the configured SP public certificates could be used to validate the signature in the SAML AuthnRequest. changelog: Improvements, Authentication, Add logging of matching certificate for SAML AuthnRequests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves LG-7676
changelog: Improvements, Authentication, Add logging of matching certificate for SAML AuthnRequests
🎫 Ticket
https://cm-jira.usa.gov/browse/LG-7676
🛠 Summary of changes
Adds a new attribute to successful
SAML Authevents to track the serial number of the matching cert identified through signature validation. If the signature validation fails, this attribute will benil, indicating that none of the configured SP public certificates could be used to validate the signature in the SAML AuthnRequest.📜 Testing Plan
Provide a checklist of steps to confirm the changes.
SAML Authevent to includematching_cert_serialproperty with corresponding cert serial number🚀 Notes for Deployment
N/A