Skip to content

feat(kms): add AWS, GCP and Azure KMS clients - #1208

Open
shangxinli wants to merge 3 commits into
apache:mainfrom
shangxinli:pr-enc17-kms-clients
Open

shangxinli wants to merge 3 commits into
apache:mainfrom
shangxinli:pr-enc17-kms-clients

Conversation

@shangxinli

Copy link
Copy Markdown
Contributor

Part of #988 (step 17 of the task breakdown). This is independent of the other encryption steps: it only builds on the KmsRegistry merged in #1031.

Adds the optional iceberg_kms library (CMake option ICEBERG_BUILD_KMS, off by default) with key management clients for AWS KMS, Google Cloud KMS and Azure Key Vault, registered as the aws, gcp and azure KMS types.

  • The clients call each service's REST API through an injectable HttpClient (cpr by default) instead of a cloud SDK. Redirects are disabled, so wrapped key material is never replayed to another host.
  • They read the same catalog properties as the Java clients where Java defines one. Properties with no Java equivalent are marked "C++ only" in kms_clients.h, because Java takes those from the SDK's default credential chain.
  • AWS requests are signed with SigV4 (OpenSSL HMAC-SHA256), checked against the AWS SigV4 test suite vectors.
  • CI builds the clients in the Ubuntu Debug job.

Known limits, also documented in kms_clients.h:

  • The SDK credential provider chains (AWS profiles, instance roles, web identity; Google application default credentials; Azure managed identities) are not implemented. Credentials come from properties, the standard AWS environment variables, or a token. A custom client can be registered for anything else.
  • Registration also runs at static initialization, which a static archive link can drop when nothing else references the library. iceberg::kms::RegisterAll() registers explicitly.

The user documentation page for encryption lands with the PR that enables writes, so this PR has no docs change.

Tests: kms_clients_test covers the three clients with a fake HttpClient plus the SigV4 vectors.

🤖 Generated with Claude Code

Add the optional iceberg_kms library (CMake option ICEBERG_BUILD_KMS) with
key management clients for AWS KMS, Google Cloud KMS and Azure Key Vault,
registered in KmsRegistry as the `aws`, `gcp` and `azure` KMS types.

The clients call the services' REST APIs through an injectable HTTP client
(cpr by default, with redirects disabled so key material is never replayed
to another host) instead of the cloud SDKs, and read the same catalog
properties as Java where Java defines them. AWS requests are signed with
SigV4 (OpenSSL HMAC-SHA256), tested against the AWS SigV4 test suite.
Credentials come from properties or the standard AWS environment
variables; GCP and Azure take an access token.

CI builds the clients in the Ubuntu Debug job.
@shangxinli
shangxinli force-pushed the pr-enc17-kms-clients branch from e021531 to c2742c5 Compare December 3, 2026 18:34

This branch has not been deployed

No deployments
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.

1 participant