• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 20954959704
58%

Build:
DEFAULT BRANCH: main
Ran 13 Jan 2026 11:28AM UTC
Jobs 1
Files 437
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Jan 2026 11:24AM UTC coverage: 57.97% (+0.2%) from 57.742%
20954959704

push

github

web-flow
Add cryptographic utilities for OAuth authorization server (#3265)

Add the crypto package with utilities for JWT signing key management,
HMAC secret handling with rotation support, and PKCE implementation.

Heavily inspired by code in Ory Hydra. I considered using their code
direclty, but being outside fosite it's not considered stable.

So far this code is unused, just tested, but these utilities will be consumed by:
- runconfig.BuildConfig() to load keys from CLI flags
- server.NewOAuth2Provider() to configure fosite with signing keys
- OAuth flow handlers for PKCE validation and upstream IDP redirects

Key loading (keys.go):
- LoadSigningKey: Load private keys from PEM files (RSA PKCS1/PKCS8,
  ECDSA SEC1/PKCS8, Ed25519 PKCS8) with RSA minimum 2048-bit validation
- DeriveKeyID: Compute RFC 7638 JWK Thumbprint for stable key identifiers
- DeriveAlgorithm: Auto-detect signing algorithm from key type
  (RS256, ES256/384/512, EdDSA)
- ValidateAlgorithmForKey: Validate algorithm compatibility with key type
- DeriveSigningKeyParams: Orchestrate key parameter derivation/validation

HMAC secret management (keys.go):
- LoadHMACSecrets: Load secrets with rotation support for zero-downtime
  rotation. paths[0] is the current signing secret, paths[1:] are
  rotated verification-only secrets. Integrates with fosite's
  GlobalSecret/RotatedGlobalSecrets interfaces.

PKCE (pkce.go):
- GeneratePKCEVerifier: Generate RFC 7636 code_verifier (32 bytes,
  base64url encoded)
- ComputePKCEChallenge: Compute S256 code_challenge from verifier

141 of 161 new or added lines in 2 files covered. (87.58%)

41 existing lines in 4 files now uncovered.

34281 of 59136 relevant lines covered (57.97%)

80.81 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
80.0
pkg/authserver/server/crypto/pkce.go
18
88.08
pkg/authserver/server/crypto/keys.go

Uncovered Existing Lines

Lines Coverage ∆ File
8
25.0
-4.44% pkg/client/manager.go
8
61.05
-6.32% pkg/secrets/keyring/keyctl_linux.go
11
65.0
-13.75% pkg/client/discovery.go
14
66.67
-7.91% pkg/client/config.go
Jobs
ID Job ID Ran Files Coverage
1 20954959704.1 13 Jan 2026 11:28AM UTC 437
57.97
GitHub Action Run
Source Files on build 20954959704
  • Tree
  • List 437
  • Changed 10
  • Source Changed 0
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20954959704
  • f2529a08 on github
  • Prev Build on main (#20954540523)
  • Next Build on main (#20955677299)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc