BB2-5115 added log for CAN workflow - #1726
Open
rsjimenez-icf wants to merge 1 commit into
Open
Conversation
| assert '"patient_match_found": true' in auth_logs.output[1] | ||
| assert '"req_grant_type": "client_credentials"' in request_logs.output[0] | ||
| assert '"req_app_name": "CC App"' in request_logs.output[0] | ||
| assert '"csp": "https://api.idmelabs.com/oidc"' in auth_logs.output[1] |
Contributor
There was a problem hiding this comment.
Could use the IDME_LOWER_ISS constant for this instead
|
|
||
| log_dict['patient_match_found'] = True | ||
| log_dict['patient'] = fhir_id | ||
| log_dict['csp'] = pre_verified_ial.get('iss', None) |
Contributor
There was a problem hiding this comment.
For the test_client_credentials_returns_patient_match_not_found_401 test to pass, and to make sure we have the csp for whether the patient match was found or not, we'll need to move this line outside of the if/else. I think it would be best when the 'csp' attribute is instantiated.
| assert '"patient_match_found": false' in auth_logs.output[1] | ||
| assert '"req_grant_type": "client_credentials"' in request_logs.output[0] | ||
| assert '"req_app_name": "CC App"' in request_logs.output[0] | ||
| assert '"csp": "https://api.idmelabs.com/oidc"' in auth_logs.output[1] |
Contributor
There was a problem hiding this comment.
also use IDME_LOWER_ISS once authorization.py change is made.
JamesDemeryNava
left a comment
Contributor
There was a problem hiding this comment.
Looks good! Couple small changes and this will be ready to merge.
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.
JIRA Ticket:
BB2-5115
What Does This PR Do?
Adds a parameter for logging which CSP is used.
What Should Reviewers Watch For?
If you're reviewing this PR, please check for these things in particular:
Validation
Test the
/v3/o/tokenendpoint locally using a client _assertion in the body that is a JWT that includes "https://verified.clearme.com/integrations/".You should see in the logs of your local docker instance a line like this one that now includes the csp property with the matching url:
INFO [67] hhs_server.apps.dot_ext.views.authorization line:1263 {"type": "request_response_middleware", "app_name": "TestApp", "csp": "https://verified.clearme.com/integrations/", "patient": "-731271436", "path": "/v3/o/token", "patient_match_found": true}What Security Implications Does This PR Have?
Please indicate if this PR does any of the following:
security engineer's approval.
Any Migrations?
etc)