hectar-glitches opened a new pull request, #1493:
URL: https://github.com/apache/iceberg-go/pull/1493

   ## What
   
   Adds a named-factory registry for `KeyManagementClient` implementations, 
selected via the `encryption.kms-type` / `encryption.kms-impl` catalog 
properties. This completes the second half of the "KMS client interface"
   checklist item from #1289 (the interface + in-memory impl landed in #1447).
   
   Mirrors the existing `io.Register`/`io.SchemeFactory` scheme registry 
pattern (`io/registry.go`) rather than introducing a new convention.
   
   ## Details
   
   - `RegisterKMS(name, factory)` / `UnregisterKMS(name)` / 
`GetRegisteredKMSNames()`: a mutex-guarded named registry for `KMSFactory` 
implementations.
   - `LoadKeyManagementClient(props)`: resolves `encryption.kms-type` first,
     falling back to `encryption.kms-impl`: returning an error wrapping the new
     `ErrKMSTypeNotFound` if neither is set or the name isn't registered.
   - Registers `"memory"` to `InMemoryKeyManagementClient` as the built-in 
option in `init()`.
   
   ## Not in scope
   
   - `StandardEncryptionManager` (envelope KEK/DEK logic).
   
   ## Testing
   
   - New unit tests in `encryption/kms_registry_test.go` covering: resolution 
via each property, `kms-type` taking precedence when both are set, 
missing/unregistered names, duplicate/nil-factory registration panics, and 
factory-error propagation.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to