You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add oidc mongodb version specific validation (#160)
# Summary
This pull request introduces a new validation function to ensure OIDC
provider configurations have unique `IssuerURI` values or unique
`IssuerURI` + `Audience` combinations, depending on the MongoDB version.
### New Validation Logic for OIDC Provider Configurations:
* Added `oidcProviderConfigUniqueIssuerURIValidation` to enforce unique
`IssuerURI` values for MongoDB versions that do not support duplicate
issuers, and unique `IssuerURI` + `Audience` combinations for versions
that do. This ensures compatibility with MongoDB's documented behavior.
### Unit Tests for Validation:
* Added `TestOIDCProviderConfigUniqueIssuerURIValidation` to cover
various scenarios, including:
- Duplicate `IssuerURI` values for MongoDB 6.0 (error).
- Unique and duplicate `IssuerURI` + `Audience` combinations for MongoDB
7.0, 7.3, and 8.0 (success or warning as applicable).
- Handling of enterprise versions with the `-ent` suffix.
## Proof of Work
Unit tests pass
---------
Co-authored-by: Maciej Karaś <[email protected]>
0 commit comments