Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jsonwebtoken = { version = "9", default-features = false, features = ["use_pem"]
pkcs8 = { version = "0.10", features = ["encryption", "pem", "std"] } # PKCS#8 PEM parsing + PBES2 passphrase decryption

[dev-dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "io-util"] }
wiremock = "0.6"
tempfile = "3"
log = "0.4"
Expand All @@ -150,6 +150,12 @@ log = "0.4"
# into the shipped crate.
rsa = { version = "0.9", features = ["pem"] }
p256 = { version = "0.13", features = ["pkcs8", "pem"] }
# Hermetic mTLS C-ABI tests generate a private CA and client/server identities
# at runtime, then serve HTTPS with mandatory client-certificate verification.
# This avoids committed credentials, external processes, and live workspaces.
rcgen = "0.14.9"
rustls = { version = "0.23.41", default-features = false, features = ["ring", "std", "tls12"] }
tokio-rustls = { version = "0.26.4", default-features = false, features = ["ring", "tls12"] }

# TLS backend selection.
#
Expand Down
5 changes: 5 additions & 0 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ changes go in their respective binding's NEXT_CHANGELOG.

### Added

- C ABI: expose the kernel's existing mTLS client identity configuration
through `kernel_session_config_set_tls_client_certificate()`. The client
certificate and private key are supplied atomically and must both be
non-empty.

### Changed

### Updated
Expand Down
12 changes: 12 additions & 0 deletions include/databricks_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,18 @@ KernelStatusCode kernel_session_config_set_tls_allow_self_signed(KernelSessionCo
KernelStatusCode kernel_session_config_set_tls_skip_hostname_verification(KernelSessionConfig* config,
bool skip);

/* Configure a client certificate and private key for mutual TLS (mTLS).
* Both values are required and configured atomically. `cert_pem` contains
* the PEM leaf certificate followed by any intermediate certificates;
* `key_pem` contains the matching unencrypted PEM private key. PKCS#8 is
* recommended for portability across the kernel's TLS backends.
*
* A null pointer or zero length for either value returns InvalidArgument.
* The input buffers are copied before this function returns. */
KernelStatusCode kernel_session_config_set_tls_client_certificate(
KernelSessionConfig* config, const uint8_t* cert_pem, size_t cert_len,
const uint8_t* key_pem, size_t key_len);

/* Configure the HTTP retry / backoff policy. `min_wait_ms` / `max_wait_ms`
* are the backoff-wait bounds between attempts (the wait is exponential
* with jitter, clamped to this range); `max_retries` is the number of
Expand Down
Loading
Loading