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

220 Commits

Author SHA1 Message Date
Mariano Cano
b27a6d3790 Support for ML-DSA keys
This commit adds support for ML-DSA keys on ca, certificate, and key
commands. SSH and JOSE commands doesn't yet support ML-DSA keys.
2026-09-04 15:48:01 -07:00
Carl Tashian
5b50ed3b49 Fix proxycommand hang when server closes before stdin closes
proxyDirect waited for both copy goroutines via wg.Wait(). When the
server closes the connection mid-session, the stdin->conn goroutine
stays blocked reading a stdin that never reaches EOF (the ssh client
holds the proxycommand's stdin open until it exits), deadlocking until
an OS-level timeout reaps the process.

Return as soon as either direction finishes instead. Extracted a
testable proxyDirectWithIO and added a regression test.

Fixes #1641

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 08:27:53 -07:00
Mariano Cano
420e0e14a9 Suppress messages on needs-renewal commands
This commit suppresses the message "certificate does not need renewal"
on the `step certificate needs-renewal` and `step ssh needs-renewal`
unless the `--verbose` flag is passed.
2026-01-13 17:57:41 -08:00
Mariano Cano
c8fd9a7f2b Do not require client authentication if not enabled
This commit removes the creation of an identity certificate when we get
an unauthorized response if the client authentication is not enabled.
2025-10-06 12:29:46 -07:00
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
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
Herman Slatman
de85fd0cef Use github.com/smallstep/cli-utils and reorder imports 2024-09-30 13:25:46 +02:00
Mariano Cano
8a2d36e2df Fix linter warning 2024-07-24 11:51:57 -07:00
Mariano Cano
e207f94262 Merge branch 'master' into fix-1637 2024-07-23 11:58:33 -07:00
Mariano Cano
2a6e644000 Add console flag to ssh commands
This commit adds the `--console` flag to the following commands:
 * `step ssh certificate`
 * `step ssh config`
 * `step ssh hosts`
 * `step ssh login`
 * `step ssh proxycommand`
2024-07-15 18:47:24 -07:00
Max
cd22f47ac0 Fix spacing in ssh/certificate with goimports (#1178) 2024-05-14 11:25:00 -07:00
redrac
32bdf40111 Allow users to define certificate comment in agent (#1158)
* Allow users to define certificate comment in agent

Added a comment flag which allows users to set the comment for a
certificate when it gets added to an agent. It defaults to current
behavior if not set, which is it uses the subject as the comment.
This allows users who interact with mutliple CAs with the same
identity (email) to have multiple certificates in the agent. It
also allows for use cases when users generate SSH certs with different
extensions to load multiple certificates in their agent.
2024-05-14 11:20:26 -07:00
Alex Carder
aeee3d0abd Add support for setting ssh key types
Add --kty, --curve, and --size to ssh commands (login, certificate)

Implements PR #477
2024-05-14 10:54:02 -07:00
redrac
1f36d23724 Allow stdin input of cert for needs-renewal (#1157) 2024-05-06 17:13:21 -07: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
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
25beed9f54 Add --certificate flag to step ssh fingerprint command
With the changes from https://github.com/smallstep/crypto/pull/207,
the default behavior of `step ssh fingerprint` changes to be like
the behavior of `ssh-add` (and similar tools). When a fingerprint
is determined for an SSH certificate, the fingerprint will only
include the bytes of the public key. With the `--certificate` flag,
a user can create a fingerprint for the entire SSH certificate
contents.
2023-04-12 15:39:17 +02:00
max furman
18b9f17058 Fixing up new linter warnings 2023-04-11 14:33:52 -07:00
max furman
993b15491f Update changelog for 0.23.4 2023-03-09 15:52:57 -08:00
max furman
073e95f1aa Update usage for --verbose flag in needs-renewal 2023-03-09 15:43:22 -08:00
max furman
b93f2faa6a Only log verbose if cert needs renewal | fix grammar and improve
examples
2023-03-09 15:43:22 -08:00
max furman
25c5a48865 Update the command descriptions slightly 2023-03-09 15:43:22 -08:00
max furman
d341038fd9 Add --verbose flag for x509 and ssh needs-renewal command 2023-03-09 15:43:22 -08:00
Raal Goff
cff4c6d8da initial work to allow x5c to use KMS certs and keys for token generation 2022-10-24 20:00:25 +08:00
Mariano Cano
133357f8ea Merge branch 'master' into use/crypto 2022-10-06 17:12:04 -07:00
Josh Soref
4afe4cfb73 Spelling
* access
* adminclient
* ampersand
* and
* ascii
* associated
* auto-detected
* browser
* certificate
* certificates
* characters
* command
* compatibility
* consist
* decodes
* digital
* distinguished
* doesn't
* encoded
* encrypted
* encrypting
* entities
* error
* extension
* from the
* from
* github
* herd
* inspecting
* interchangeable
* interchangeably
* issuing
* json
* macos
* mixed
* onboarding
* outer
* parameter
* parses
* password
* preexisting
* processed
* publickey
* reference
* remaining
* renegotiate
* represents
* secrecy
* serialization
* smartypants
* smartypantsable
* subcommand
* subject
* subtle
* suppression
* the
* tidiness
* too-soon
* truststore
* unmarshaling
* use
* wrapping

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-10-06 18:25:44 -04:00
Mariano Cano
73429de6ea Move crypto/sshutil to an internal folder 2022-10-04 16:38:11 -07:00
Mariano Cano
d63010ef16 Use go.step.sm/jose 2022-10-04 15:26:08 -07:00
Mariano Cano
c6d8972249 Use go.step.sm/crypto for fingerprints in step ssh list 2022-10-03 18:19:29 -07:00
Mariano Cano
ff7b6eb597 Use go.step.sm/crypto to create fingerprints 2022-10-03 18:09:22 -07:00
Mariano Cano
116600896d Use pemutil, randutil, and keyutil from go.step.sm/crypto 2022-09-30 14:30:40 -07:00
max furman
2d96380899 Fix unused linter warnings
* use errors.As with interface{} correctly
2022-09-21 18:19:24 -07:00
max furman
b9b48800ea A bunch more sensible linters and fixes 2022-08-18 22:39:04 -07:00
Carl Tashian
d77dc82f35 The ssh needs-renewal command does not accept a hostname 2022-07-19 09:04:26 -07:00
Mariano Cano
a393c33738 Add ssh signataure to step ssh inspect
Fixes #699
2022-07-15 12:20:18 -07:00
Mariano Cano
5034e3637f Allow to inspect ssh certificates without the type. 2022-04-26 17:58:14 -07:00
Mariano Cano
25ce40805b Add the --provisioner-password-file to proxycommand.
Machines doing ssh client connections might want to use a JWK
provisioner to create the SSH certificate, this change allows
to automatically create the token if --provisioner and
--provisioner-password-file are passed.
2022-02-14 15:21:39 -08:00
Mariano Cano
9ab5040bff Merge pull request #621 from smallstep/ssh-login-logout
Improvements step ssh login and logout
2022-02-01 18:30:42 -08:00
Mariano Cano
e204fcc82a Merge branch 'master' into nebulous 2022-02-01 16:39:53 -08:00
Mariano Cano
2c2a8b5e79 Rename function 2022-02-01 14:17:37 -08:00
max furman
340cd41dd8 Merge if conditions 2022-02-01 13:07:25 -08:00
Mariano Cano
3fe25da566 Remove only certificates if get ssh roots fails. 2022-02-01 13:01:09 -08:00
Mariano Cano
56f88b0108 Fill subject if empty for non-oidc provisioners. 2022-02-01 12:46:46 -08:00
Mariano Cano
3fdcde8caf Allow step ssh login without arguments for OIDC. 2022-01-31 19:40:58 -08:00
max furman
df799eddf5 Add --no-agent flag to 'ssh certificate' command 2022-01-31 16:40:09 -08:00
Mariano Cano
13c25ee29a Allow to logout without specifying an identity.
`step ssh logout` will remove all identities singed by the configured
ssh CA.
2022-01-31 12:55:31 -08:00
Mariano Cano
a9075d3cbf Add initial support for the nebula provisioner. 2021-12-29 14:20:43 -08:00
max furman
2881ea481e Remove internal ui package 2021-12-19 11:27:07 -05:00
Dominik Roos
8de234779b feedback 2021-12-02 22:38:16 +01:00
Dominik Roos
c4401e8650 Add emoji format to fingerprint commands
Add an additional `emoji` format for the `step certificate fingerprint`
that encodes the certificate fingerprint as an emoji string.

Add the `--format` flag to the `step ssh fingerprint` command that
controls the encoding of the fingerprint. The default behavior of the
command is unchanged. The additional encodings are the same as for
`step certificate fingerprint`.

Add teh `--format` flag to the `step crypto key fingerprint` command that
controls the encoding of the fingerprint. The default behavior of the
command is unchanged. For `sha1` hex encoding is used, for `sha256`
base64 encoding is used. The additional encodings are the same as for
`step certificate fingerprint`.

fixes #570
2021-12-02 22:03:21 +01:00