Outbound: Specify the OpenSSL Root CA Bundle when making SDS requests#191
Merged
adrianclay merged 15 commits intomainfrom Sep 6, 2024
Merged
Outbound: Specify the OpenSSL Root CA Bundle when making SDS requests#191adrianclay merged 15 commits intomainfrom
adrianclay merged 15 commits intomainfrom
Conversation
adrianclay
reviewed
Sep 2, 2024
adrianclay
reviewed
Sep 2, 2024
adrianclay
reviewed
Sep 4, 2024
adrianclay
reviewed
Sep 4, 2024
adrianclay
approved these changes
Sep 6, 2024
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.
What + Why
When testing the Adaptor in PTL, we noticed that the first Outbound request would return a successful response, and then all subsequent requests returned a 500. We narrowed the issue down to the tornado HTTP client reusing the last CA Bundle it was given if no CA Bundle was explicitly specified. After the first request, this meant that SDS requests were trying to validate the authenticity of the SDS API by using the NHS root certificates (because the last request made was to Spine).
To workaround this Tornado issue, this we've changed our
CommonHttps.make_requestmethod to explicitly specify the OpenSSL root CA bundle in the case that no bundle is provided. This should only affect the calls to the FHIR SDS API, as that's the only HTTP server we call that uses a standard certificate. Calls to Spine use the NHS certificates passed in as environment variables.Type of change
Bug fix (non-breaking change which fixes an issue)
Checklist: