Skip to content

Conformance vectors for binding_hash (JCS + SHA-256) #556

Description

@mcguinness

Summary

Add byte-identical conformance test vectors for the denial-binding binding_hash construction, so an independently implemented PDP and Access Request Service have a pass/fail target instead of a prose-only specification.

Background

binding-token-integrity pins the hashed denial-binding form by recomputation over a JCS (RFC 8785) serialized JSON object plus SHA-256. That is correct, but prose-pinned canonicalization is exactly where independently implemented parties quietly diverge (the field set, nesting, and how binding_context_members selects the hashed context members).

Raised in PR #532 review, where a reviewer offered to contribute vectors already validated byte-for-byte across TypeScript, Python, and Go.

Scope

Vectors for:

  • Single-item binding_hash: base64url(SHA-256(JCS({"subject": <Subject>, "resource": <Resource>, "action": <Action>, "context": <authz-relevant Context>}))), with subject.properties.act removed.
  • Bulk binding_hash: the {"subject": <Subject>, "items": [{"resource": <Resource>, "action": <Action>}, ...], "context": <authz-relevant Context>} form, preserving bound item order.
  • binding_context_members selection: which context members feed the hash (the subtlest part, and the one most worth a vector).
  • Edge cases: absent vs null members, number canonicalization, array ordering, and an empty authorization-relevant context.

Where

An interop test-vectors location, or a draft appendix. TBD.

Depends on

Freezing the binding_hash field object (currently specified in binding-token-integrity); tracks PR #532.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions