Skip to content

Conversation

@GromNaN
Copy link
Member

@GromNaN GromNaN commented Aug 12, 2025

Q A
Type bug
BC Break no
Fixed issues DoctrineMongoDBBundle#897

Summary

For some KMS providers, all options can be omitted. The authentication is done using the env var or the system.
https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.md#credentialproviders

@GromNaN GromNaN requested a review from jmikola August 12, 2025 19:37
return [
'kmsProviders' => [$this->attributes['kmsProvider']['type'] => array_diff_key($this->attributes['kmsProvider'], ['type' => 0])],
// Each kmsProvider must be an object, it can be empty
'kmsProviders' => [$this->attributes['kmsProvider']['type'] => (object) array_diff_key($this->attributes['kmsProvider'], ['type' => 0])],
Copy link
Member

Choose a reason for hiding this comment

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

Slight correction to the PR description, since you said only mentioned AWS there.

credentialProviders talks about only supporting AWS, but Automatic Credentials mentions that AWS, Azure, and GCP are all supported. The struct definition in kmsProviders also demonstrates that those three provider types might be expressed as an empty object.

I'll also note that libmongocrypt supports named KMS providers (e.g. aws:foo), which in turn do not support fetching automatic credentials from the environment.

I don't think this changes the code you have here, but I wanted to clarify.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I updated the PR description.

@GromNaN GromNaN merged commit cf3c0b7 into doctrine:feature/queryable-encryption Aug 13, 2025
19 of 21 checks passed
@GromNaN GromNaN deleted the object-kms-provider branch August 13, 2025 18:31
GromNaN added a commit to doctrine/DoctrineMongoDBBundle that referenced this pull request Aug 18, 2025
GromNaN added a commit to doctrine/DoctrineMongoDBBundle that referenced this pull request Aug 19, 2025
GromNaN added a commit to GromNaN/DoctrineMongoDBBundle that referenced this pull request Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants