1
0
mirror of https://github.com/smallstep/cli.git synced 2026-10-24 11:19:19 +03:00
Commit Graph

263 Commits

Author SHA1 Message Date
Max
60a4eef3de Fix linter warnings (#1450)
* Remove unnecessary utils files in favor of cli-utils package
* Remove nolint:revive directive from bcrypt-pbkdf file
2025-07-10 11:15:28 -07:00
Herman Slatman
b14f5534e0 Fix tests for token flow having different error message
Depending on whether the test is executed in CI/VSCode vs. running
them locally with `make test`, the resulting error message was
different for the `multiple-select-ui` and `ignore-provisioner-flag`
test cases. For now we just test for an error, but it would be
nice to refactor a bit and trigger specific error cases in the
future.
2025-04-15 14:59:23 +02:00
Herman Slatman
c153ef3e75 Simplify ingoring usage of provisioner flag when managing policies 2025-03-27 21:56:54 +01:00
Herman Slatman
064866f86c Refactor ignoring of provisioner flag to not rely on package globals 2025-03-27 19:50:31 +01:00
Herman Slatman
9e636181c4 Rename some usages of "issuer" to "provisionerName"
Long ago the "issuer" flag was used to denote what we not call
provisioners. There were still some uses of `issuer` in the code,
which have now been renamed to reflect their current usage. Only
when the actual token is going to be signed, will it be called
an `issuer` again.
2025-03-27 19:50:31 +01:00
Herman Slatman
1cec31e5b4 Fix some provisioner prompt issues related to SCEP and policies
This PR fixes the following issues:

 - SCEP provisioners not detected in admin token flows
 - Invalid provisioner selection logic when managing provisioner policies
 - Unexpected error messages showing "issuer" instead or "provisioner" flag
2025-03-27 19:50:30 +01:00
Max
c957358f02 Allow a few global defaults to be pulled from the CA (#1377)
- min-encryption-password-length
- provisioner

Enforce min-encryption-password-length, if set, in the 'step ssh
certificate' command.

Add flags.FirstStringOf returns value of first defined flag in input list
2025-03-04 08:58:21 -08:00
Dan Fuhry
8abadfcd59 command/ca/token: support custom "user" claim
Add the `--set` and `--set-file` flags to the `step ca token` command,
allowing the user to set keys in the "user" claim in the resulting JWT.

Signed-off-by: Dan Fuhry <dan@fuhry.com>
2025-03-03 14:48:39 -05:00
Herman Slatman
475b7eb3c8 Fix new golangci-lint issues 2025-02-18 11:34:53 +01:00
Mariano Cano
283c2d5c9e Update utils/cautils/bootstrap.go
Co-authored-by: Max <mx.furman@gmail.com>
2025-01-29 14:57:33 -08:00
Mariano Cano
0ae8763635 Handle the redirect-url flag
This commit sets the proper redirect-url parameter in the defaults.json
if the flag `--redirect-url` is given in the bootstrap command.
2025-01-24 13:21:34 -08:00
Herman Slatman
de85fd0cef Use github.com/smallstep/cli-utils and reorder imports 2024-09-30 13:25:46 +02:00
Herman Slatman
a6a421459f Fix linter issues 2024-08-21 12:55:59 +02:00
Carl Tashian
d59165538d Guard legacy Windows vt100 setup syscall on more recent builds of Windows 2024-08-14 18:23:37 -07:00
Mariano Cano
3eb25647ba Remove SSH cfn support and use x5rt#S256 property 2024-07-23 18:56:17 -07:00
Mariano Cano
e207f94262 Merge branch 'master' into fix-1637 2024-07-23 11:58:33 -07:00
Mariano Cano
615f8c8942 Fix linter warnings 2024-06-12 17:19:16 -07:00
Jeremy Doupe
cae069c7e9 allow auth scopes from provisioner 2024-04-16 15:15:15 -05:00
Jeremy Doupe
c216086adf add AuthParams to token 2024-04-16 01:14:57 -05:00
Max
05f95e5b1e Upgrade certificate 0.26.0 | fix linter warnings (#1140)
* Update certificates to 0.26.0

* Fix linter warnings
2024-03-28 19:12:36 -07:00
Herman Slatman
6c8661fafc Fix usage of deprecated Sign() method 2024-03-04 21:05:51 +01:00
Mariano Cano
4616c58b2e Allow to add confirmation claims to tokens
This commit allows passing confirmation claims to tokens to tie the
tokens with a provided CSR or SSH public key.

The confirmation claim is implemented in the token command as well as
the com commands that uses a given CSR or ssh public key. Those are:

  - step ca token
  - step ca sign
  - step ssh certificate --sign

Fixes smallstep/certificates#1637
2024-01-11 16:50:11 -08:00
Herman Slatman
7c490d1792 Fix Nebula VerifyPrivateKey by selecting curve to use based on key 2023-12-12 16:13:54 +01:00
Herman Slatman
92f807f1fd Make the utfbom package internal 2023-10-24 23:57:48 +02:00
Herman Slatman
eda17fc83a Merge branch 'master' into herman/ignore-bom 2023-10-24 23:55:27 +02:00
Herman Slatman
deda87eb50 Fix linting issues 2023-10-23 15:23:04 +02:00
Herman Slatman
f97a0f2b23 Make the file reader utility aware of BOMs
Fixes #1042
2023-10-23 15:03:59 +02:00
Mariano Cano
7d70cea79f Allow the define a custom tpm device
This commit allows to pass the device name option when initializing
a tpm in the acme flow.
2023-10-20 15:20:49 -07:00
Herman Slatman
0b28b9d9e8 Merge branch 'master' into herman/fix-go-tpm-v0.9.0 2023-09-19 21:44:02 +02:00
Herman Slatman
9aed78496d Upgrade to go-tpm v0.9.0 and update imports 2023-09-19 21:36:38 +02:00
Mariano Cano
ae8274e27b Hide step oauth command if it fails
This commit changes the error printed by step if running step oauth
fails. This avoids printing the client secret in the command line, even
that is "public" knowledge.
2023-08-01 12:34:51 -07:00
Herman Slatman
b4f5fe721d Depend on github.com/smallstep/go-attestation fork 2023-05-10 11:46:28 +02:00
Herman Slatman
83e9d08565 Merge branch 'master' into herman/tpm-improvements 2023-04-14 23:06:58 +02:00
Herman Slatman
81bd4f4a0b Set /attest URL 2023-04-14 22:50:49 +02:00
Herman Slatman
50a8ec85e4 Merge pull request #915 from smallstep/herman/tpm-improvements
Small improvements for TPM attestation
2023-04-14 19:36:46 +02:00
Herman Slatman
c32d080473 Fix attestation URL 2023-04-14 15:41:55 +02:00
max furman
82ced6f93d more fixup 2023-04-11 15:25:10 -07:00
Herman Slatman
1f9389c8c3 Move storing of certificate chain to within GetCertificate 2023-04-12 00:22:23 +02:00
Herman Slatman
949d36b6ec Add storing of TPM key certificate chain to TPM storage 2023-04-11 23:49:54 +02:00
Max
410fc9fdc6 Update utils/read_test.go
Co-authored-by: Mariano Cano <mariano.cano@gmail.com>
2023-04-11 14:36:28 -07:00
max furman
18b9f17058 Fixing up new linter warnings 2023-04-11 14:33:52 -07:00
Mariano Cano
285aa18ba7 Detect the proper algorithm when signing with x5c certs
This commit properly detects the algorithm used for JWT signing when using ECDSA
keys. The previous version always picked ES256, even if P-384 or P-521 were
used.
2023-04-06 16:31:47 -07:00
Herman Slatman
57914eac7e Fix PR comments 2023-04-06 22:58:29 +02:00
Herman Slatman
0cbf9fe936 Add --attestation-ca-insecure flag for disabling TLS validation 2023-04-06 17:36:17 +02:00
Herman Slatman
c3beee7c94 Support kty, crv and size with ACME device-attest-01
Additionally, make the logic for selecting which TPM EK to use
deterministic by always selecting the first RSA EK returned by
the TPM, falling back to the first EC EK if it exists.
2023-04-06 17:18:36 +02:00
Herman Slatman
eb9bc220b1 Add some more docs to the TPM flow 2023-04-06 15:51:56 +02:00
Herman Slatman
e73db5c447 Include TPM info in attestation request 2023-04-06 14:48:07 +02:00
Herman Slatman
ae12907aaf Add parsing of attestation-uri for key name 2023-03-24 11:20:40 +01:00
Herman Slatman
55d89fc3a5 Fix linting issues 2023-03-23 20:12:50 +01:00
Herman Slatman
e642396b61 Refactor attestation client 2023-03-23 19:55:37 +01:00