Skip to content

Document server-owned canonical authorization namespace hashes #232

Description

@zcourts

Contract gap

anvil-core/src/authz_realm_schema.rs canonicalizes an authorization schema and replaces each client-supplied namespace hash with a deterministic protobuf-domain hash. That appears intentional, but clients can reasonably interpret the request hash as round-trippable input and reject the correct returned schema.

Required contract

Document and test that:

  • client-supplied namespace hashes are not preserved;
  • Anvil canonicalizes schema semantics and the returned non-empty namespace hash is authoritative;
  • clients should compare canonical semantics and/or an authoritative schema-reference digest, not a JSON-input-domain hash;
  • the hash algorithm/domain/version has an explicit compatibility story.

Do not change canonical server hashing merely to preserve arbitrary client hashes.

Acceptance criteria

  • Public schema API documentation states ownership and validation semantics.
  • Proto/API field comments identify input versus authoritative output behavior.
  • Round-trip test submits a differing non-empty client hash and proves the returned schema is semantically equivalent with Anvil’s canonical hash.
  • Compatibility/versioning behavior is covered for future canonical encoding changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:taskExecutable implementation or verification work

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions