From 2c7a7746f741f11a23c83f320375e9f4028a2718 Mon Sep 17 00:00:00 2001 From: hectorj2f Date: Mon, 28 Mar 2022 21:29:00 +0200 Subject: [PATCH] cmd: add the oidc redirect uri to key.Opts Signed-off-by: hectorj2f --- cmd/cosign/cli/attest.go | 1 + cmd/cosign/cli/policy_init.go | 1 + cmd/cosign/cli/sign.go | 1 + cmd/cosign/cli/signblob.go | 1 + go.mod | 2 +- go.sum | 4 ++-- 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd/cosign/cli/attest.go b/cmd/cosign/cli/attest.go index 16b2e99bf8c5..f7722e2d6aac 100644 --- a/cmd/cosign/cli/attest.go +++ b/cmd/cosign/cli/attest.go @@ -71,6 +71,7 @@ func Attest() *cobra.Command { OIDCIssuer: o.OIDC.Issuer, OIDCClientID: o.OIDC.ClientID, OIDCClientSecret: o.OIDC.ClientSecret, + OIDCRedirectURI: o.OIDC.RedirectURI, } for _, img := range args { if err := attest.AttestCmd(cmd.Context(), ko, o.Registry, img, o.Cert, o.CertChain, o.NoUpload, diff --git a/cmd/cosign/cli/policy_init.go b/cmd/cosign/cli/policy_init.go index 97fded69dc3f..9d3a43e9eaea 100644 --- a/cmd/cosign/cli/policy_init.go +++ b/cmd/cosign/cli/policy_init.go @@ -183,6 +183,7 @@ func signPolicy() *cobra.Command { OIDCIssuer: o.OIDC.Issuer, OIDCClientID: o.OIDC.ClientID, OIDCClientSecret: o.OIDC.ClientSecret, + OIDCRedirectURI: o.OIDC.RedirectURI, }) if err != nil { return err diff --git a/cmd/cosign/cli/sign.go b/cmd/cosign/cli/sign.go index 9311156928a7..14ad402a0bff 100644 --- a/cmd/cosign/cli/sign.go +++ b/cmd/cosign/cli/sign.go @@ -87,6 +87,7 @@ func Sign() *cobra.Command { OIDCIssuer: o.OIDC.Issuer, OIDCClientID: o.OIDC.ClientID, OIDCClientSecret: o.OIDC.ClientSecret, + OIDCRedirectURI: o.OIDC.RedirectURI, } annotationsMap, err := o.AnnotationsMap() if err != nil { diff --git a/cmd/cosign/cli/signblob.go b/cmd/cosign/cli/signblob.go index 6312210d0d7a..ba29e55c7c2f 100644 --- a/cmd/cosign/cli/signblob.go +++ b/cmd/cosign/cli/signblob.go @@ -76,6 +76,7 @@ func SignBlob() *cobra.Command { OIDCIssuer: o.OIDC.Issuer, OIDCClientID: o.OIDC.ClientID, OIDCClientSecret: o.OIDC.ClientSecret, + OIDCRedirectURI: o.OIDC.RedirectURI, BundlePath: o.BundlePath, } for _, blob := range args { diff --git a/go.mod b/go.mod index 1d2ab46ca681..a8ac54f8e2ef 100644 --- a/go.mod +++ b/go.mod @@ -314,4 +314,4 @@ require ( sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect ) -replace github.com/sigstore/sigstore => github.com/hectorj2f/sigstore v1.1.1-0.20220327185948-0897f92f144e +replace github.com/sigstore/sigstore => github.com/hectorj2f/sigstore v1.1.1-0.20220328195805-4ade568cebda diff --git a/go.sum b/go.sum index e7cc167aac89..5665ca17d613 100644 --- a/go.sum +++ b/go.sum @@ -1363,8 +1363,8 @@ github.com/hashicorp/vault/sdk v0.4.1/go.mod h1:aZ3fNuL5VNydQk8GcLJ2TV8YCRVvyaak github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 h1:xixZ2bWeofWV68J+x6AzmKuVM/JWCQwkWm6GW/MUR6I= github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/hectorj2f/sigstore v1.1.1-0.20220327185948-0897f92f144e h1:eO6o/SQ29I+JGNhJBgm1aGrIjIkvqUvvmMG/unwKbNY= -github.com/hectorj2f/sigstore v1.1.1-0.20220327185948-0897f92f144e/go.mod h1:xStpn6YKjRehCrfPiBQPWlI1oIhYtl7omc0kS/Ldpic= +github.com/hectorj2f/sigstore v1.1.1-0.20220328195805-4ade568cebda h1:7TcxMiwbWEWTqnNlX03trmvPaatE4yvLOK3LI23NJTY= +github.com/hectorj2f/sigstore v1.1.1-0.20220328195805-4ade568cebda/go.mod h1:xStpn6YKjRehCrfPiBQPWlI1oIhYtl7omc0kS/Ldpic= github.com/honeycombio/beeline-go v1.1.1 h1:sU8r4ae34uEL3/CguSl8Mr+Asz9DL1nfH9Wwk85Pc7U= github.com/honeycombio/beeline-go v1.1.1/go.mod h1:kN0cfUGBMfA87DyCYbiiLoSzWsnw3bluZvNEWtatHxk= github.com/honeycombio/libhoney-go v1.15.2 h1:5NGcjOxZZma13dmzNcl3OtGbF1hECA0XHJNHEb2t2ck=