Closed
Labels
component:backendInstitutional backendpriority:highSignificant value, should not sliptype:archArchitecture or structural change
Milestone
Description
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)
Metadata
Metadata
Assignees
Labels
component:backendInstitutional backendpriority:highSignificant value, should not sliptype:archArchitecture or structural change
Activity
refactor: single source of truth for module tag map + versioned tag s…
scttfrdmn commentedon Apr 30, 2026
Partially implemented: qualify
internal/training/tags.gonow defines allattest:*tag key constants, and attestpkg/schema/tags.godefines the same set. Both repos reference the tracking issue in their files. The attest principal resolver now usesschema.Tag*constants instead of bare strings (commit 0223592). Full resolution (sharedgithub.com/provabl/schemaspackage) moves to v0.2.0 — the risk of silent divergence is now mitigated by named constants catching compile-time renames.scttfrdmn commentedon Jun 8, 2026
Related: the evidence-kernel re-pointing (#38) will produce these
attest:*attributes vialower.ToAttributes— the versioned schema this issue defines is exactly that lowering output.feat(schema): versioned attest:* tag contract + conformance test (qua…