You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we support creating ZTDFs in 'offline' mode with the WithKasInformation (which allows setting a single public key), and via the Cached field in the key access registry, which allows loading KAS public key information from a third party. We should make this work explicit by allowing several options for configuring the KAS public keys.
func (s *SDK) StoreKASKeys(url string, keySet ...*policy.KasPublicKeySet) error: Load the given keys
func WithKASKeys(cached_keys ...*policy.KasPublicKeySet) Option: Configure the SDK's keyCache with the given pre-loaded items.
func WithKASLookup(f ...KASKeyLookup) Option: Replace the KAS key lookup with a function; can be called multiple times.
a. type KASKeyLookup func{string) (*policy.KasPublicKeySet, err): type used for KAS public key lookup
b. func KASKeyDirectLookup(url string)(*policy.KasPublicKeySet, err): current behavior (default)
c. func KASRegistryKeyLookup(url string)(*policy.KasPublicKeySet, err): check a registry for the key in its cache
Optional:
Add equivalent options for encrypt (createX) and any tamper check functions, if those exist, to allow finer-grained control over the public key lookup
Separate out allowlist behavior explicitly? Or at least describe how to implement it with middleware.
deprecate existing methods that don't provide sufficient functionality (nano one just doesn't work; ztdf one doesn't allow multiple keys, and therefore doesn't support algorithm choice)
The text was updated successfully, but these errors were encountered:
- Adds new method, `sdk.SDK.StoreKASKeys` to load kas key cache
- Use the sdk's `getPublicKey` method from the nanotdf code as expected,
which defers to the cache
- Removes dead or duplicated code that (tried to) do this
- Fixes#1547
Currently, we support creating ZTDFs in 'offline' mode with the
WithKasInformation
(which allows setting a single public key), and via theCached
field in the key access registry, which allows loading KAS public key information from a third party. We should make this work explicit by allowing several options for configuring the KAS public keys.func (s *SDK) StoreKASKeys(url string, keySet ...*policy.KasPublicKeySet) error
: Load the given keysFollow up work:
Original Proposal:
func WithKASKeys(cached_keys ...*policy.KasPublicKeySet) Option
: Configure the SDK's keyCache with the given pre-loaded items.func WithKASLookup(f ...KASKeyLookup) Option
: Replace the KAS key lookup with a function; can be called multiple times.a.
type KASKeyLookup func{string) (*policy.KasPublicKeySet, err)
: type used for KAS public key lookupb.
func KASKeyDirectLookup(url string)(*policy.KasPublicKeySet, err)
: current behavior (default)c.
func KASRegistryKeyLookup(url string)(*policy.KasPublicKeySet, err)
: check a registry for the key in its cacheOptional:
The text was updated successfully, but these errors were encountered: