Skip to content

Add logging for certificate errors#10818

Merged
Sgtpluck merged 2 commits intomainfrom
dmm/add-saml-cert-error-logging
Jun 14, 2024
Merged

Add logging for certificate errors#10818
Sgtpluck merged 2 commits intomainfrom
dmm/add-saml-cert-error-logging

Conversation

@Sgtpluck
Copy link
Copy Markdown
Contributor

🎫 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

# 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
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
Contributor 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 a team and zachmargolis 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
@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