-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
authn: Generalize support to ~any OIDC/OAuth2 IdP, not just AWS Cognito
OIDC is OpenID Connect 1.0, which is an identity/authentication protocol layered on top of OAuth 2.0's authorization protocol. AWS Cognito implements OIDC/OAuth2 but our authn code hardcoded some assumptions about Cognito specifically. Undo that and parameterize and generalize the code to work (in theory) with other OIDC identity providers (IdPs). In practice, some additional changes may be necessary for specific other IdPs, but as-is I can get this generalized authn code to work against a test Azure AD IdP. Outside of authn, there are still some other bits of the codebase which require Cognito. Those will be addressed in subsequent work. This work is motivated by CDC AMD's efforts to host a copy of nextstrain.org internally in order to avail themselves of Groups internally. Related-to: <nextstrain/private#94>
- Loading branch information
Showing
8 changed files
with
255 additions
and
78 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
{ | ||
"COGNITO_BASE_URL": "https://login.nextstrain.org", | ||
"COGNITO_CLIENT_ID": "rki99ml8g2jb9sm1qcq9oi5n", | ||
"COGNITO_CLI_CLIENT_ID": "2vmc93kj4fiul8uv40uqge93m5", | ||
"COGNITO_USER_POOL_ID": "us-east-1_Cg5rcTged" | ||
"OIDC_IDP_URL": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_Cg5rcTged", | ||
"OAUTH2_CLIENT_ID": "rki99ml8g2jb9sm1qcq9oi5n", | ||
"OAUTH2_CLI_CLIENT_ID": "2vmc93kj4fiul8uv40uqge93m5", | ||
"OAUTH2_LOGOUT_URL": "https://login.nextstrain.org/logout", | ||
"COGNITO_USER_POOL_ID": "us-east-1_Cg5rcTged", | ||
"OIDC_USERNAME_CLAIM": "cognito:username", | ||
"OIDC_GROUPS_CLAIM": "cognito:groups" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
{ | ||
"COGNITO_BASE_URL": "https://nextstrain-testing.auth.us-east-1.amazoncognito.com", | ||
"COGNITO_CLIENT_ID": "6qiojrhr8tibt0f6hphnm1osp1", | ||
"COGNITO_CLI_CLIENT_ID": "9opa27o74f4jsq8g4a34e1mqr", | ||
"COGNITO_USER_POOL_ID": "us-east-1_zqpCrjM7I" | ||
"OIDC_IDP_URL": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_zqpCrjM7I", | ||
"OAUTH2_CLIENT_ID": "6qiojrhr8tibt0f6hphnm1osp1", | ||
"OAUTH2_CLI_CLIENT_ID": "9opa27o74f4jsq8g4a34e1mqr", | ||
"OAUTH2_LOGOUT_URL": "https://nextstrain-testing.auth.us-east-1.amazoncognito.com/logout", | ||
"COGNITO_USER_POOL_ID": "us-east-1_zqpCrjM7I", | ||
"OIDC_USERNAME_CLAIM": "cognito:username", | ||
"OIDC_GROUPS_CLAIM": "cognito:groups" | ||
} |
This file contains 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
Oops, something went wrong.