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

Add logging for certificate errors #10818

Merged
merged 2 commits into from
Jun 14, 2024
Merged

Conversation

Sgtpluck
Copy link
Member

🎫 Ticket

https://gitlab.login.gov/lg-people/lg-people-appdev/Melba/backlog-fy24/-/issues/42

🛠 Summary of changes

  • Updates the version of saml_idp gem
  • Updates logging to include cert_error_details to log specific certificate errors if the request is signed and successful
  • Adds tests

@@ -137,6 +137,7 @@ def capture_analytics
# Logging to indicate if a validation bug fix will create a potentially breaking change
analytics_payload[:encryption_cert_matches_matching_cert] =
encryption_cert_matches_matching_cert?
analytics_payload[:cert_error_details] = saml_request.cert_errors
Copy link
Member Author

@Sgtpluck Sgtpluck Jun 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i thought about using the existing error_details key, since it should be empty if the request is successful. but i thought that could be confusing ultimately, so decided not to -- interested in thoughts about that!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it makes sense to me to keep separate!

matching_cert_serial:,
encryption_cert_matches_matching_cert:,
}
end
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i removed this to make the result conditions more explicit in the individual tests

@Sgtpluck Sgtpluck requested review from zachmargolis and a team June 14, 2024 13:13
@Sgtpluck Sgtpluck force-pushed the dmm/add-saml-cert-error-logging branch from 93ed624 to 99e7dde Compare June 14, 2024 16:35
@Sgtpluck Sgtpluck merged commit 5d25fa6 into main Jun 14, 2024
2 checks passed
@Sgtpluck Sgtpluck deleted the dmm/add-saml-cert-error-logging branch June 14, 2024 17:00
brandemix pushed a commit to brandemix/18F-identity-idp that referenced this pull request Jun 17, 2024
* changelog: Internal, Metrics, Add certificate validation errors to event
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 this pull request may close these issues.

2 participants