-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Description
The current implementation of nanoTDF in the SDK only supports encrypted policy. The nanoTDF spec explicitly supports encrypted and plaintext policy.
The current need of plaintext policy is to both be compatible with Base TDF (ZTDF), but also to enable reading the policy for visibility trimming without the need to over-privledge service accounts.
See spec: https://github.com/opentdf/spec/blob/main/schema/nanotdf/README.md
Policy mode hardcoded as encrypted: https://github.com/opentdf/platform/blob/main/sdk/nanotdf.go#L502-L503
Policy body encrypted:
Lines 547 to 554 in ee67026
const ( | |
kIvLength = 12 | |
) | |
iv := make([]byte, kIvLength) | |
cipherText, err := aesGcm.EncryptWithIVAndTagSize(iv, policyObjectAsStr, tagSize) | |
if err != nil { | |
return nil, 0, 0, fmt.Errorf("AesGcm.EncryptWithIVAndTagSize failed:%w", err) | |
} |
Metadata
Metadata
Assignees
Labels
No labels