feat(config): Add ssl_config to global_config (DM-3969)#2720
Open
haakonvt wants to merge 5 commits into
Open
Conversation
ssl_config to global_config (DM-3969)
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds support for configuring a custom ssl_context globally in GlobalConfig to enable certificate verification against custom CA bundles or the OS trust store, alongside updating the documentation. Key feedback includes using an explicit is not None check for ssl_context in the HTTP client to avoid issues with falsy mock objects, and removing a redundant ValueError in apply_settings that prevents programmatic configuration.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2720 +/- ##
==========================================
- Coverage 93.67% 93.65% -0.02%
==========================================
Files 504 504
Lines 51112 51118 +6
==========================================
- Hits 47878 47877 -1
- Misses 3234 3241 +7
🚀 New features to boost your workflow:
|
haakonvt
force-pushed
the
add-ssl-context-config
branch
from
July 13, 2026 13:17
a18b4c6 to
06c418e
Compare
…nd OS trust store
haakonvt
force-pushed
the
add-ssl-context-config
branch
from
July 17, 2026 11:13
06c418e to
538473d
Compare
haakonvt
commented
Jul 17, 2026
| disable_ssl (bool): Whether or not to disable SSL. Defaults to False | ||
| ssl_context (ssl.SSLContext | None): Custom SSL context for certificate verification. Overrides the | ||
| default certifi bundle. Ignored when ``disable_ssl`` is True. Must be set before the first API | ||
| request. Defaults to None. See https://cognite-sdk-python.readthedocs-hosted.com/en/latest/settings.html#ssl-certificate-configuration |
Contributor
Author
vvb16
approved these changes
Jul 17, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

feat(config): add
ssl_contexttoGlobalConfigAdds
global_config.ssl_context(ssl.SSLContext | None) so users can configure custom certificate verification without relying on environment variables.Motivation: The SDK migrated from
requeststohttpx, which droppedREQUESTS_CA_BUNDLEsupport. Users with corporate/internal CAs previously had to fall back toSSL_CERT_FILE/SSL_CERT_DIR. This gives them a clean in-code alternative.