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

GODRIVER-3249: Handle all possible OIDC configuration errors #1734

Merged
merged 10 commits into from
Aug 7, 2024

Conversation

pmeredit
Copy link
Collaborator

@pmeredit pmeredit commented Aug 6, 2024

GODRIVER-3249

Summary

Add configuration errors for all malformed configuration for the OIDC authentication mechanism. Some of these are redundant with errors thrown by the OIDC code itself, but these should occur before that point. I think double checking is fine.

Background & Motivation

OIDC epic

@pmeredit pmeredit marked this pull request as draft August 6, 2024 21:58
@mongodb-drivers-pr-bot mongodb-drivers-pr-bot bot added the priority-3-low Low Priority PR for Review label Aug 6, 2024
Copy link
Contributor

mongodb-drivers-pr-bot bot commented Aug 6, 2024

API Change Report

./x/mongo/driver/auth

compatible changes

AllowedHostsProp: added
AzureEnvironmentValue: added
EnvironmentProp: added
GCPEnvironmentValue: added
ResourceProp: added
TestEnvironmentValue: added

@pmeredit pmeredit marked this pull request as ready for review August 6, 2024 22:08
@@ -26,14 +26,24 @@ import (
// MongoDBOIDC is the string constant for the MONGODB-OIDC authentication mechanism.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are now public so they can be reused in configuration error checking to keep consistency if we ever need to change the values.

@pmeredit
Copy link
Collaborator Author

pmeredit commented Aug 7, 2024

I added in GODRIVER-3226 because the GODRIVER was actually handling this correctly, unlike the python driver, and all I needed was to add tests showing that.

matthewdale
matthewdale previously approved these changes Aug 7, 2024
Copy link
Collaborator

@matthewdale matthewdale left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

mongo/options/clientoptions.go Outdated Show resolved Hide resolved
Co-authored-by: Matt Dale <9760375+matthewdale@users.noreply.github.com>
@pmeredit pmeredit merged commit ed9079a into mongodb:v1 Aug 7, 2024
30 of 32 checks passed
blink1073 pushed a commit to blink1073/mongo-go-driver that referenced this pull request Aug 8, 2024
…#1734)

Co-authored-by: Matt Dale <9760375+matthewdale@users.noreply.github.com>
(cherry picked from commit ed9079a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-3-low Low Priority PR for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants