1
0
mirror of https://github.com/smallstep/cli.git synced 2025-08-06 05:02:39 +03:00

65 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
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
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
max furman
18b9f17058 Fixing up new linter warnings 2023-04-11 14:33:52 -07: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
116600896d Use pemutil, randutil, and keyutil from go.step.sm/crypto 2022-09-30 14:30:40 -07:00
Mariano Cano
e204fcc82a Merge branch 'master' into nebulous 2022-02-01 16:39:53 -08:00
max furman
340cd41dd8 Merge if conditions 2022-02-01 13:07:25 -08:00
max furman
df799eddf5 Add --no-agent flag to 'ssh certificate' command 2022-01-31 16:40:09 -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
max furman
e1ce7de736 Merge branch 'master' into max/steppath 2021-11-17 12:39:07 -08:00
max furman
e3d4f67527 Fixing linter warning errors 2021-11-16 11:39:14 -08:00
max furman
2eccb2be3d Fixing a load of errors from the PR review 2021-11-10 23:18:33 -08:00
max furman
da2d28901f Addressing some PR commentary 2021-10-27 15:55:18 -07:00
max furman
f816f1a621 move errs package to cli-utils 2021-10-27 15:55:18 -07:00
max furman
a8c2310160 Add context flag to all relevant commands 2021-10-27 15:55:17 -07:00
max furman
860c213b97 Initial step path contexts commit
- move config and command packages to cli-utils
2021-10-27 15:55:16 -07:00
max furman
6407b1b75f fixing gocritic linter feedback 2021-10-07 17:59:57 -04:00
max furman
56f26222f2 Remove vestigial ssh certificate command password hack 2021-09-27 14:30:45 -07:00
max furman
70cebf51ab A few fixes for admin workflow commands and ...
- <path> to <file> everywhere
2021-07-08 16:34:53 -07:00
Mariano Cano
d2bce30295 Add local part of an email and email as a principals.
For user certificates, if an email is passed as a principal, include
in the principals list the email, and the local-part. This imitates
the behavior for OIDC provisioners on other provisioners like JWK.

On `step ssh certificate` we will only include them if no principals
are passed using the `--principal` flag.

Fixes #389
2020-10-13 14:49:19 -07:00
Mariano Cano
323847349a Revert "Remove ssh template flags and parameters."
This reverts commit b5cf069f97.
2020-08-27 16:57:40 -07:00
Mariano Cano
b5cf069f97 Remove ssh template flags and parameters. 2020-08-14 11:46:27 -07:00
Mariano Cano
bd79b16d5d Do not send OIDC principals as empty.
Use the classic logic for OIDC principals, sending them empty is
problematic for admin users.
2020-08-03 15:33:13 -07:00
Mariano Cano
9fabb59e56 Add --set and --set-file flags for step ssh certificate. 2020-07-30 18:50:15 -07:00
max furman
ebab8433f8 wip 2020-06-25 13:57:00 -07:00
max furman
7e0b3b3c10 wip 2020-06-24 23:24:48 -07:00
Mariano Cano
fc389f08b3 Rename Add User to Add User Certificate 2020-04-24 10:50:43 -07:00
David Cowden
fee5dc3d58 ssh/certificate: Carry over host-id if it exists
If the user re-runs the `ssh certificate` command, try to pull the
host-id out of a previous identity cert. This will make it less annoying
for someone who runs the command not knowing that it will clobber their
old host-id and result in a new host (requireing them to also
re-register).
2020-03-31 19:59:02 -07:00
David Cowden
8d3073d3dc ssh/certificate: Generate a random UUID by default
Apparently some images don't properly handle the machine-id and it ends
up not being unique. By default play it safe and generate our own UUID.
Deriving a UUID from `/etc/machine-id` is still supported. To trigger
that behavior, pass 'machine' as the `--host-id` flag.
2020-03-26 17:38:18 -07:00
David Cowden
82e457df4a ssh/certificate: Fix typo in usage
And use a consistent error message when the user tries to use the
--host-id flag without also specifying the --host flag.
2020-03-16 17:15:49 -07:00
David Cowden
c15a339687 ssh/certificate: Use blake2b instead of sha256
The short of it is that blake2b is designed to be a MAC. So let's use it
instead of worrying about whether we've used hmac|sha256 with a big
enough key, etc.
2020-03-16 17:14:27 -07:00
Mariano Cano
ad19c036f4 Add hack to be able to sign a CSR with URIs. 2020-03-13 19:38:19 -07:00
David Cowden
4b5b57fe50 ssh/certificate: Brush up error reporting
Add error details and inform the user if the try to pass `--host-id` but
have not specified `--host`. Also add a hint about what the potental
problem could be and a resolution option when we can't derive a host-id
from '/etc/machine-id'.
2020-03-13 18:00:34 -07:00
David Cowden
3197f48c32 ssh/certificate: Regenerate the CSR on update
After we set the URI, we need to regenerate the CSR in order for the new
data to be reflected.
2020-03-13 17:32:42 -07:00
David Cowden
9059e02238 ssh: Add machine-id hash to host certificate
Alternatively, allow the user to specify their own UUID. Adding an ID
derived from the machine ID allows us to authorize hosts to access their
own resources by ID. The machine-id is not supposed to be sent around as
a raw UUID. So we HMAC it with an application "secret" and use the first
sixteen bytes of the resulting sha256 sum to as the entropy source when
generating a new "random" UUIDv4.
2020-03-12 20:36:49 -07:00
Mariano Cano
ab36b827de Do not ask twice for password on open ssh keys. 2020-01-28 13:34:01 -08:00
Mariano Cano
01304131b4 Renew identity on ssh renew and rekey. 2020-01-28 13:34:00 -08:00