Repository navigation
feat(training): route identity + countries-of-concern tags through the kernel (closes #40) - #41
Merged
Merged
Conversation
…e kernel (closes #40) Follow-up to qualify#38 (#39), which routed training-module tag writing through the evidence kernel but scoped out the other two attest:* writers. This finishes the qualify re-point: SetIdentityTags (attest:lab-id, attest:admin-level) and RecordCountryCheck (attest:country, attest:coc-check-current, -expiry) now produce their tags through the kernel and the same tagsFromAttrs chokepoint, so ALL of qualify's attest:* emission flows through lower.ToAttributes — no hand-built tag sets remain. - internal/evidence: new AttributesProvider (ASP id 'attrs') — a second pair for direct attribute attestation. Unlike training there is no quiz, so the appraiser always passes; the verdict is 'these recorded attributes are attested as of now' and the claims are the attest:* tags. Empty input -> NotApplicable. - service.go: extracted runProviderToTags (the shared CVM run/appraise/lower path) and tagRole (the IAM write); writeAttestTags, SetIdentityTags, and RecordCountryCheck all use them. Tag KEYS are sourced from tags.go constants (TagLabID, TagCountry, ...) so the package never types an attest:* literal — same drift guard as the training pair. Behavior unchanged: the existing TestRecordCountryCheck_WritesIAMTags (which asserts the exact attest:country/coc-check-* tags) passes through the new path. Added TestSetIdentityTags_WritesIAMTags, an invalid-admin-level guard test, and attributes-provider tests (verbatim emission + empty=NotApplicable). make check (gofmt + vet + staticcheck + tests) green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #40. Follow-up to qualify#38 (#39), which routed training-module tag writing through the evidence kernel but scoped out the other two
attest:*writers. This finishes the qualify re-point: all of qualify'sattest:*emission now flows throughlower.ToAttributes— no hand-built tag sets remain.What changes
SetIdentityTags(attest:lab-id,attest:admin-level) andRecordCountryCheck(attest:country,attest:coc-check-current,-expiry) now produce their tags through the kernel and the sametagsFromAttrschokepoint.Design
internal/evidence: newAttributesProvider(ASP idattrs) — a second(ASP, appraiser)pair for direct attribute attestation. Unlike training there's no quiz, so the appraiser always passes: the verdict is "these recorded attributes are attested as of now" and the claims are theattest:*tags. Empty input →NotApplicable.service.go: extractedrunProviderToTags(shared CVM run → appraise → lower path) andtagRole(the IAM write);writeAttestTags,SetIdentityTags,RecordCountryCheckall use them — one kernel path.tags.goconstants (TagLabID,TagCountry, …); the package never types anattest:*literal.Contract preserved
Existing
TestRecordCountryCheck_WritesIAMTags(asserts the exact tags) passes unchanged through the new path. AddedTestSetIdentityTags_WritesIAMTags(+ no-stray-tags), invalid-admin-level guard, and attributes-provider tests (verbatim emission + empty=NotApplicable).make checkgreen.Completes Stream A's qualify re-point — training, identity, and countries-of-concern all route through the kernel.