Plumb an identity token through skill push for keyless signing - #6385
Merged
Merged
Conversation
samuv
requested review from
JAORMX,
amirejaz,
aponcedeleonch,
rdimitrov and
reyortiz3
as code owners
August 19, 2026 14:34
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6385 +/- ##
==========================================
+ Coverage 73.04% 73.05% +0.01%
==========================================
Files 745 745
Lines 79208 79237 +29
==========================================
+ Hits 57857 57890 +33
+ Misses 17300 17297 -3
+ Partials 4051 4050 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
samuv
force-pushed
the
skills-keyless/02-push-token-plumbing
branch
from
August 19, 2026 15:21
5a3e9db to
d36d2b1
Compare
Add PushOptions.IdentityToken end to end (API DTO, HTTP client, and service validation) so the CLI can forward a caller-acquired OIDC token for keyless signing (#6307), while keeping cosign key-pair signing and --no-sign as the other two mutually exclusive choices. Pushing now requires exactly one of key, identity_token, or no_sign; Fulcio/Rekor can be overridden via TOOLHIVE_SIGSTORE_FULCIO_URL / TOOLHIVE_SIGSTORE_REKOR_URL for E2E and staging use. Signed-off-by: Samuele Verzi <samu@stacklok.com>
samuv
force-pushed
the
skills-keyless/02-push-token-plumbing
branch
from
August 19, 2026 15:49
d36d2b1 to
bb7f62b
Compare
This was referenced Aug 19, 2026
rdimitrov
approved these changes
Aug 20, 2026
This was referenced Aug 20, 2026
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.
Summary
Stacked on #6383. Per the #6307 (keyless push signing) design, the CLI
acquires the OIDC identity token and forwards it in the push request; the
server exchanges it with Fulcio for a certificate, signs, and records a
Rekor entry (toolhive-core
container/signer, already wired in #6383). ThisPR is the server-side/API half of that plumbing — the token forward and
validation, not yet the CLI flag or acquisition ladder (that's the next PR
in the stack).
PushOptions.IdentityToken, threaded through the API DTO(
pushSkillRequest.identity_token) and the Go HTTP client'spushRequestDTO, so a value set on
PushOptionsactually reaches the server instead ofsilently stopping at either DTO boundary.
skillsvc.Pushnow requires exactly one ofKey,IdentityToken, orNoSign— previously it only checked "key or no_sign"; combining twocredentials, or a credential with
no_sign, is now a 400 instead ofsilently picking one.
TOOLHIVE_SIGSTORE_FULCIO_URL/TOOLHIVE_SIGSTORE_REKOR_URLenv varoverrides, forwarded into core's
signer.Options, for E2E/staging useonly (documented as such in the comment — not a production knob).
No CLI changes yet:
PushOptions.IdentityTokenhas no way to be set fromthv skill pushuntil the next PR in the stack adds--identity-tokenandthe token-acquisition ladder.
Type of change
Test plan
task test)task lint-fix)task testpasses forpkg/skills/...andpkg/api/.... One unrelatedfailure appeared in
pkg/transport/proxy/streamablefrom a stray leftoverprocess holding a hardcoded test port in this local environment (same
pre-existing flake noted in #6383, untouched package).
Added round-trip tests for
identity_tokenacross both DTO boundaries (APIrequest →
PushOptions, andPushOptions→ HTTP client body) — the DTOtrap this repo has hit before, called out explicitly per team convention.
API Compatibility
v1beta1API, OR theapi-break-allowedlabel is applied and the migration guidance is described above.Changes
pkg/skills/options.goPushOptions.IdentityTokenpkg/api/v1/skills_types.go,skills.goidentity_tokento the push request DTO and forward itpkg/skills/client/dto.go,client.goidentity_tokenin the Go client's request DTOpkg/skills/skillsvc/build.govalidateSigningInputs(exactly one of key/token/no_sign); passIdentityTokenand Fulcio/Rekor URL overrides intosigner.Optionspkg/skills/skillsvc/build_verify_test.gopkg/api/v1/skills_test.go,pkg/skills/client/client_test.goidentity_tokendocs/server/*task docsDoes this introduce a user-facing change?
No —
IdentityTokenhas no way to be set yet (no CLI flag), so this changesno observable behavior for existing callers except tightening the push
validation error (combining
--keywithno_signis now rejected insteadof silently ignoring
--key).Special notes for reviewers
Base branch is
skills-keyless/01-core-signer(#6383), notmain— this PRonly makes sense stacked on top of it.