LiJie20190102 opened a new pull request, #14404:
URL: https://github.com/apache/gravitino/pull/14404

   ### What changes were proposed in this pull request?
   
   Add the seal SPI from the KMS-backed secret encryption design (#13755):
   
   - SealClient: a wrap/unwrap interface separate from the read-only KmsClient; 
its Javadoc requires that implementations never log key material.
   - SealClientFactory and SealClientRegistry: providers load from 
configuration (gravitino.seal.providers, 
gravitino.seal.provider.<name>.className), following the existing 
gravitino.kms.* configuration style. With no provider configured the registry 
is empty and behavior is unchanged.
   - A local implementation backed by a symmetric AES key file (AES-GCM, random 
IV per wrap), intended for development and tests only.
   - A reusable seal client contract test in testFixtures for future AWS KMS 
and GCP Cloud KMS implementations, plus unit tests covering registry loading 
and failure paths and wrap/unwrap round trips for the local implementation.
   
   ### Why are the changes needed?
   
   Envelope encryption needs a wrap/unwrap primitive so a KMS can protect the 
Gravitino master key while being contacted once per process start. The existing 
KmsClient performs no cryptographic operations.
   
   Fixes #14397
   
   ### Does this PR introduce any user-facing change?
   
   Yes. New optional gravitino.seal.* server configuration keys 
(gravitino.seal.providers, gravitino.seal.provider.<name>.className, and 
provider-specific properties such as gravitino.seal.provider.<name>.keyFile), 
and the new public SealClient/SealClientFactory SPI. No behavior change when no 
seal provider is configured.
   
   ### How was this patch tested?
   
   New unit tests: registry loading and failure paths (TestSealClientRegistry), 
configuration parsing (TestSealConfig), and the local implementation running a 
shared seal client contract (round trips, IV freshness, tamper and wrong-key 
rejection, close semantics, concurrent use) plus local-specific blob layout and 
factory configuration tests (TestLocalSealClient).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to