diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md
new file mode 100644
index 00000000..01ad40d1
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/enhancement.md
@@ -0,0 +1,11 @@
+---
+name: CLI Enhancement
+about: Suggest an enhancement to step cli
+labels: area/cert-management enhancement
+---
+
+### What would you like to be added
+
+
+### Why this is needed
+
diff --git a/.gitignore b/.gitignore
index 515d07fd..50d71a24 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,7 @@ coverage.txt
output
vendor
step
+
+# Ignore modules until switch from gopkg
+go.mod
+go.sum
diff --git a/.golangci.yml b/.golangci.yml
new file mode 100644
index 00000000..fa27f581
--- /dev/null
+++ b/.golangci.yml
@@ -0,0 +1,67 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ settings:
+ printf:
+ funcs:
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
+ golint:
+ min-confidence: 0
+ gocyclo:
+ min-complexity: 10
+ maligned:
+ suggest-new: true
+ dupl:
+ threshold: 100
+ goconst:
+ min-len: 2
+ min-occurrences: 2
+ depguard:
+ list-type: blacklist
+ packages:
+ # logging is allowed only by logutils.Log, logrus
+ # is allowed to use only in logutils package
+ - github.com/sirupsen/logrus
+ misspell:
+ locale: US
+ lll:
+ line-length: 140
+ goimports:
+ local-prefixes: github.com/golangci/golangci-lint
+ gocritic:
+ enabled-tags:
+ - performance
+ - style
+ - experimental
+ disabled-checks:
+ - wrapperFunc
+ - dupImport # https://github.com/go-critic/go-critic/issues/845
+
+linters:
+ disable-all: true
+ enable:
+ - gofmt
+ - golint
+ - vet
+ - misspell
+ - ineffassign
+ - deadcode
+
+run:
+ skip-dirs:
+ - pkg
+
+issues:
+ exclude:
+ - can't lint
+ - declaration of "err" shadows declaration at line
+ - should have a package comment, unless it's in another file for this package
+# golangci.com configuration
+# https://github.com/golangci/golangci/wiki/Configuration
+service:
+ golangci-lint-version: 1.17.x # use the fixed version to not introduce new linters unexpectedly
+ prepare:
+ - echo "here I can run custom commands, but no preparation needed for this repo"
diff --git a/Gopkg.lock b/Gopkg.lock
index 386e384f..0e265dc7 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -9,14 +9,6 @@
pruneopts = "UT"
revision = "e2d15f34fcf99d5dbb871c820ec73f710fca9815"
-[[projects]]
- branch = "master"
- digest = "1:c10265d5a71326618d37e97169eddb3582f78e8ac7dcf87403b4cf619efd519a"
- name = "github.com/DHowett/go-plist"
- packages = ["."]
- pruneopts = "UT"
- revision = "591f970eefbbeb04d7b37f334a0c4c3256e32876"
-
[[projects]]
branch = "master"
digest = "1:655f3b07160fbe90713062296ef215c096ad4308bdc0081620cacd9b9d46dce5"
@@ -25,21 +17,6 @@
pruneopts = "UT"
revision = "5482f03509440585d13d8f648989e05903001842"
-[[projects]]
- digest = "1:304cb78c285eaf02ab529ad02a257cad9b4845022915e6c82f87860ac53222d8"
- name = "github.com/alecthomas/gometalinter"
- packages = ["."]
- pruneopts = "UT"
- revision = "bae2f1293d092fd8167939d5108d1b025eaef9de"
-
-[[projects]]
- branch = "master"
- digest = "1:c198fdc381e898e8fb62b8eb62758195091c313ad18e52a3067366e1dda2fb3c"
- name = "github.com/alecthomas/units"
- packages = ["."]
- pruneopts = "UT"
- revision = "2efee857e7cfd4f3d0138cc3cbb1b4966962b93a"
-
[[projects]]
digest = "1:320e7ead93de9fd2b0e59b50fd92a4d50c1f8ab455d96bc2eb083267453a9709"
name = "github.com/asaskevich/govalidator"
@@ -68,17 +45,6 @@
pruneopts = "UT"
revision = "2972be24d48e78746da79ba8e24e8b488c9880de"
-[[projects]]
- digest = "1:848ef40f818e59905140552cc49ff3dc1a15f955e4b56d1c5c2cc4b54dbadf0c"
- name = "github.com/client9/misspell"
- packages = [
- ".",
- "cmd/misspell",
- ]
- pruneopts = "UT"
- revision = "b90dc15cfd220ecf8bbc9043ecb928cef381f011"
- version = "v0.3.4"
-
[[projects]]
branch = "master"
digest = "1:cc439e1d9d8cff3d575642f5401033b00f2b8d0cd9f859db45604701c990879a"
@@ -134,17 +100,6 @@
revision = "72cd26f257d44c1114970e19afddcd812016007e"
version = "v1.4.1"
-[[projects]]
- branch = "travis-1.9"
- digest = "1:e8f5d9c09a7209c740e769713376abda388c41b777ba8e9ed52767e21acf379f"
- name = "github.com/golang/lint"
- packages = [
- ".",
- "golint",
- ]
- pruneopts = "UT"
- revision = "883fe33ffc4344bad1ecd881f61afd5ec5d80e0a"
-
[[projects]]
digest = "1:318f1c959a8a740366fce4b1e1eb2fd914036b4af58fbd0a003349b305f118ad"
name = "github.com/golang/protobuf"
@@ -169,22 +124,6 @@
revision = "3629d6846518309d22c16fee15d1007262a459d2"
version = "v1.0.21"
-[[projects]]
- branch = "master"
- digest = "1:750e747d0aad97b79f4a4e00034bae415c2ea793fd9e61438d966ee9c79579bf"
- name = "github.com/google/shlex"
- packages = ["."]
- pruneopts = "UT"
- revision = "6f45313302b9c56850fc17f99e40caebce98c716"
-
-[[projects]]
- branch = "master"
- digest = "1:824d147914b40e56e9e1eebd602bc6bb9761989d52fd8e4a498428467980eb17"
- name = "github.com/gordonklaus/ineffassign"
- packages = ["."]
- pruneopts = "UT"
- revision = "1003c8bd00dc2869cb5ca5282e6ce33834fed514"
-
[[projects]]
branch = "master"
digest = "1:22725c01ecd8ed0c0f0078944305a57053340d92878b02db925c660cc4accf64"
@@ -302,27 +241,6 @@
revision = "f5bce3387232559bcbe6a5f8227c4bf508dac1ba"
version = "v1.11.0"
-[[projects]]
- digest = "1:07140002dbf37da92090f731b46fa47be4820b82fe5c14a035203b0e813d0ec2"
- name = "github.com/nicksnyder/go-i18n"
- packages = [
- "i18n",
- "i18n/bundle",
- "i18n/language",
- "i18n/translation",
- ]
- pruneopts = "UT"
- revision = "0dc1626d56435e9d605a29875701721c54bc9bbd"
- version = "v1.10.0"
-
-[[projects]]
- digest = "1:95741de3af260a92cc5c7f3f3061e85273f5a81b5db20d4bd68da74bd521675e"
- name = "github.com/pelletier/go-toml"
- packages = ["."]
- pruneopts = "UT"
- revision = "c01d1270ff3e442a8a57cddc1c92dc1138598194"
- version = "v1.2.0"
-
[[projects]]
digest = "1:cf31692c14422fa27c83a05292eb5cbe0fb2775972e8f1f8446a71549bd8980b"
name = "github.com/pkg/errors"
@@ -410,11 +328,11 @@
[[projects]]
branch = "master"
- digest = "1:c3207093bfee46dc9f408a55408d6fa6ed59431bdeb54df2ab89ffa1d8e1bfaf"
+ digest = "1:f4d37f61cbbd5adb7066017d7e5f303b722a39c3408b41d46a5ea04f81adba8c"
name = "github.com/smallstep/certinfo"
packages = ["."]
pruneopts = "UT"
- revision = "fef09aeb6b3b6451151ae248670cf020454c0d5b"
+ revision = "203093530c86c19d79cfe5ce9ad0b8897e3cce9b"
[[projects]]
branch = "master"
@@ -432,15 +350,15 @@
[[projects]]
branch = "master"
- digest = "1:4bde64565730a308d3cebca9b93f19c8e1137f9ba5b57174669ad0f732dec044"
+ digest = "1:f41de3b55032e81c12f4d109e6c5222e1cff573197a3652b800ca8ac2aaada35"
name = "github.com/smallstep/truststore"
packages = ["."]
pruneopts = "UT"
- revision = "b8300b931ab584b7aa01fe43b3c92d5a61cf2ce3"
+ revision = "8418f8a7d0b74e79026254b4ad23c67dd77fe5f0"
[[projects]]
branch = "master"
- digest = "1:167fb96bb586d7abc0714a63d5bd30f24563d369012b295268db4d64008c4f7d"
+ digest = "1:822ad7c8c41fe68fb9c9c95ad7e77a1172e216d9e3e527451819927448b6dee6"
name = "github.com/smallstep/zcrypto"
packages = [
"json",
@@ -449,7 +367,7 @@
"x509/pkix",
]
pruneopts = "UT"
- revision = "0eaa490bf930eb2c8f1fd0dec8750619588aadae"
+ revision = "6bab21fcaafc3d150cf793b6d5f25fe32f49c80e"
[[projects]]
branch = "master"
@@ -474,14 +392,6 @@
revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686"
version = "v1.2.2"
-[[projects]]
- branch = "master"
- digest = "1:ba52e5a5fb800ce55108b7a5f181bb809aab71c16736051312b0aa969f82ad39"
- name = "github.com/tsenart/deadcode"
- packages = ["."]
- pruneopts = "UT"
- revision = "210d2dc333e90c7e3eedf4f2242507a8e83ed4ab"
-
[[projects]]
branch = "master"
digest = "1:6743b69de0d73e91004e4e201cf4965b59a0fa5caf6f0ffbe0cb9ee8807738a7"
@@ -617,13 +527,6 @@
revision = "54a98f90d1c46b7731eb8fb305d2a321c30ef610"
version = "v1.5.0"
-[[projects]]
- digest = "1:39efb07a0d773dc09785b237ada4e10b5f28646eb6505d97bc18f8d2ff439362"
- name = "gopkg.in/alecthomas/kingpin.v3-unstable"
- packages = ["."]
- pruneopts = "UT"
- revision = "63abe20a23e29e80bbef8089bd3dee3ac25e5306"
-
[[projects]]
digest = "1:9593bab40e981b1f90b7e07faeab0d09b75fe338880d08880f986a9d3283c53f"
name = "gopkg.in/square/go-jose.v2"
@@ -638,23 +541,19 @@
version = "v2.3.1"
[[projects]]
- digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202"
- name = "gopkg.in/yaml.v2"
+ branch = "master"
+ digest = "1:c10265d5a71326618d37e97169eddb3582f78e8ac7dcf87403b4cf619efd519a"
+ name = "howett.net/plist"
packages = ["."]
pruneopts = "UT"
- revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183"
- version = "v2.2.1"
+ revision = "591f970eefbbeb04d7b37f334a0c4c3256e32876"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = [
"github.com/ThomasRooney/gexpect",
- "github.com/alecthomas/gometalinter",
"github.com/chzyer/readline",
- "github.com/client9/misspell/cmd/misspell",
- "github.com/golang/lint/golint",
- "github.com/gordonklaus/ineffassign",
"github.com/icrowley/fake",
"github.com/manifoldco/promptui",
"github.com/pkg/errors",
@@ -674,7 +573,6 @@
"github.com/smallstep/zlint",
"github.com/stretchr/testify/assert",
"github.com/stretchr/testify/require",
- "github.com/tsenart/deadcode",
"github.com/urfave/cli",
"golang.org/x/crypto/argon2",
"golang.org/x/crypto/bcrypt",
diff --git a/Gopkg.toml b/Gopkg.toml
index eb2499fa..9927d62f 100644
--- a/Gopkg.toml
+++ b/Gopkg.toml
@@ -23,18 +23,6 @@
# non-go = false
# go-tests = true
# unused-packages = true
-required = [
- "github.com/alecthomas/gometalinter",
- "github.com/golang/lint/golint",
- "github.com/client9/misspell/cmd/misspell",
- "github.com/gordonklaus/ineffassign",
- "github.com/tsenart/deadcode",
-]
-
-[[constraint]]
- name = "github.com/alecthomas/gometalinter"
- revision = "bae2f1293d092fd8167939d5108d1b025eaef9de"
-
[[override]]
name = "gopkg.in/alecthomas/kingpin.v3-unstable"
revision = "63abe20a23e29e80bbef8089bd3dee3ac25e5306"
diff --git a/README.md b/README.md
index a381a7f1..87c5cf2d 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,6 @@
# Step CLI
-`step` is a zero trust swiss army knife. It's an easy-to-use and hard-to-misuse
-utility for building, operating, and automating systems that use zero trust
-technologies like authenticated encryption (X.509, TLS), single sign-on (OAuth
-OIDC, SAML), multi-factor authentication (OATH OTP, FIDO U2F),
-encryption mechanisms (JSON Web Encryption, NaCl), and verifiable
-claims (JWT, SAML assertions).
+`step` is a zero trust swiss army knife that integrates with [`step-ca`](https://github.com/smallstep/certificates) for automated certificate management. It's an easy-to-use and hard-to-misuse utility for building, operating, and automating systems that use zero trust technologies like authenticated encryption (X.509, TLS), single sign-on (OAuth OIDC, SAML), multi-factor authentication (OATH OTP, FIDO U2F), encryption mechanisms (JSON Web Encryption, NaCl), and verifiable claims (JWT, SAML assertions).
[Website](https://smallstep.com) |
[Documentation](https://smallstep.com/docs/cli) |
@@ -26,6 +21,52 @@ claims (JWT, SAML assertions).

+## Features
+
+`step` is a powerful security tool that's been carefully designed to be safe and easy to use, even if you don't have a favorite elliptic curve or if you're inclined to forget to check the `aud` when you verify a JWT.
+
+- Safe and sane defaults everywhere encourage best practices by making the right thing easy
+- Insecure or subtle operations are gated with flags to prevent accidental misuse
+- In-depth help with examples is available via `step help`
+
+### Work with [JWTs](https://jwt.io) ([RFC7519](https://tools.ietf.org/html/rfc7519)) and [other JOSE constructs](https://datatracker.ietf.org/wg/jose/documents/)
+
+- [Sign](https://smallstep.com/docs/cli/crypto/jwt/sign), [verify](https://smallstep.com/docs/cli/crypto/jwt/verify), and [inspect](https://smallstep.com/docs/cli/crypto/jwt/inspect) JSON Web Tokens (JWTs)
+- [Sign](https://smallstep.com/docs/cli/crypto/jws/sign), [verify](https://smallstep.com/docs/cli/crypto/jws/verify), and [inspect](https://smallstep.com/docs/cli/crypto/jws/inspect/) arbitrary data using JSON Web Signature (JWS)
+- [Encrypt](https://smallstep.com/docs/cli/crypto/jwe/encrypt/) and [decrypt](https://smallstep.com/docs/cli/crypto/jwe/decrypt/) data and wrap private keys using JSON Web Encryption (JWE)
+- [Create JWKs](https://smallstep.com/docs/cli/crypto/jwk/create/) and [manage key sets](https://smallstep.com/docs/cli/crypto/jwk/keyset) for use with JWT, JWE, and JWS
+
+### Work with X.509 (TLS/HTTPS) certificates
+
+- Create key pairs (RSA, ECDSA, EdDSA) and certificate signing requests (CSRs)
+- Create [RFC5280](https://tools.ietf.org/html/rfc5280) and [CA/Browser Forum](https://cabforum.org/baseline-requirements-documents/) compliant X.509 certificates that work **for TLS and HTTPS**
+- [Create](https://smallstep.com/docs/cli/certificate/create/) root and intermediate signing certificates (CA certificates)
+- Create self-signed & CA-signed certificates, and [sign CSRs](https://smallstep.com/docs/cli/certificate/sign/)
+- [Inspect](https://smallstep.com/docs/cli/certificate/inspect/) and [lint](https://smallstep.com/docs/cli/certificate/lint/) certificates on disk or in use by a remote server
+- [Install root certificates](https://smallstep.com/docs/cli/certificate/install/) so your CA is trusted by default (issue development certificates **that [work in browsers](https://smallstep.com/blog/step-v0-8-6-valid-HTTPS-certificates-for-dev-pre-prod.html)**)
+- Get certificates from any ACME compliant CA (*coming soon*)
+
+### Connect to [`step-ca`](https://github.com/smallstep/certificates) and get certificates from your own private certificate authority
+
+- [Authenticate and obtain a certificate](https://smallstep.com/docs/cli/ca/certificate/) using any enrollment mechanism supported by `step-ca`
+- Securely [distribute root certificates](https://smallstep.com/docs/cli/ca/root/) and [bootstrap](https://smallstep.com/docs/cli/ca/bootstrap/) PKI relying parties
+- [Renew](https://smallstep.com/docs/cli/ca/renew/) and [revoke](https://smallstep.com/docs/cli/ca/revoke/) certificates issued by `step-ca`
+- [Submit CSRs](https://smallstep.com/docs/cli/ca/sign/) to be signed by `step-ca`
+
+### Command line OAuth and MFA
+
+- [Get OAuth access tokens](https://smallstep.com/docs/cli/oauth/) and OIDC identity tokens at the command line from any provider
+- Supports OAuth authorization code, implicit, OOB, jwt-bearer, and refresh token flows
+- Automatically launch browser to complete OAuth flow (or use console flow)
+- Verify OIDC identity tokens (using `step crypt jwt verify`)
+- [Generate and verify](https://smallstep.com/docs/cli/crypto/otp/) TOTP tokens
+
+### NaCl and other crypto utilities
+
+- [Work with NaCl](https://smallstep.com/docs/cli/crypto/nacl/) box, secretbox, and sign constructs
+- [Apply key derivation functions](https://smallstep.com/docs/cli/crypto/kdf/) (KDFs) and [verify passwords](https://smallstep.com/docs/cli/crypto/kdf/compare/) using `scrypt`, `bcrypt`, and `argo2`
+- Generate and check [file hashes](https://smallstep.com/docs/cli/crypto/hash/)
+
## Installation Guide
These instructions will install an OS specific version of the `step` binary on
@@ -36,17 +77,13 @@ development](docs/local-development.md) below.
Install `step` via [Homebrew](https://brew.sh/):
-
-$ brew install step
-
+
$ brew install step
> Note: If you have installed `step` previously through the `smallstep/smallstep`
> tap you will need to run the following commands before installing:
-
-
### Linux
@@ -54,12 +91,10 @@ Install `step` via [Homebrew](https://brew.sh/):
Download and install the latest Debian package from [releases](https://github.com/smallstep/cli/releases):
-
#### Arch Linux
@@ -73,8 +108,7 @@ a sibling repository) can be found [here](https://aur.archlinux.org/packages/ste
You can use [pacman](https://www.archlinux.org/pacman/) to install the packages.
### Test
-
$ step certificate inspect https://smallstep.com
Certificate:
Data:
Version: 3 (0x2)
@@ -85,18 +119,86 @@ Certificate:
Not Before: Feb 8 13:07:44 2019 UTC
Not After : May 9 13:07:44 2019 UTC
Subject: CN=smallstep.com
-[...]
-
+[...]
## Examples
+### X.509 Certificates from `step-ca`
+
+This example assumes you already have [`step-ca`](https://github.com/smallstep/certificates) running at `https://ca.local`.
+
+Get your root certificate fingerprint from the machine running `step-ca`:
+
+
$ step ca renew foo.crt foo.key --force
+Your certificate has been saved in foo.crt.
+
+Revoke certificate:
+
+
$ step ca revoke --cert foo.crt --key foo.key
+✔ CA: https://ca.local
+Certificate with Serial Number 202784089649824696691681223134769107758 has been revoked.
+
+$ step ca renew foo.crt foo.key --force
+error renewing certificate: Unauthorized
+
+You can install your root certificate locally:
+
+
+
+And issued certificates will work in your browser and with tools like `curl`. See [our blog post](https://smallstep.com/blog/step-v0-8-6-valid-HTTPS-certificates-for-dev-pre-prod.html) for more info.
+
+
+
+Alternatively, for internal service-to-service communication, you can [configure your code and infrastructure to trust your root certificate](https://github.com/smallstep/autocert/tree/master/examples/hello-mtls).
+
### X.509 Certificates
+The `step certificate` command group can also be used to create an offline CA and self-signed certificates.
+
+Create a self-signed certificate:
+
+
$ step certificate create foo.local foo.crt foo.key --profile self-signed --subtle
+Your certificate has been saved in foo.crt.
+Your private key has been saved in foo.key.
+
Create a root CA, an intermediate, and a leaf X.509 certificate. Bundle the
leaf with the intermediate for use with TLS:
-
-$ step certificate create --profile root-ca \
+
$ step certificate create --profile root-ca \
"Example Root CA" root-ca.crt root-ca.key
Please enter the password to encrypt the private key:
Your certificate has been saved in root-ca.crt.
@@ -120,41 +222,23 @@ Your private key has been saved in example.com.key.
$ step certificate bundle \
example.com.crt intermediate-ca.crt example.com-bundle.crt
-Your certificate has been saved in example.com-bundle.crt.
-
+Your certificate has been saved in example.com-bundle.crt.
Extract the expiration date from a certificate (requires
[`jq`](https://stedolan.github.io/jq/)):
-
-
-You can install your root certificate locally:
-
-```
-$ step certificate install root-ca.crt
-```
-
-And issued certificates will work in your browser and with tools like `curl`. See [our blog post](https://smallstep.com/blog/step-v0-8-6-valid-HTTPS-certificates-for-dev-pre-prod.html) for more info.
-
-
-
-Alternatively, for internal service-to-service communication, you can [configure your code and infrastructure to trust your root certificate](https://github.com/smallstep/certificates/tree/master/autocert/examples/hello-mtls).
-
-If you need certificates for your microservices, containers, or other internal services see [step certificates](https://github.com/smallstep/certificates), a sub-project that adds an online certificate authority and automated certificate management tools to `step`.
+2019-05-09T13:07:44Z
### JSON Object Signing & Encryption (JOSE)
Create a [JSON Web Key](https://tools.ietf.org/html/rfc7517) (JWK), add the
public key to a keyset, and sign a [JSON Web Token](https://tools.ietf.org/html/rfc7519) (JWT):
-
-$ step crypto jwk create pub.json key.json
+
$ step crypto jwk create pub.json key.json
Please enter the password to encrypt the private JWK:
Your public key has been saved in pub.json.
Your private key has been saved in key.json.
@@ -187,16 +271,14 @@ Please enter the password to decrypt key.json:
"sub": "subject@example.com"
},
"signature": "JU7fPGqBJcIfauJHA7KP9Wp292g_G9s4bLMVLyRgEQDpL5faaG-3teJ81_igPz1zP7IjHmz8D6Gigt7kbnlasw"
-}
-
+}
### Single Sign-On
Login with Google, get an access token, and use it to make a request to
Google's APIs:
-
$ curl -H"$(step oauth --header)" https://www.googleapis.com/oauth2/v3/userinfo
Your default web browser has been opened to visit:
https://accounts.google.com/o/oauth2/v2/auth?client_id=1087160488420-AAAAAAAAAAAAAAA.apps.googleusercontent.com&code_challenge=XXXXX
@@ -207,13 +289,11 @@ https://accounts.google.com/o/oauth2/v2/auth?client_id=1087160488420-AAAAAAAAAAA
"email": "bob@smallstep.com",
"email_verified": true,
"hd": "smallstep.com"
-}
-
+}
Login with Google and obtain an OAuth OIDC identity token for single sign-on:
-
-$ step oauth \
+
$ step oauth \
--provider https://accounts.google.com \
--client-id 1087160488420-8qt7bavg3qesdhs6it824mhnfgcfe8il.apps.googleusercontent.com \
--client-secret udTrOT3gzrO7W9fDPgZQLfYJ \
@@ -222,13 +302,11 @@ Your default web browser has been opened to visit:
https://accounts.google.com/o/oauth2/v2/auth?client_id=[...]
-xxx-google-xxx.yyy-oauth-yyy.zzz-token-zzz
-
+xxx-google-xxx.yyy-oauth-yyy.zzz-token-zzz
Obtain and verify a Google-issued OAuth OIDC identity token:
-
## Documentation
diff --git a/command/ca/bootstrap.go b/command/ca/bootstrap.go
index 7069522b..4a61c359 100644
--- a/command/ca/bootstrap.go
+++ b/command/ca/bootstrap.go
@@ -32,7 +32,7 @@ Bootstrap will store the root certificate in <$STEPPATH/certs/root_ca.crt> and
create a configuration file in <$STEPPATH/configs/defaults.json> with the CA
url, the root certificate location and its fingerprint.
-After the bootstrap, ca commands do not need to specify the flags
+After the bootstrap, ca commands do not need to specify the flags
--ca-url, --root or --fingerprint if we want to use the same environment.`,
Flags: []cli.Flag{
caURLFlag,
@@ -76,11 +76,11 @@ func bootstrapAction(ctx *cli.Context) error {
return errors.Wrap(err, "error downloading root certificate")
}
- if err := os.MkdirAll(filepath.Dir(rootFile), 0700); err != nil {
+ if err = os.MkdirAll(filepath.Dir(rootFile), 0700); err != nil {
return errs.FileError(err, rootFile)
}
- if err := os.MkdirAll(filepath.Dir(configFile), 0700); err != nil {
+ if err = os.MkdirAll(filepath.Dir(configFile), 0700); err != nil {
return errs.FileError(err, configFile)
}
diff --git a/command/ca/certificate.go b/command/ca/certificate.go
index 7635fd31..d1af38c7 100644
--- a/command/ca/certificate.go
+++ b/command/ca/certificate.go
@@ -20,9 +20,9 @@ func certificateCommand() cli.Command {
Action: command.ActionFunc(certificateAction),
Usage: "generate a new private key and certificate signed by the root certificate",
UsageText: `**step ca certificate**
- [**--token**=] [**--issuer**=] [**--ca-url**=] [**--root**=]
- [**--not-before**=