Skip to content

Add crypto.Signer support for KMS/HSM keys#654

Open
dineshudayakumar wants to merge 15 commits intocrewjam:mainfrom
retailnext:crypto-signer-support
Open

Add crypto.Signer support for KMS/HSM keys#654
dineshudayakumar wants to merge 15 commits intocrewjam:mainfrom
retailnext:crypto-signer-support

Conversation

@dineshudayakumar
Copy link

Summary

  • Check public key type instead of private key type to support crypto.Signer implementations (GCP KMS, AWS KMS, HSM) that aren't concrete *rsa.PrivateKey or *ecdsa.PrivateKey types
  • Add fallback JWT signing using crypto.Signer interface for KMS/HSM keys
  • Update key type validation in GetSigningContext() to check public key type

dependabot bot and others added 4 commits January 15, 2026 05:21
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.33.0 to 0.45.0.
- [Commits](golang/crypto@v0.33.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…g/x/crypto-0.45.0

Bump golang.org/x/crypto from 0.33.0 to 0.45.0
Bumps [github.com/golang-jwt/jwt/v5](https://github.com/golang-jwt/jwt) from 5.2.2 to 5.3.0.
- [Release notes](https://github.com/golang-jwt/jwt/releases)
- [Commits](golang-jwt/jwt@v5.2.2...v5.3.0)

---
updated-dependencies:
- dependency-name: github.com/golang-jwt/jwt/v5
  dependency-version: 5.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github.com/russellhaering/goxmldsig](https://github.com/russellhaering/goxmldsig) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/russellhaering/goxmldsig/releases)
- [Commits](russellhaering/goxmldsig@v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/russellhaering/goxmldsig
  dependency-version: 1.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
dineshudayakumar and others added 5 commits January 16, 2026 14:25
…m/russellhaering/goxmldsig-1.5.0

Bump github.com/russellhaering/goxmldsig from 1.4.0 to 1.5.0
…m/golang-jwt/jwt/v5-5.3.0

Bump github.com/golang-jwt/jwt/v5 from 5.2.2 to 5.3.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.45.0 to 0.47.0.
- [Commits](golang/crypto@v0.45.0...v0.47.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.47.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…g/x/crypto-0.47.0

Bump golang.org/x/crypto from 0.45.0 to 0.47.0
@dineshudayakumar dineshudayakumar force-pushed the crypto-signer-support branch 6 times, most recently from 9f655f0 to 9399db6 Compare January 23, 2026 17:00
dependabot bot and others added 2 commits January 29, 2026 14:16
Bumps [github.com/golang-jwt/jwt/v5](https://github.com/golang-jwt/jwt) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/golang-jwt/jwt/releases)
- [Commits](golang-jwt/jwt@v5.3.0...v5.3.1)

---
updated-dependencies:
- dependency-name: github.com/golang-jwt/jwt/v5
  dependency-version: 5.3.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…m/golang-jwt/jwt/v5-5.3.1

Bump github.com/golang-jwt/jwt/v5 from 5.3.0 to 5.3.1
dependabot bot and others added 2 commits February 10, 2026 14:17
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.47.0 to 0.48.0.
- [Commits](golang/crypto@v0.47.0...v0.48.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.48.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…g/x/crypto-0.48.0

Bump golang.org/x/crypto from 0.47.0 to 0.48.0
Using `go-version: stable` resolved to Go 1.26, but go.mod declares
go 1.24.0. golangci-lint was picking up a file from the Go 1.26
toolchain's own vendor directory:

  golang.org/x/crypto/chacha20poly1305/fips140only_go1.26.go

This file has a `//go:build go1.26` constraint, which causes a typecheck
failure when the module is built with go 1.24. That failure cascades
into false-positive errors across the codebase.

Switching to `go-version-file: go.mod` pins CI to the Go version
declared in go.mod, ensuring toolchain and module version stay in sync.
@dineshudayakumar dineshudayakumar force-pushed the crypto-signer-support branch 5 times, most recently from d1718fa to efc1bd1 Compare February 24, 2026 20:15
Check public key type instead of private key type to support
crypto.Signer implementations (e.g. GCP KMS, AWS KMS, HSM)
that aren't concrete *rsa.PrivateKey or *ecdsa.PrivateKey types.

Supports RSA (RS256/RS384/RS512), RSA-PSS (PS256/PS384/PS512),
ECDSA (ES256/ES384/ES512), and EdDSA signing methods via
crypto.Signer for JWT session and tracked request signing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant