-
Notifications
You must be signed in to change notification settings - Fork 24
Description
NanoTDF KAS resource locator path and key identifier
Context
Problem
- KAS resource locator usage varies
- No identifier for the KAS key in a NanoTDF
The NanoTDF specification requires enhancements to support key identifier and multiple ways to access KAS.
This section contains a Resource Locator type that allows describing access to a resource. In the case of the KAS, the Resource Locator defines how to access a KAS.
The Resource Locator is a way for the nanotdf to represent references to external resources in as succinct a format as possible.
See https://github.com/opentdf/spec/tree/main/schema/nanotdf#3312-kas
Example body with protocol values:
https://secure.virtru.com/api/kas
http://kas.example.com:9000
\\securehost\kas
How to access a KAS
- Parse KAS resource locator field from NanoTDF header
- Create a URL using protocol enum and body. Body usually contains domain with a partial path, if needed, to the KAS service
- Append
/v2/rewrapor/kas/v2/rewrapor/rewrapto URL from step 2 (varies by SDK) - Perform a RESTful or gRPC call using the TDF protocol (varies by SDK)
Which KAS key
As we introduce multiple KAS keys and perform key rotations, we need a key identifier kid used in creating the NanoTDF so a rewrap operation can use the same key.
Policy Key Access
This section allows for an ephemeral key other than the Payload key to encrypt the policy.
Goal
- Clarify specification in regards to "How to access a KAS":
- Define how to build the URL to perform a rewrap request including
kid - Define what parts of the URL are defined where
- Define where to find what RPC methods are available
- Define a strategy on how to find KAS if relocated in the future
- Update specification in regards to "Which KAS key":
- Choose
kidor public key - Clarify keys (policy and payload key?)
- Define where to locate
kidon decryption - Define how to determine
kidon encryption - Define what format it takes
- Define how to use it when accessing KAS
Related
- ✨ Adds key identifier field to KAO spec#21
- ADR: NanoTDF Attribute Storage Optimization in 255-bytes #917
- TDF KAS field can have different paths and scheme for a single KAS #873
Included here because a possible version change to NanoTDF specification could influence this decision.
Decision
⚖️ Add or Use Key Identifier section
See #1199
0x03 Embedded Policy (Encrypted w/Policy Key Access)
0x04 Embedded Policy (Encrypted w/KAS Key Access)
Rationale: Only KAS needs to know the public key or kid. It has no impact on how to access KAS.
Changes:
- Add new section to Header - Key identifier 32B - 133B
- Recommended name "Payload Key Access" section
- 🟨 Similar to Policy Key Access
- 🟥 NanoTDF version update
⚖️ Add Key Identifier to Policy
See #1197
Rationale: KAS presents multiple keys available to a client. The client determines which key based on the use case policy.
Changes:
- Add KAS public key field
- Or Add
kidfield with compute and format specification - Optional Policy Key Access section is required
Example attribute
urn:opentdf:kas:ec:secp256r1:43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8urn:ietf:params:oauth:jwk-thumbprint:sha-256:NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs
- 🟩 Policy section is relatively large
- 🟩 Policy section is processed by KAS
- 🟩 Policy section has binding
- 🟨 NanoTDF specification clarification
⚖️ Add Key Identifier to KAS Resource Locator
See Specification opentdf/spec#40
See Implementation #1222
Rationale: KAS has multiple keys available to a client. The client determines which key based on the use case policy.
Changes:
- Add recommend way to add a
kidto a policy with default implementation in KAS and SDK
- 🟨 Resource Locator is 257B
- 🟨 NanoTDF specification clarification
- 🟥 KAS must parse a freeform URL fragment created by SDK
- 🟥 No binding, attack vector for public key thumbprint
⚖️ Resource Locator format: URN
Rationale: Introducing a URN type that includes both domain and identifier enhances the ability to uniquely and efficiently reference resources.
Changes:
- A new URN type will be added to the resource locator format. The URN will include the domain and a unique identifier, following the pattern:
urn:opentdf:kas:<domain>:<identifier>. - example
virtru.com:01edksqtx9cfzzt1y9sm57h3yq <identifier>in ULID 16 bytes- Protocol enum for
urn
| Value | Protocol |
|---|---|
| 0x00 | http |
| 0x01 | https |
| 0x03 | urn:opentdf:kas |
| 0x02 | unreserved |
| 0xff | Shared Resource Directory |
- 🟩 Concise and compact
- 🟨 SDK computes and formats
- 🟨 NanoTDF and ZTDF specification change
⚖️ Resource Locator format: URL query parameter
See #1190
virtru.com/api/kas?kid=435143a1b5fc8bb70a3aa9b10f6673a8
- 🟩 Chain-of-trust through DNSSEC and Certificates
- 🟨 Not a succinct format
- 🟨 With or without
: - 🟨 URL encode or not
- 🟨 SDK computes and formats
- 🟨 NanoTDF specification clarification
- 🟨 URL resolution is responsibility of Ops, not Security
- 🟨 Port is difficult to maintain over time
Decision
TBD
References
- NanoTDF Specification (current version)
- TDF3 Specification