Skip to content

[#12131] feat(kms): Configure and route named sources#12133

Open
nevzheng wants to merge 2 commits into
apache:mainfrom
nevzheng:codex/kms-api-02-sources
Open

[#12131] feat(kms): Configure and route named sources#12133
nevzheng wants to merge 2 commits into
apache:mainfrom
nevzheng:codex/kms-api-02-sources

Conversation

@nevzheng

@nevzheng nevzheng commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

What changes were proposed in this pull request?

Add server configuration and lifecycle management for named KMS sources:

  • parse gravitino.kms.sources and per-source properties;
  • discover provider factories with ServiceLoader;
  • create one long-lived client per configured source;
  • route requests by source and validate API/source agreement; and
  • initialize and close the registry with the Gravitino server.

Why are the changes needed?

Deployments may use multiple KMS instances, including multiple instances of one provider. Gravitino needs a central router and lifecycle owner instead of creating SDK or HTTP clients per request.

This PR completes the provider-neutral OSS foundation. Concrete provider implementations, provider integration tests, documentation, and packaging are tracked in datastrato/gravitino-enterprise#899.

Part of #12131. Depends on #12132.

Does this PR introduce any user-facing change?

Yes. It introduces the gravitino.kms.* server configuration namespace. No clients are created when no sources are configured.

How was this patch tested?

  • ./gradlew :core:test -PskipITs

Series

@nevzheng

Copy link
Copy Markdown
Collaborator Author

Hi @roryqi and @asdf1234 — please review this KMS API change (2/11). Previous: #12132. Next: #12134. Epic: #12131.

@github-actions

Copy link
Copy Markdown

Code Coverage Report

Overall Project 67.85% -0.05% 🟢
Files changed 57.07% 🔴

Module Coverage
aliyun 1.72% 🔴
api 48.25% +0.43% 🟢
authorization-common 85.96% 🟢
aws 42.04% 🟢
azure 2.47% 🔴
catalog-common 9.92% 🔴
catalog-fileset 79.74% 🟢
catalog-glue 66.91% 🟢
catalog-hive 79.4% 🟢
catalog-jdbc-common 45.7% 🟢
catalog-jdbc-doris 81.72% 🟢
catalog-jdbc-mysql 79.33% 🟢
catalog-jdbc-postgresql 83.39% 🟢
catalog-jdbc-starrocks 79.16% 🟢
catalog-kafka 77.01% 🟢
catalog-lakehouse-generic 59.18% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 85.86% 🟢
catalog-lakehouse-paimon 84.23% 🟢
catalog-model 77.72% 🟢
cli 44.5% 🟢
client-java 78.27% 🟢
common 51.95% 🟢
core 82.67% -0.41% 🟢
filesystem-hadoop3 77.28% 🟢
flink 0.0% 🔴
flink-common 47.09% 🟢
flink-runtime 0.0% 🔴
gcp 14.12% 🔴
hadoop-auth 68.0% 🟢
hadoop-common 12.7% 🔴
hive-metastore-common 53.4% 🟢
iceberg-common 64.65% 🟢
iceberg-rest-server 74.91% 🟢
idp-basic 86.02% 🟢
integration-test-common 0.0% 🔴
jobs 66.17% 🟢
lance-common 20.67% 🔴
lance-rest-server 64.84% 🟢
lineage 53.02% 🟢
optimizer 83.24% 🟢
optimizer-api 21.95% 🔴
server 85.92% 🟢
server-common 76.12% 🟢
spark 28.57% 🔴
spark-common 46.01% 🟢
tencent 69.84% 🟢
trino-connector 40.29% 🟢
Files
Module File Coverage
api KmsApi.java 100.0% 🟢
KmsClient.java 100.0% 🟢
KmsReference.java 100.0% 🟢
KmsAuthenticationException.java 0.0% 🔴
KmsClientFactory.java 0.0% 🔴
KmsConfigurationException.java 0.0% 🔴
KmsKeyProperties.java 0.0% 🔴
core KmsConfig.java 100.0% 🟢
KmsClientRegistry.java 98.88% 🟢
GravitinoEnv.java 20.93% 🔴

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