Skip to content

Version the attest:* IAM tag schema shared between qualify and attest #32

Closed

Description

@scttfrdmn

Problem

qualify writes attest:* IAM tags; attest reads them via its principal resolver. Both sides define the tag key strings independently:

  • qualify: internal/training/service.go — moduleTagMap
  • attest: internal/principal/resolver.go — hardcoded tag key parsing

If either side renames a tag (e.g., attest:cui-training → attest:cui-training-complete), the other side silently breaks — qualify writes the new key, attest reads the old key (or vice versa), and Cedar policies evaluate attributes as missing rather than returning an error.

Proposed fix

Create a shared schema document (or Go package at github.com/provabl/schemas) that both repos import:

// Tag keys for attest:* IAM role tags written by qualify
const (
    TagCUITraining     = "attest:cui-training"
    TagHIPAATraining   = "attest:hipaa-training"
    TagCOCCheckCurrent = "attest:coc-check-current"
    // ...
)

At minimum, document the tag schema in both READMEs with a note to bump a version marker when any key changes.

Related

  • qualify internal/training/service.go:32 (moduleTagMap)
  • attest internal/principal/resolver.go (tag reading)

Activity

  1. scttfrdmn commented on Apr 30, 2026

    @scttfrdmn
    CollaboratorAuthor

    Partially implemented: qualify internal/training/tags.go now defines all attest:* tag key constants, and attest pkg/schema/tags.go defines the same set. Both repos reference the tracking issue in their files. The attest principal resolver now uses schema.Tag* constants instead of bare strings (commit 0223592). Full resolution (shared github.com/provabl/schemas package) moves to v0.2.0 — the risk of silent divergence is now mitigated by named constants catching compile-time renames.

  2. added
    type:arch
    component:backend
    priority:high
    on Jun 8, 2026
  3. scttfrdmn commented on Jun 8, 2026

    @scttfrdmn
    CollaboratorAuthor

    Related: the evidence-kernel re-pointing (#38) will produce these attest:* attributes via lower.ToAttributes — the versioned schema this issue defines is exactly that lowering output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:backendpriority:hightype:arch

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions