-
Notifications
You must be signed in to change notification settings - Fork 455
CDRIVER-4206 KMIP support #881
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
Merged
Merged
Changes from all commits
Commits
Show all changes
93 commits
Select commit
Hold shift + click to select a range
1c8d9db
add failing kmsKMIP test
kevinAlbs 0b42575
get kmsKMIP test passing with hardcoded TLS options
kevinAlbs f9e52a4
CDRIVER-4087 document Azure and GCP KMS providers
kevinAlbs 6a5e42c
fix URI documentation, include "FILE" in MONGOC_URI_TLSCERTIFICATEKEY…
kevinAlbs 66a7742
document "kmip" KMS provider opts
kevinAlbs 413ddf4
SCAFFOLDING - debug log each ctx state
kevinAlbs 2513fa5
parse kmip.tls from KMS providers, and use for TLS streams to kmip
kevinAlbs d7bdada
add MONGOC_TEST_KMIP_TLS_CA_FILE
kevinAlbs 90b3a87
fix leak in _parse_kms_providers
kevinAlbs a9dcb0e
add datakey/double encryption + custom endpoint prose tests
kevinAlbs cfe8446
add corpus tests
kevinAlbs 98b2b94
WIP: add KMIP server to run kms servers
kevinAlbs 1e6133c
WIP: use kevinAlbs/libmongocrypt
kevinAlbs e8ab473
WIP: add env vars to run KMIP tests
kevinAlbs 2aadc55
add more error logs
kevinAlbs d8d84af
TEMP: faster compile-unix.sh
kevinAlbs 82d5e6f
TEMP: fix test subselector
kevinAlbs a79042b
TEMP: add more logging
kevinAlbs 8433381
run only kmipKMS
kevinAlbs bfe5247
fix windows BUILD_VERSION
kevinAlbs ca6175f
add sleep for KMS server
kevinAlbs 4254ba0
TEMP: increase timeout
kevinAlbs 03dc47d
add fflush to MONGOC_DEBUG
kevinAlbs 6a040b8
TEMP add --no-fork to windows
kevinAlbs 38a66c2
skip mock tests on windows
kevinAlbs a778713
run all client_side_encryption tests; use wait_for_kms_server
kevinAlbs 62089d4
update evg python scripts
kevinAlbs f216ddb
update corpus-encrypted from specifications repo
kevinAlbs a8291ec
use default_ports.352 branch
kevinAlbs 5875569
use default_ports.352 on Windows
kevinAlbs e7cb25c
remove default port logic
kevinAlbs 4954616
update Custom Endpoint test 11 and add test 12
kevinAlbs 7ff60fe
add KMIP TLS options prose test
kevinAlbs 531e3e3
add failing TLS options test
kevinAlbs b6e7697
remove redundant test_kmip_tls_options
kevinAlbs 7170f0a
update auto encryption and client encryption docs to add TLS options …
kevinAlbs e06cb22
support TLS options in AWS, Azure, and GCP
kevinAlbs c290ae2
add mock_kms_server on port 8002 to evg
kevinAlbs 5550429
update test_kms_tls_options
kevinAlbs 6d972fd
remove default_ports branch workaround
kevinAlbs 6b0e4f8
remove error messages for TLS handshake errors
kevinAlbs c9bdc92
add back temporarily removed tests
kevinAlbs 11872e5
remove test case 5 from TLS Options tests
kevinAlbs 6b29e41
skip TLS Options tests on Windows due to CDRIVER-4181
kevinAlbs 1261fa1
add expired and invalid hostname cases
kevinAlbs 201ddf3
add wait_for_kms_server on port 8002
kevinAlbs c0ad0e0
add stub API and docs for mongoc_auto_encryption_opts_set_tls_opts an…
kevinAlbs 8a52b71
move examples to client-side-encryption-doc-snippets
kevinAlbs 7e53b06
add failing unit test
kevinAlbs 2b6d448
implement set_tls_opts
kevinAlbs 8184766
remove dead code
kevinAlbs 966890b
update tests to use new set_tls_opts helpers
kevinAlbs 09db02d
use mongodb-labs/drivers-evergreen-tools now that mock KMIP server ch…
kevinAlbs 8f1c10b
fix leak
kevinAlbs b7d5452
remove MONGOC_TEST_KMIP_ENDPOINT
kevinAlbs 2e3a815
update CONTRIBUTING with all mock server scripts
kevinAlbs 4233f64
remove scaffolding
kevinAlbs 3bd6ece
reject TODOs
kevinAlbs e62a000
remove "tls" from opts_set_kms_providers RST docs
kevinAlbs 290f8bb
update docs on _parse_all_tls_opts and _parse_one_tls_opts
kevinAlbs 3d489ff
clang-format CSFLE changes
kevinAlbs 5360817
revert unnecessary BUILD_VERSION
kevinAlbs ac81b49
MONGOC_TEST_KMIP_* => MONGOC_TEST_CSFLE_*
kevinAlbs f769f20
add newline
kevinAlbs a37ec6b
fix formatting
kevinAlbs b1f3c72
refactor while loop to continue instead of 'else if'
kevinAlbs 0a1a437
improve tmp_bson error
kevinAlbs fa49c41
fix variable name for env var
kevinAlbs e356dbd
fix format
kevinAlbs 7638cb5
zero out error for clearer assertions
kevinAlbs aedec87
remove extra ca_file argument to tmp_bson
kevinAlbs f4fe1da
no TLS => no client cert
kevinAlbs 5f532ce
use mongocrypt_errno
kevinAlbs ee5e7d6
clear errors for test assertions
kevinAlbs 59714ef
clang-format
kevinAlbs f9e753d
Apply suggestions from code review
kevinAlbs 02c74e0
Update src/libmongoc/tests/test-mongoc-client-side-encryption.c
kevinAlbs 9eed051
update error message for insecure TLS options
kevinAlbs 0901446
remove unnecessary else-ifs
kevinAlbs ebdd3dc
doc fixups
kevinAlbs ac9ca20
remove unused args in example
kevinAlbs c4699f0
Reject duplicate fields in _parse_all_tls_opts. Always leave out_opt …
kevinAlbs 571472f
Test the assumption that it is safe to call _mongoc_ssl_opts_cleanup …
kevinAlbs eba179d
remove kmip arg from _make_tls_opts
kevinAlbs 0ee3375
add test_framework_getenv_required
kevinAlbs e96bced
add all CSFLE env vars to test_framework_skip_if_no_client_side_encry…
kevinAlbs eb7c833
use test_framework_getenv_required
kevinAlbs 6d0a1c4
extract encrypt/decrypt from custom endpoint test into separate macro
kevinAlbs ad8a9eb
Update src/libmongoc/tests/test-libmongoc.c
kevinAlbs 4ea4342
Update src/libmongoc/tests/test-libmongoc.c
kevinAlbs faa6666
add _bson_copy_or_null
kevinAlbs 6c769e8
fix test using uninitialized tls_opts
kevinAlbs 16197c4
Merge branch 'master' into kmip.DRIVERS-1353
kevinAlbs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/libmongoc/doc/mongoc_auto_encryption_opts_set_tls_opts.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
:man_page: mongoc_auto_encryption_opts_set_tls_opts | ||
kevinAlbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
mongoc_auto_encryption_opts_set_tls_opts() | ||
========================================== | ||
|
||
Synopsis | ||
-------- | ||
|
||
.. code-block:: c | ||
|
||
void | ||
mongoc_auto_encryption_opts_set_tls_opts ( | ||
mongoc_auto_encryption_opts_t *opts, const bson_t *tls_opts); | ||
|
||
|
||
Parameters | ||
---------- | ||
|
||
* ``opts``: The :symbol:`mongoc_auto_encryption_opts_t` | ||
* ``tls_opts``: A :symbol:`bson_t` mapping a Key Management Service (KMS) provider name to a BSON document with TLS options. | ||
|
||
``tls_opts`` is a BSON document of the following form: | ||
|
||
.. code-block:: javascript | ||
|
||
<KMS provider name>: { | ||
tlsCaFile: Optional<String> | ||
tlsCertificateKeyFile: Optional<String> | ||
tlsCertificateKeyFilePassword: Optional<String> | ||
} | ||
|
||
The KMS providers ``aws``, ``azure``, ``gcp``, and ``kmip`` are supported as keys in the ``tls_opts`` document. | ||
|
||
``tls_opts`` maps the KMS provider name to a BSON document for TLS options. | ||
|
||
The BSON document for TLS options may contain the following keys: | ||
|
||
- ``MONGOC_URI_TLSCERTIFICATEKEYFILE`` | ||
- ``MONGOC_URI_TLSCERTIFICATEKEYFILEPASSWORD`` | ||
- ``MONGOC_URI_TLSCAFILE`` | ||
|
||
.. literalinclude:: ../examples/client-side-encryption-doc-snippets.c | ||
:caption: Example use | ||
:start-after: BEGIN:mongoc_auto_encryption_opts_set_tls_opts | ||
kevinAlbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
:end-before: END:mongoc_auto_encryption_opts_set_tls_opts | ||
:dedent: 6 | ||
|
||
See :doc:`configuring_tls` for a description of the behavior of these options. | ||
|
||
.. seealso:: | ||
|
||
| :symbol:`mongoc_client_enable_auto_encryption()` | ||
|
||
| The guide for :doc:`Using Client-Side Field Level Encryption <using_client_side_encryption>` | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/libmongoc/doc/mongoc_client_encryption_opts_set_tls_opts.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
:man_page: mongoc_client_encryption_opts_set_tls_opts | ||
|
||
mongoc_client_encryption_opts_set_tls_opts() | ||
============================================ | ||
|
||
Synopsis | ||
-------- | ||
|
||
.. code-block:: c | ||
|
||
void | ||
mongoc_client_encryption_opts_set_tls_opts ( | ||
mongoc_client_encryption_opts_t *opts, const bson_t *tls_opts); | ||
|
||
|
||
Parameters | ||
---------- | ||
|
||
* ``opts``: The :symbol:`mongoc_client_encryption_opts_t` | ||
* ``tls_opts``: A :symbol:`bson_t` mapping a Key Management Service (KMS) provider name to a BSON document with TLS options. | ||
|
||
``tls_opts`` is a BSON document of the following form: | ||
|
||
.. code-block:: javascript | ||
|
||
<KMS provider name>: { | ||
tlsCaFile: Optional<String> | ||
tlsCertificateKeyFile: Optional<String> | ||
tlsCertificateKeyFilePassword: Optional<String> | ||
} | ||
|
||
The KMS providers ``aws``, ``azure``, ``gcp``, and ``kmip`` are supported as keys in the ``tls_opts`` document. | ||
|
||
``tls_opts`` maps the KMS provider name to a BSON document for TLS options. | ||
|
||
The BSON document for TLS options may contain the following keys: | ||
|
||
- ``MONGOC_URI_TLSCERTIFICATEKEYFILE`` | ||
- ``MONGOC_URI_TLSCERTIFICATEKEYFILEPASSWORD`` | ||
- ``MONGOC_URI_TLSCAFILE`` | ||
|
||
.. literalinclude:: ../examples/client-side-encryption-doc-snippets.c | ||
:caption: Example use | ||
:start-after: BEGIN:mongoc_client_encryption_opts_set_tls_opts | ||
:end-before: END:mongoc_client_encryption_opts_set_tls_opts | ||
:dedent: 6 | ||
|
||
See :doc:`configuring_tls` for a description of the behavior of these options. | ||
|
||
.. seealso:: | ||
|
||
| The guide for :doc:`Using Client-Side Field Level Encryption <using_client_side_encryption>` | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.