CDCgov / trusted-intermediary

Bringing together healthcare providers by reducing the connection burden.
Apache License 2.0
9 stars 2 forks source link

Outbound OAuth2 Authentication #1136

Open JohnNKing opened 2 weeks ago

JohnNKing commented 2 weeks ago

Story

As UCSD, so my EHR can receive results, I need ReportStream to be able to authenticate via OAuth2.

Pre-conditions

Acceptance Criteria

Tasks

Research

Engineering

Definition of Done

Research Questions

Decisions

Notes

basiliskus commented 1 week ago

ReportStream already supports outbound OAuth2. More info here and here

basiliskus commented 1 week ago

It seems this will be more of an integration story with UCSD. As part of the work, we need to review the RS Programmer's Guide and make sure there are steps to set up outbound OAuth2 connection with RS

saquino0827 commented 4 days ago

Here's is the swagger doc for the description of OAuth2 using Okta. This seems to only be for inbound.

jorg3lopez commented 4 days ago

We checked how RS builds the jwt that is used to request an access token, and it appears that it will work with their current setup. The one thing we need now is the endpoint where we will send the message to.

jorg3lopez commented 1 day ago

Update: We concluded that RS has the right setup for OAuth2 when they generate jwt. The jwt that is being generated is not valid when we hit the token endpoint. The problem is that the issuer and subject params are not the client id that we got from EPIC. See picture:

image.png

The other issue is that the audience is blank, instead of having the baseUrl that is used to retrieve the token. See picture:

image.png

Proposed solution: I think that if we add these entries to the org file, we will have the ability to create JWTs with more flexibility and client customization.

jorg3lopez commented 1 day ago

Currently, we have a draft PR.