Repository navigation
Conversation
This commit updates crypto and go-jose to v4.
Key IDs that are UUIDs, like the ones in step-ca-pro, are 36 characters long and left no space before the provisioner name. Increase the column width to 40 in `step ca acme eab list` and `step ca acme eab add`.
maraino
marked this pull request as draft
November 6, 2026 01:41
dopey
previously approved these changes
Nov 6, 2026
Fix Key ID column width in ACME EAB output
Require the minimum HMAC key lengths from RFC 7518 §3.2 and exact sizes for AES key wrap algorithms in `step crypto jwk create`. Update the integration tests and changelog for the new behavior.
Allow step crypto jwt inspect, jws inspect, and jose format to display tokens with algorithms that go-jose v4 rejects when parsing, like none or ES256K. The verify commands keep rejecting them. Validate the --size of oct keys in jwk create in terms of the flag, in bytes, including the minimum for algorithms without a size of their own, like dir. Its help now states the units, and the shared flag only describes RSA keys, as the other commands do not support oct keys. Fix jwe encrypt with oct keys, which failed because JSONWebKey.Public() returns an empty key for symmetric keys. Keep the original protected header in jose format, which was reordered when serialized, invalidating the signature or authentication tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Define golangci-lint, goimports, govulncheck, and gotestsum in go.mod and run them with go tool, like other smallstep repositories, so their versions are pinned and they do not need to be installed. Bootstrapping only installs GoReleaser Pro now. Use the same version of golangci-lint in CI, and use this module as the local prefix in make fmt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run make fmt, which now uses github.com/smallstep/cli as the local prefix. This only changes the grouping of imports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
maraino
marked this pull request as ready for review
November 7, 2026 02:22
dopey
approved these changes
Nov 7, 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.
This PR updates crypto and migrates to go-jose v4, fixes the regressions the migration introduced, and moves the development tools to
go tool.Note that this branch syncs
certificates@master. We will change this to a release tag before releasing the new version.Breaking changes
go-jose v4 is stricter about
octkeys, which affects existing keys:step crypto jwtandstep crypto jwssign and verify, and--insecuredoes not override the minimum injwk create.jwk createenforces this, andjwe decryptrejects existing keys that do not match. This includes keys that earlier versions created with--alg A128KW,A192KW,A128GCMKW, orA192GCMKWand no--size, which were 32 bytes.Fixes
jwt inspect,jws inspect, andjose formatcould no longer show tokens usingnone,ES256K, or unknown algorithms. They now use the newinternal/joseutilparsers, which only relax the algorithm check.jws verifyandjwt verifystay strict, and tests cover this. These helpers could move to crypto later.jwk create --size: oct sizes are validated with errors that point at the flag and name the unit. The 16-byte minimum for algorithms with no size of their own, likedir, is restored. The help now says bits for RSA and bytes for oct, and the shared--sizeflag only describes RSA, as the other commands do not support oct.jwe encryptwith oct keys: it always failed withunsupported key type '<nil>', also on master, becauseJSONWebKey.Public()returns an empty key for symmetric keys.jose format: it reordered the protected header when serializing, also on master, which invalidated the signature or authentication tag. It now keeps the original header.--sizeerrors: a size of 0 no longer reports "must be greater than or equal to 0" for RSA.Tools
golangci-lint,goimports,govulncheck, andgotestsumare now defined ingo.modand run withgo tool, as in other smallstep repositories.make bootstraponly installs GoReleaser Pro, and CI uses the samegolangci-lintversion. The modules compiled intostepdo not change.A local
go.workthat uses this module fails with an ambiguous import ofcloud.google.com/go/compute/metadata, becausegolangci-lintbrings in an oldcomputethroughviper. Builds without a workspace, including CI, are not affected.Reviewing
The commits are separate to make this easier to review.
Format imports using the local prefixonly changes import grouping in 85 files, aftermake fmtstarted usinggithub.com/smallstep/clias the local prefix, so it can be skipped.Related: smallstep/crypto#1157