Skip to content

Conversation

@matthewdale
Copy link
Collaborator

@matthewdale matthewdale commented Mar 5, 2025

GODRIVER-3175

Summary

  • Support the "k8s" OIDC environment for AKS, EKS, and GKE.
  • Update connection string validation for new OIDC connection string tests.
  • Add tests for the "k8s" OIDC environment.
  • Use the same Evergreen task group configuration for all OIDC task groups.
  • Remove unnecessary batchtime config for other OIDC test tasks.
  • Remove accidental duplication of OIDC options subtest in TestClientOptions.

Background & Motivation

From DRIVERS-2882:

Drivers will add a "k8s" implementation of an OIDC_CALLBACK that handles AWS EKS, GCP GKE, and Azure AKS.

@matthewdale matthewdale force-pushed the godriver3175-oidc-k8s branch from 0c68c4f to ceffa7c Compare March 5, 2025 21:04
@mongodb-drivers-pr-bot mongodb-drivers-pr-bot bot added the review-priority-low Low Priority PR for Review: within 3 business days label Mar 5, 2025
@mongodb-drivers-pr-bot
Copy link
Contributor

API Change Report

./v2/x/mongo/driver/auth

compatible changes

K8SEnvironmentValue: added

@matthewdale matthewdale force-pushed the godriver3175-oidc-k8s branch 2 times, most recently from 63b1504 to 939c54d Compare March 5, 2025 21:51
@matthewdale matthewdale force-pushed the godriver3175-oidc-k8s branch from 939c54d to 4778463 Compare March 5, 2025 23:41
@matthewdale matthewdale marked this pull request as ready for review March 6, 2025 00:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This pull request adds Kubernetes support for OIDC authentication by extending both the test suite and driver configuration. Key changes include:

  • Adding a new “k8s” test case (machinek8s) and corresponding callback (k8sOIDCCallback) for Kubernetes in the OIDC test harness.
  • Standardizing error message formatting and OIDC validation logic in client options and driver authentication.
  • Updating Evergreen configuration and test cases to include Kubernetes OIDC tests.

Reviewed Changes

File Description
internal/cmd/testoidcauth/main.go Introduces the "k8s" case and adds the machinek8s test to validate Kubernetes OIDC.
mongo/options/clientoptions.go Updates error messages and validation checks for OIDC properties.
x/mongo/driver/auth/oidc.go Adds constants and a new k8sOIDCCallback for Kubernetes token file handling.
.evergreen/config.yml Modifies test task definitions to run new Kubernetes OIDC tests.
x/mongo/driver/auth/auth_spec_test.go Revises test grouping and skipped tests to reflect updated test scenarios.
mongo/options/clientoptions_test.go Adjusts test expectations for error message formatting in OIDC configuration tests.

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

@matthewdale matthewdale merged commit e3670f7 into mongodb:master Mar 11, 2025
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-priority-low Low Priority PR for Review: within 3 business days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants