nhi: emit STATIC_SECRET credential type for fine-grained PATs#170
Merged
Conversation
Contributor
Connector PR Review: nhi: emit STATIC_SECRET credential type for fine-grained PATsBlocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0 Review SummaryThis PR adds two SDK secret trait options ( Security IssuesNone found. Correctness IssuesNone found. SuggestionsNone. |
ef2e1b2 to
9325126
Compare
Annotate the already-synced api-key resource (fine-grained personal access token) with the NHI Phase-1 spine secret trait: credential type STATIC_SECRET and detail github.token.pat. Bumps baton-sdk to v0.11.0 for the WithSecretType/WithSecretDetail helpers and the SecretTrait_CredentialType enum (interim; rebases after the fleet bump). Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
9325126 to
82d710b
Compare
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.
NHI Phase-1 trait-emit (Class-A). Annotates the already-synced
api-keyresource (fine-grained personal access token, built inpkg/connector/api_token.go:apiTokenResource) with the spine secret trait:WithSecretType(SecretTrait_CREDENTIAL_TYPE_STATIC_SECRET)— a fine-grained PAT is an opaque static bearer token.WithSecretDetail("github.token.pat")— axis-2 platform kind, dotted-lowercase, matching thegitlab.token.patsibling convention.Bumps
baton-sdkto v0.11.0 forWithSecretType/WithSecretDetailand theSecretTrait_CredentialTypeenum. This is the interim self-bump strategy (RFC D-345); it rebases after the fleet-wide SDK bump.Scope notes:
User.Type, so synced users are not distinguishable as bots today; RFC §6 marks GitHub K2 as not-applicable. Adding bot detection would require emitting a new field (not a Class-A annotation).Build:
go build ./...✅ · Tests:go test ./...✅ · Lint:golangci-lint run ./pkg/connector/...✅ (0 issues).🛰️ Built with pqprime.