-
Notifications
You must be signed in to change notification settings - Fork 232
Enable auto encryption #897
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
Changes from 21 commits
077e1df
9a43b4f
12b1559
76e9684
af57fa0
8a8bdd4
61a8118
823dd72
f21d4ee
23737b3
953613d
ea8ac92
59bea27
7028b0e
cf11f81
c49d20d
e28616a
887b319
37c0f03
28b8e68
235b64d
6d74e79
e1e82e6
90ad0b1
93ddd8a
7183f33
f13fde6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
pull_request: | ||
branches: | ||
- "*.x" | ||
- "feature/*" | ||
push: | ||
branches: | ||
- "*.x" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
|
||
<xsd:complexType name="config"> | ||
<xsd:sequence> | ||
<xsd:element name="default-commit-options" type="default-commit-options" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="default-commit-options" type="default-commit-options" minOccurs="0" /> | ||
<xsd:element name="connection" type="connection" minOccurs="0" maxOccurs="unbounded" /> | ||
<xsd:element name="document-manager" type="document-manager" minOccurs="0" maxOccurs="unbounded" /> | ||
<xsd:element name="resolve-target-document" type="resolve_target_document" minOccurs="0" maxOccurs="unbounded" /> | ||
|
@@ -46,8 +46,9 @@ | |
|
||
<xsd:complexType name="connection"> | ||
<xsd:sequence> | ||
<xsd:element name="options" type="connection-options" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="driver-options" type="connection-driver-options" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="options" type="connection-options" minOccurs="0" /> | ||
<xsd:element name="driver-options" type="connection-driver-options" minOccurs="0" /> | ||
<xsd:element name="autoEncryption" type="auto-encryption" minOccurs="0" /> | ||
</xsd:sequence> | ||
<xsd:attribute name="id" type="xsd:string" use="required" /> | ||
<xsd:attribute name="server" type="xsd:string" /> | ||
|
@@ -84,6 +85,9 @@ | |
</xsd:complexType> | ||
|
||
<xsd:complexType name="connection-driver-options"> | ||
<xsd:all> | ||
<xsd:element name="autoEncryption" type="auto-encryption" minOccurs="0"/> | ||
</xsd:all> | ||
<xsd:attribute name="context" type="xsd:string" /> | ||
</xsd:complexType> | ||
|
||
|
@@ -119,12 +123,90 @@ | |
<xsd:attribute name="value" type="xsd:string" use="required" /> | ||
</xsd:complexType> | ||
|
||
<xsd:complexType name="auto-encryption"> | ||
GromNaN marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<xsd:sequence> | ||
<xsd:element name="kmsProvider" type="kms-provider" /> | ||
<xsd:element name="masterKey" type="master-key" minOccurs="0" /> | ||
<xsd:element name="keyVaultClient" type="xsd:string" minOccurs="0" /> | ||
<xsd:element name="keyVaultNamespace" type="xsd:string" minOccurs="0" /> | ||
<xsd:element name="tlsOptions" type="tls-options" minOccurs="0" /> | ||
<xsd:element name="encryptedFieldsMap" type="encrypted-fields-map" minOccurs="0" /> | ||
<xsd:element name="extraOptions" type="extra-options" minOccurs="0" /> | ||
</xsd:sequence> | ||
<xsd:attribute name="bypassAutoEncryption" type="xsd:boolean" /> | ||
<xsd:attribute name="bypassQueryAnalysis" type="xsd:boolean" /> | ||
</xsd:complexType> | ||
|
||
<xsd:complexType name="kms-provider"> | ||
<xsd:attribute name="type" type="xsd:string" use="required" /> | ||
<!-- AWS --> | ||
<xsd:attribute name="accessKeyId" type="xsd:string" /> | ||
<xsd:attribute name="secretAccessKey" type="xsd:string" /> | ||
<xsd:attribute name="sessionToken" type="xsd:string" /> | ||
<!-- Azure --> | ||
<xsd:attribute name="tenantId" type="xsd:string" /> | ||
<xsd:attribute name="clientId" type="xsd:string" /> | ||
<xsd:attribute name="clientSecret" type="xsd:string" /> | ||
<xsd:attribute name="keyVaultEndpoint" type="xsd:string" /> | ||
<xsd:attribute name="identityPlatformEndpoint" type="xsd:string" /> | ||
<xsd:attribute name="keyName" type="xsd:string" /> | ||
<xsd:attribute name="keyVersion" type="xsd:string" /> | ||
<!-- GCP --> | ||
<xsd:attribute name="email" type="xsd:string" /> | ||
<xsd:attribute name="privateKey" type="xsd:string" /> | ||
<xsd:attribute name="endpoint" type="xsd:string" /> | ||
<xsd:attribute name="projectId" type="xsd:string" /> | ||
<xsd:attribute name="location" type="xsd:string" /> | ||
<xsd:attribute name="keyRing" type="xsd:string" /> | ||
<!-- Attribute already present for another KMS type --> | ||
<!-- <xsd:attribute name="keyName" type="xsd:string" /> --> | ||
<!-- <xsd:attribute name="keyVersion" type="xsd:string" /> --> | ||
<!-- KMIP --> | ||
<!-- <xsd:attribute name="endpoint" type="xsd:string" /> --> | ||
<!-- Local --> | ||
<xsd:attribute name="key" type="xsd:string" /> | ||
</xsd:complexType> | ||
|
||
<xsd:complexType name="master-key"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this warrant its own complex type? Why not just allow the master key to be specified as an attribute on the parent That would be consistent with the other string options at that level, such as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The master key is an array, not a string. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on this XSD, There are various struct formats (by provider) for the The XSD defines the
Unless I'm mistaken (and my XSD is rusty), that's going to allow a single Should this be changed to allow any number of |
||
<xsd:attribute name="key" type="xsd:string" use="required" /> | ||
</xsd:complexType> | ||
|
||
<xsd:complexType name="tls-options"> | ||
<xsd:attribute name="tlsCAFile" type="xsd:string" /> | ||
<xsd:attribute name="tlsCertificateKeyFile" type="xsd:string" /> | ||
<xsd:attribute name="tlsCertificateKeyFilePassword" type="xsd:string" /> | ||
<xsd:attribute name="tlsDisableOCSPEndpointCheck" type="xsd:boolean" /> | ||
</xsd:complexType> | ||
|
||
<xsd:simpleType name="encrypted-fields-map"> | ||
<xsd:restriction base="xsd:string"/> | ||
</xsd:simpleType> | ||
|
||
<xsd:complexType name="encrypted-queries"> | ||
<xsd:attribute name="queryType" type="xsd:string" use="required" /> | ||
<xsd:attribute name="min" type="xsd:string" /> | ||
<xsd:attribute name="max" type="xsd:string" /> | ||
<xsd:attribute name="sparsity" type="xsd:string" /> | ||
<xsd:attribute name="trimFactor" type="xsd:string" /> | ||
</xsd:complexType> | ||
|
||
<xsd:complexType name="extra-options"> | ||
<xsd:sequence> | ||
<xsd:element name="mongocryptdSpawnArgs" type="xsd:string" minOccurs="0" maxOccurs="unbounded" /> | ||
</xsd:sequence> | ||
<xsd:attribute name="mongocryptdURI" type="xsd:string" /> | ||
<xsd:attribute name="mongocryptdBypassSpawn" type="xsd:boolean" /> | ||
<xsd:attribute name="mongocryptdSpawnPath" type="xsd:string" /> | ||
<xsd:attribute name="cryptSharedLibPath" type="xsd:string" /> | ||
<xsd:attribute name="cryptSharedLibRequired" type="xsd:boolean" /> | ||
</xsd:complexType> | ||
|
||
<xsd:complexType name="document-manager"> | ||
<xsd:choice maxOccurs="unbounded"> | ||
<xsd:element name="filter" type="filter" minOccurs="0" maxOccurs="unbounded" /> | ||
<xsd:element name="mapping" type="mapping" minOccurs="0" maxOccurs="unbounded" /> | ||
<xsd:element name="metadata-cache-driver" type="metadata-cache-driver" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="profiler" type="profiler" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="metadata-cache-driver" type="metadata-cache-driver" minOccurs="0" /> | ||
<xsd:element name="profiler" type="profiler" minOccurs="0" /> | ||
</xsd:choice> | ||
<xsd:attribute name="id" type="xsd:string" use="required" /> | ||
<xsd:attribute name="auto-mapping" type="xsd:boolean" /> | ||
|
@@ -167,10 +249,10 @@ | |
|
||
<xsd:complexType name="metadata-cache-driver"> | ||
<xsd:all> | ||
<xsd:element name="class" type="xsd:string" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="host" type="xsd:string" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="instance-class" type="xsd:string" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="port" type="xsd:integer" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="class" type="xsd:string" minOccurs="0" /> | ||
<xsd:element name="host" type="xsd:string" minOccurs="0" /> | ||
<xsd:element name="instance-class" type="xsd:string" minOccurs="0" /> | ||
<xsd:element name="port" type="xsd:integer" minOccurs="0" /> | ||
</xsd:all> | ||
<xsd:attribute name="id" type="xsd:string" /> | ||
<xsd:attribute name="type" type="xsd:string" /> | ||
|
Uh oh!
There was an error while loading. Please reload this page.