feat: implement the jotsmith OIDC issuer CLI#14
Merged
Conversation
Initial implementation of the full command surface from PRD.md: - setup: configure an existing Storage Account + Key Vault as an OIDC issuer (enable static website hosting, create the RSA signing key, publish the discovery document and JWKS). Idempotent. - token mint: assemble standard and custom claims and sign inside Key Vault (RS256); stdout is the compact JWT and nothing else. - token verify: live discovery + JWKS round-trip with RS256 signature and standard-claim checks (60s clock skew). - token decode: inspect a JWT without verifying it. - key rotate: snap-cutover rotation (ADR-0005). - doctor: read-only audit with --repair (re-upload docs / re-enable static website) and --json output. - discovery show / jwks show / config show. - destroy: tear down the issuer state, keeping the Azure resources. - completion: bash/zsh/fish/powershell scripts. Private key material never leaves Key Vault; iss always comes from config; kid is the RFC 7638 thumbprint. Built on urfave/cli v3 and the modular Azure SDK with DefaultAzureCredential. Includes unit tests throughout plus integration tests behind the integration build tag, CI, golangci-lint v2, and goreleaser config. OpenCode session ID: ses_17c986ef9ffeHc0S3r1wQcmLDT
Centralize discovery and JWKS rendering so setup, rotate, doctor repair, and show commands use the same document path. Enforce the v1 single RS256 JWK invariant during doctor and publishing, remove arbitrary signing-key bit-size plumbing, canonicalize discovery issuer rendering, and make doctor --e2e perform a real mint/verify round trip.\n\nOpenCode session ID: ses_17c2d0269ffeCyZ490A503eFP2
Owner
Author
Follow-up: thermo-nuclear review fixesPushed commit What changed:
Verification:
Note: Originally created in OpenCode session ID: ses_17c2d0269ffeCyZ490A503eFP2 |
This was referenced Jun 1, 2026
Closed
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.
What
Initial implementation of the entire
jotsmithCLI — a single-user tool that stands up a personal OIDC issuer in Azure (Storage Account static website + Key Vault) and mints JWTs of arbitrary shape against it. This brings the repo from spec-only (PRD/CONTEXT/ADRs) to a complete, tested binary covering all 13 planned slices.Commands
setup— configure an existing Storage Account + Key Vault as an issuer: enable static website hosting, create the RSA signing key, publish the discovery document and JWKS, and write the local config. Idempotent (re-run is a refresh, not a re-create).token mint— assemble standard claims (--sub,--aud,--exp,--iat,--nbf,--jti) and custom claims (--claim,--claim-json,--claims-file), then sign inside Key Vault. stdout is the compact JWT and nothing else.token verify— live discovery + JWKS round-trip, RS256 signature check, and standard-claim validation with 60s clock skew.token decode— inspect a JWT without verifying it.key rotate— snap-cutover rotation (ADR-0005); tokens under the prior key stop verifying immediately.doctor— read-only PASS/WARN/FAIL audit, plus--repair(re-upload docs, re-enable static website) and--jsonfor agents.discovery show/jwks show/config show— print what would be (or is) published.destroy— soft-delete the key and remove published blobs, keeping the Azure resources (--allalso removes the local config).completion— emit bash / zsh / fish / powershell completion scripts.Invariants upheld
SignAPI.issis always read from config; there is no--issflag.kidis the RFC 7638 thumbprint of the public key; RS256 only.Tech
Go 1.25,
urfave/cli/v3, the modularazure-sdk-for-gopackages, andDefaultAzureCredential. Unit tests throughout; integration tests behind theintegrationbuild tag. Includes CI (SHA-pinned actions),golangci-lintv2 config (0 issues), and agoreleaserconfig.Testing
Verified end-to-end against real Azure (StorageV2 + RBAC-mode Key Vault):
setupenabled static website hosting and published the documents,doctorreported all PASS, a minted token verified live,key rotateinvalidated the prior token,doctor --repairfixed injected drift, anddestroytore the issuer state down. Test resources were removed afterward.Originally created in OpenCode session ID: ses_17c986ef9ffeHc0S3r1wQcmLDT