BB2-4675: Add SAMHSA checkbox to v3 permissions screen#1607
BB2-4675: Add SAMHSA checkbox to v3 permissions screen#1607JamesDemeryNava wants to merge 7 commits into
Conversation
ryan-morosa
left a comment
There was a problem hiding this comment.
Nice work! I left a few comments and I think the testing coverage is sufficient and the functionality works as described. I wasn't able to do a case through postman where there was a code for the cache - is there a way this can get tested?
Thanks! For me, I always get a value for code in both form_valid of AuthorizationView and the post of TokenView if I am going through an auth flow. If you do a refresh token flow, code will be a None value in the post of TokenView, and we won't hit form_valid of AuthorizationView. For refresh tokens, we just grab the prior include_samhsa value, and apply that to the new access_token_extension record. To me, if you did not check the checkbox, and include_samhsa was false on the resulting access_token_extension record, that means the caching is working. Though I am hoping to get @jimmyfagan's opinion on the caching strategy before merging this. |
Totally. I think it makes sense to have an event-based caching strategy like you have here where we update the database and then remove the previous one from the cache. But I'd be open to other strategies too. |
JIRA Ticket:
BB2-4675
What Does This PR Do?
Adds a checkbox on the v3 permissions screen, if the app has any ExplanationOfBenefit scopes. The checkbox is not selected by default. If the user leaves the checkbox unchecked, then the
include_samhsavalue on theoauth2_provider_accesstoken_extensionrecord will be false, SAMHSA data will be filtered out of v3 EOB responses, and v1/2 EOB calls will be blocked for that token. If the user checks the checkbox, then theinclude_samhsavalue on theoauth2_provider_accesstoken_extensionrecord will be true, SAMHSA data will NOT be filtered out of v3 EOB responses, and v1/2 EOB calls will be allowed.What Should Reviewers Watch For?
If you're reviewing this PR, please check for these things in particular:
Validation
oauth2_provider_accesstoken_extensionrecord, confirminclude_samhsais falseoauth2_provider_accesstoken_extensionrecord, confirminclude_samhsais trueWhat Security Implications Does This PR Have?
Please indicate if this PR does any of the following:
security engineer's approval.
Any Migrations?
etc)