Skip to content

Commit 2c5e509

Browse files
authored
Merge branch 'master' into crypto_jwe_encrypt_password
2 parents e781ba8 + f7cb780 commit 2c5e509

File tree

9 files changed

+124
-44
lines changed

9 files changed

+124
-44
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
echo "DOCKER_TAGS_DEBIAN=${{ env.DOCKER_TAGS_DEBIAN }},${{ env.DOCKER_IMAGE }}:${DEBIAN_TAG}" >> "${GITHUB_ENV}"
5454
- name: Create Release
5555
id: create_release
56-
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
56+
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v2.0.9
5757
env:
5858
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5959
with:
@@ -111,17 +111,17 @@ jobs:
111111
if: needs.create_release.outputs.is_prerelease == 'false'
112112
steps:
113113
- name: Checkout
114-
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
114+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
115115
- name: Setup Go
116-
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
116+
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
117117
with:
118118
go-version: 'stable'
119119
check-latest: true
120120
- name: Build
121121
id: build
122122
run: V=1 make build
123123
- name: Checkout Docs
124-
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
124+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
125125
with:
126126
repository: smallstep/docs
127127
token: ${{ secrets.DOCS_PAT }}

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2626

2727
---
2828

29+
## [0.28.0] - 2024-10-29
30+
31+
### Added
32+
33+
- disableSSHCAUser and disableSSHCAHost options to GCP provisioner create and update commands (smallstep/cli#1305)
34+
- Support programmatically opening browser on Android devices (smallstep/cli#1301)
35+
36+
### Fixed
37+
38+
- Fix --context being ignored in commands that rely on certificates (smallstep/cli#1301)
39+
40+
2941
## [0.27.5] - 2024-10-17
3042

3143
### Added

command/ca/certificate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func certificateCommand() cli.Command {
2828
[**--not-before**=<time|duration>] [**--not-after**=<time|duration>]
2929
[**--san**=<SAN>] [**--set**=<key=value>] [**--set-file**=<file>]
3030
[**--acme**=<file>] [**--standalone**] [**--webroot**=<file>]
31-
[**--contact**=<email>] [**--http-listen**=<address>] [**--bundle**]
31+
[**--contact**=<email>] [**--http-listen**=<address>]
3232
[**--kty**=<type>] [**--curve**=<curve>] [**--size**=<size>] [**--console**]
3333
[**--x5c-cert**=<file>] [**--x5c-key**=<file>] [**--k8ssa-token-path**=<file>]
3434
[**--offline**] [**--password-file**] [**--ca-url**=<uri>] [**--root**=<file>]

command/ca/provisioner/add.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ IID (AWS/GCP/Azure)
100100
[**--azure-audience**=<name>] [**--azure-subscription-id**=<id>]
101101
[**--azure-object-id**=<id>] [**--instance-age**=<duration>] [**--iid-roots**=<file>]
102102
[**--disable-custom-sans**] [**--disable-trust-on-first-use**]
103+
[**--disable-ssh-ca-user**] [**--disable-ssh-ca-host**]
103104
[**--admin-cert**=<file>] [**--admin-key**=<file>]
104105
[**--admin-subject**=<subject>] [**--admin-provisioner**=<name>] [**--admin-password-file**=<file>]
105106
[**--ca-url**=<uri>] [**--root**=<file>] [**--context**=<name>] [**--ca-config**=<file>]
@@ -172,6 +173,8 @@ SCEP
172173
instanceAgeFlag,
173174
disableCustomSANsFlag,
174175
disableTOFUFlag,
176+
disableSSHCAUserFlag,
177+
disableSSHCAHostFlag,
175178

176179
// Claims
177180
x509TemplateFlag,
@@ -744,6 +747,13 @@ func createOIDCDetails(ctx *cli.Context) (*linkedca.ProvisionerDetails, error) {
744747
}
745748

746749
func createAWSDetails(ctx *cli.Context) (*linkedca.ProvisionerDetails, error) {
750+
if ctx.IsSet("disable-ssh-ca-user") {
751+
return nil, errors.New("flag disable-ssh-ca-user is not supported for AWS IID provisioners")
752+
}
753+
if ctx.IsSet("disable-ssh-ca-host") {
754+
return nil, errors.New("flag disable-ssh-ca-host is not supported for AWS IID provisioners")
755+
}
756+
747757
d, err := parseInstanceAge(ctx)
748758
if err != nil {
749759
return nil, err
@@ -764,6 +774,13 @@ func createAWSDetails(ctx *cli.Context) (*linkedca.ProvisionerDetails, error) {
764774
}
765775

766776
func createAzureDetails(ctx *cli.Context) (*linkedca.ProvisionerDetails, error) {
777+
if ctx.IsSet("disable-ssh-ca-user") {
778+
return nil, errors.New("flag disable-ssh-ca-user is not supported for Azure IID provisioners")
779+
}
780+
if ctx.IsSet("disable-ssh-ca-host") {
781+
return nil, errors.New("flag disable-ssh-ca-host is not supported for Azure IID provisioners")
782+
}
783+
767784
tenantID := ctx.String("azure-tenant")
768785
if tenantID == "" {
769786
return nil, errs.RequiredWithFlagValue(ctx, "type", ctx.String("type"), "azure-tenant")
@@ -790,13 +807,29 @@ func createGCPDetails(ctx *cli.Context) (*linkedca.ProvisionerDetails, error) {
790807
return nil, err
791808
}
792809

810+
var (
811+
disableSSHCAUser *bool
812+
disableSSHCAHost *bool
813+
)
814+
815+
if ctx.IsSet("disable-ssh-ca-user") {
816+
boolVal := ctx.Bool("disable-ssh-ca-user")
817+
disableSSHCAUser = &boolVal
818+
}
819+
if ctx.IsSet("disable-ssh-ca-host") {
820+
boolVal := ctx.Bool("disable-ssh-ca-host")
821+
disableSSHCAHost = &boolVal
822+
}
823+
793824
return &linkedca.ProvisionerDetails{
794825
Data: &linkedca.ProvisionerDetails_GCP{
795826
GCP: &linkedca.GCPProvisioner{
796827
ServiceAccounts: ctx.StringSlice("gcp-service-account"),
797828
ProjectIds: ctx.StringSlice("gcp-project"),
798829
DisableCustomSans: ctx.Bool("disable-custom-sans"),
799830
DisableTrustOnFirstUse: ctx.Bool("disable-trust-on-first-use"),
831+
DisableSshCaUser: disableSSHCAUser,
832+
DisableSshCaHost: disableSSHCAHost,
800833
InstanceAge: d,
801834
},
802835
},

command/ca/provisioner/provisioner.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,16 @@ with the same instance will be accepted. By default only the first request
542542
will be accepted.`,
543543
}
544544

545+
disableSSHCAUserFlag = cli.BoolFlag{
546+
Name: "disable-ssh-ca-user",
547+
Usage: `Disable ability to sign SSH user certificates`,
548+
}
549+
550+
disableSSHCAHostFlag = cli.BoolFlag{
551+
Name: "disable-ssh-ca-host",
552+
Usage: `Disable ability to sign SSH host certificates`,
553+
}
554+
545555
// Nebula provisioner flags
546556
nebulaRootFlag = cli.StringFlag{
547557
Name: "nebula-root",

command/ca/provisioner/update.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ IID (AWS/GCP/Azure)
9292
[**--azure-audience**=<name>] [**--azure-subscription-id**=<id>]
9393
[**--azure-object-id**=<id>] [**--instance-age**=<duration>]
9494
[**--disable-custom-sans**] [**--disable-trust-on-first-use**]
95+
[**--disable-ssh-ca-user**] [**--disable-ssh-ca-host**]
9596
[**--admin-cert**=<file>] [**--admin-key**=<file>]
9697
[**--admin-subject**=<subject>] [**--admin-provisioner**=<name>] [**--admin-password-file**=<file>]
9798
[**--ca-url**=<uri>] [**--root**=<file>] [**--context**=<name>] [**--ca-config**=<file>]
@@ -176,6 +177,8 @@ SCEP
176177
instanceAgeFlag,
177178
disableCustomSANsFlag,
178179
disableTOFUFlag,
180+
disableSSHCAUserFlag,
181+
disableSSHCAHostFlag,
179182

180183
// Claims
181184
x509TemplateFlag,
@@ -826,6 +829,13 @@ func updateOIDCDetails(ctx *cli.Context, p *linkedca.Provisioner) error {
826829
}
827830

828831
func updateAWSDetails(ctx *cli.Context, p *linkedca.Provisioner) error {
832+
if ctx.IsSet("disable-ssh-ca-user") {
833+
return errors.New("flag disable-ssh-ca-user is not supported for AWS IID provisioners")
834+
}
835+
if ctx.IsSet("disable-ssh-ca-host") {
836+
return errors.New("flag disable-ssh-ca-host is not supported for AWS IID provisioners")
837+
}
838+
829839
data, ok := p.Details.GetData().(*linkedca.ProvisionerDetails_AWS)
830840
if !ok {
831841
return errors.New("error casting details to AWS type")
@@ -855,6 +865,13 @@ func updateAWSDetails(ctx *cli.Context, p *linkedca.Provisioner) error {
855865
}
856866

857867
func updateAzureDetails(ctx *cli.Context, p *linkedca.Provisioner) error {
868+
if ctx.IsSet("disable-ssh-ca-user") {
869+
return errors.New("flag disable-ssh-ca-user is not supported for Azure IID provisioners")
870+
}
871+
if ctx.IsSet("disable-ssh-ca-host") {
872+
return errors.New("flag disable-ssh-ca-host is not supported for Azure IID provisioners")
873+
}
874+
858875
data, ok := p.Details.GetData().(*linkedca.ProvisionerDetails_Azure)
859876
if !ok {
860877
return errors.New("error casting details to Azure type")
@@ -914,6 +931,14 @@ func updateGCPDetails(ctx *cli.Context, p *linkedca.Provisioner) error {
914931
if ctx.IsSet("disable-trust-on-first-use") {
915932
details.DisableTrustOnFirstUse = ctx.Bool("disable-trust-on-first-use")
916933
}
934+
if ctx.IsSet("disable-ssh-ca-user") {
935+
boolVal := ctx.Bool("disable-ssh-ca-user")
936+
details.DisableSshCaUser = &boolVal
937+
}
938+
if ctx.IsSet("disable-ssh-ca-host") {
939+
boolVal := ctx.Bool("disable-ssh-ca-host")
940+
details.DisableSshCaHost = &boolVal
941+
}
917942
if ctx.IsSet("remove-gcp-service-account") {
918943
details.ServiceAccounts = removeElements(details.ServiceAccounts, ctx.StringSlice("remove-gcp-service-account"))
919944
}
@@ -926,6 +951,7 @@ func updateGCPDetails(ctx *cli.Context, p *linkedca.Provisioner) error {
926951
if ctx.IsSet("gcp-project") {
927952
details.ProjectIds = append(details.ProjectIds, ctx.StringSlice("gcp-project")...)
928953
}
954+
929955
return nil
930956
}
931957

exec/exec.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ func OpenInBrowser(url, browser string) error {
115115
} else {
116116
cmd = exec.Command("xdg-open", url)
117117
}
118+
case "android":
119+
cmd = exec.Command("xdg-open", url)
118120
case "windows":
119121
cmd = exec.Command("rundll32", "url.dll,FileProtocolHandler", url)
120122
default:

go.mod

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require (
1616
github.com/pquerna/otp v1.4.0
1717
github.com/slackhq/nebula v1.9.4
1818
github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262
19-
github.com/smallstep/certificates v0.27.5
19+
github.com/smallstep/certificates v0.28.0
2020
github.com/smallstep/certinfo v1.12.2
2121
github.com/smallstep/cli-utils v0.10.0
2222
github.com/smallstep/go-attestation v0.4.4-0.20240109183208-413678f90935
@@ -27,7 +27,7 @@ require (
2727
github.com/urfave/cli v1.22.16
2828
go.mozilla.org/pkcs7 v0.9.0
2929
go.step.sm/crypto v0.54.0
30-
go.step.sm/linkedca v0.22.1
30+
go.step.sm/linkedca v0.22.2
3131
golang.org/x/crypto v0.28.0
3232
golang.org/x/sys v0.26.0
3333
golang.org/x/term v0.25.0
@@ -36,13 +36,13 @@ require (
3636
)
3737

3838
require (
39-
cloud.google.com/go v0.115.1 // indirect
40-
cloud.google.com/go/auth v0.9.8 // indirect
39+
cloud.google.com/go v0.116.0 // indirect
40+
cloud.google.com/go/auth v0.9.9 // indirect
4141
cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect
4242
cloud.google.com/go/compute/metadata v0.5.2 // indirect
4343
cloud.google.com/go/iam v1.2.1 // indirect
44-
cloud.google.com/go/longrunning v0.6.1 // indirect
45-
cloud.google.com/go/security v1.18.1 // indirect
44+
cloud.google.com/go/longrunning v0.6.2 // indirect
45+
cloud.google.com/go/security v1.18.2 // indirect
4646
dario.cat/mergo v1.0.1 // indirect
4747
filippo.io/edwards25519 v1.1.0 // indirect
4848
github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect
@@ -104,11 +104,11 @@ require (
104104
github.com/mitchellh/copystructure v1.2.0 // indirect
105105
github.com/mitchellh/reflectwalk v1.0.2 // indirect
106106
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
107-
github.com/newrelic/go-agent/v3 v3.35.0 // indirect
107+
github.com/newrelic/go-agent/v3 v3.35.1 // indirect
108108
github.com/peterbourgon/diskv/v3 v3.0.1 // indirect
109109
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
110110
github.com/pmezard/go-difflib v1.0.0 // indirect
111-
github.com/prometheus/client_golang v1.20.4 // indirect
111+
github.com/prometheus/client_golang v1.20.5 // indirect
112112
github.com/prometheus/client_model v0.6.1 // indirect
113113
github.com/prometheus/common v0.55.0 // indirect
114114
github.com/prometheus/procfs v0.15.1 // indirect
@@ -131,17 +131,16 @@ require (
131131
go.opentelemetry.io/otel v1.29.0 // indirect
132132
go.opentelemetry.io/otel/metric v1.29.0 // indirect
133133
go.opentelemetry.io/otel/trace v1.29.0 // indirect
134-
go.step.sm/cli-utils v0.9.0 // indirect
135134
golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 // indirect
136135
golang.org/x/net v0.30.0 // indirect
137136
golang.org/x/oauth2 v0.23.0 // indirect
138137
golang.org/x/sync v0.8.0 // indirect
139138
golang.org/x/text v0.19.0 // indirect
140139
golang.org/x/time v0.7.0 // indirect
141-
google.golang.org/api v0.200.0 // indirect
142-
google.golang.org/genproto v0.0.0-20241007155032-5fefd90f89a9 // indirect
143-
google.golang.org/genproto/googleapis/api v0.0.0-20240930140551-af27646dc61f // indirect
144-
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
140+
google.golang.org/api v0.203.0 // indirect
141+
google.golang.org/genproto v0.0.0-20241015192408-796eee8c2d53 // indirect
142+
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect
143+
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
145144
google.golang.org/grpc v1.67.1 // indirect
146145
gopkg.in/yaml.v3 v3.0.1 // indirect
147146
howett.net/plist v1.0.0 // indirect

0 commit comments

Comments
 (0)