Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NODE-5035): enable OIDC authentication #3577

Merged
merged 57 commits into from Mar 3, 2023
Merged

feat(NODE-5035): enable OIDC authentication #3577

merged 57 commits into from Mar 3, 2023

Conversation

durran
Copy link
Member

@durran durran commented Feb 20, 2023

Description

Implements OIDC auth.

Spec PR: mongodb/specifications#1365

Latest tools fix: mongodb-labs/drivers-evergreen-tools#272

What is changing?

  • Adds a new MongoDBOIDC auth provider.
  • Introduces the concept of workflows for additional cloud providers in the future.
  • Adds the spec prose tests for OIDC except reauthentication. (NODE-5036)
Is there new documentation needed for these changes?

None

What is the motivation for this change?

NODE-5035/DRIVERS-2415

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@durran durran changed the title test(NODE-5035): enable OIDC authentication feat(NODE-5035): enable OIDC authentication Feb 20, 2023
@durran durran force-pushed the NODE-5035 branch 2 times, most recently from c161b8f to 1043567 Compare February 20, 2023 22:05
src/cmap/auth/mongodb_oidc.ts Outdated Show resolved Hide resolved
src/cmap/auth/mongo_credentials.ts Show resolved Hide resolved
@durran durran added the wip label Feb 20, 2023
@durran durran force-pushed the NODE-5035 branch 3 times, most recently from 93376a0 to 464a587 Compare February 24, 2023 16:28
src/cmap/auth/mongodb_oidc.ts Outdated Show resolved Hide resolved
src/cmap/auth/mongodb_oidc.ts Outdated Show resolved Hide resolved
@durran durran removed the wip label Feb 27, 2023
@durran durran marked this pull request as ready for review February 27, 2023 13:17
Copy link
Contributor

@addaleax addaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn’t quite get around to the test/ changes right now, will try to do that later, but what’s in src/ looks good to me 👍

.evergreen/config.in.yml Outdated Show resolved Hide resolved
.evergreen/config.yml Outdated Show resolved Hide resolved
src/cmap/auth/mongodb_oidc/callback_workflow.ts Outdated Show resolved Hide resolved
src/cmap/auth/mongodb_oidc/aws_device_workflow.ts Outdated Show resolved Hide resolved
@W-A-James W-A-James added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Feb 27, 2023
src/cmap/auth/mongodb_oidc/token_entry_cache.ts Outdated Show resolved Hide resolved
test/manual/mongodb_oidc.test.ts Outdated Show resolved Hide resolved
test/manual/mongodb_oidc.test.ts Outdated Show resolved Hide resolved
test/manual/mongodb_oidc.test.ts Outdated Show resolved Hide resolved
test/manual/mongodb_oidc.test.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@baileympearson baileympearson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't look at tests here, but have some suggestions on the implementation. I like the workflow abstraction, and I love to see more usage of async-await in the driver. Nice work 🙂

src/cmap/auth/mongodb_oidc.ts Show resolved Hide resolved
src/cmap/auth/mongodb_oidc.ts Outdated Show resolved Hide resolved
src/cmap/auth/mongodb_oidc/callback_workflow.ts Outdated Show resolved Hide resolved
src/cmap/auth/mongodb_oidc/callback_workflow.ts Outdated Show resolved Hide resolved
src/cmap/auth/mongodb_oidc/callback_workflow.ts Outdated Show resolved Hide resolved
src/cmap/auth/mongodb_oidc/token_entry_cache.ts Outdated Show resolved Hide resolved
src/cmap/auth/mongodb_oidc/token_entry_cache.ts Outdated Show resolved Hide resolved
src/cmap/auth/mongodb_oidc/callback_workflow.ts Outdated Show resolved Hide resolved
test/manual/mongodb_oidc.test.ts Outdated Show resolved Hide resolved
@W-A-James W-A-James self-requested a review February 28, 2023 15:16
Copy link
Contributor

@W-A-James W-A-James left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Serverless failures are caused by issue documented in https://jira.mongodb.org/browse/DRIVERS-2564

Filing flaky test ticket for time series unified spec tests

@W-A-James W-A-James added Primary Review In Review with primary reviewer, not yet ready for team's eyes Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Feb 28, 2023
@dariakp dariakp merged commit 35879f6 into main Mar 3, 2023
@dariakp dariakp deleted the NODE-5035 branch March 3, 2023 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
6 participants