Skip to content

chore(deps): OpenTDFKit 5.0.1, whose policy binding is the OpenTDF spec form - #8

Merged
arkavo-com merged 1 commit into
mainfrom
chore/opentdfkit-5
Oct 9, 2026
Merged

arkavo-com merged 1 commit into
mainfrom
chore/opentdfkit-5

Conversation

@arkavo-com

Copy link
Copy Markdown
Contributor

Summary

Behaviour change: the policy binding is now the spec form

OpenTDFKit 5 writes keyAccess.policyBinding.hash as base64(HMAC-SHA256(DEK, base64(policy))), the raw 32-byte digest. Version 4 wrote the legacy base64(hex(HMAC)).

Tests

  • HLSTDFPackagerPolicyTests decode the binding as base64 of the raw digest (44 characters, 32 bytes), and assert that it isn't the legacy hex form.
  • New FairPlayPolicyTests.openTDFKitBindingMatchesGolden: OpenTDFKit's binding equals the arks golden fixture, so the HLS and fMP4 paths agree.
  • swift test: all 233 tests in 41 suites pass.

This will be released as 0.2.0. Consumers' KASes need opentdf/platform#4081.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TTtgscNah3Wk739yom9NPF

…ec form

Require OpenTDFKit from 5.0.1 (5.0.0 cannot be resolved by version: it pinned
ZIPFoundation to a revision; 5.0.1 requires 0.9.20). Resolved: OpenTDFKit
5.0.1 (3512e27), CryptoSwift 1.10.0, ZIPFoundation 0.9.20.

OpenTDFKit 5 writes keyAccess.policyBinding.hash in the OpenTDF spec form,
base64(HMAC-SHA256(DEK, base64(policy))), the raw 32-byte digest, instead of
the legacy base64(hex(HMAC)). The HLS packager, the Standard TDF segment
crypto and the key provider take their binding from
TDFCrypto.policyBinding, so their manifests now carry the spec form. Rewrap
needs a KAS with opentdf/platform#4081; platform.arkavo.net has it. The
FairPlay (fMP4) path already wrote the spec form itself and is unchanged.

- HLSTDFPackagerPolicyTests decode the binding as base64 of the raw digest
  (44 characters, 32 bytes) and assert it is not the legacy hex form.
- FairPlayPolicyTests gains a cross-check: OpenTDFKit's binding equals the
  arks golden fixture, so the HLS and fMP4 paths agree.
- Doc comments describe the spec form.

swift test: 233 tests in 41 suites pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TTtgscNah3Wk739yom9NPF
@gitar-bot

gitar-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🔴 High risk · Switching policyBinding hashes to the raw-digest spec form could make rewrap fail on KAS versions lacking #4081.

Bumps OpenTDFKit to 5.0.1 so dependencies resolve by version, and switches the policy binding in HLS manifests to the OpenTDF spec form (base64 of the raw HMAC-SHA256 digest). No issues found.

Auto-approved: No blocking issues found.
Please see Auto-approve Docs for details on setting custom approval criteria.

Review coverage

🤖 Auto-approval Approved

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@gitar-bot gitar-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gitar has auto-approved this PR (configure)

@arkavo-com
arkavo-com merged commit 9c0068d into main Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant