Skip to content

Commit

Permalink
expose dafaults fulcio, rekor, oidc issuer urls (#1368)
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
  • Loading branch information
cpanato authored Jan 28, 2022
1 parent 4921aa7 commit d2781b8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cmd/cosign/cli/options/fulcio.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (
"github.com/spf13/cobra"
)

const DefaultFulcioURL = "https://v1.fulcio.sigstore.dev"

// FulcioOptions is the wrapper for Fulcio related options.
type FulcioOptions struct {
URL string
Expand All @@ -31,7 +33,7 @@ var _ Interface = (*FulcioOptions)(nil)
// AddFlags implements Interface
func (o *FulcioOptions) AddFlags(cmd *cobra.Command) {
// TODO: change this back to api.SigstorePublicServerURL after the v1 migration is complete.
cmd.Flags().StringVar(&o.URL, "fulcio-url", "https://v1.fulcio.sigstore.dev",
cmd.Flags().StringVar(&o.URL, "fulcio-url", DefaultFulcioURL,
"[EXPERIMENTAL] address of sigstore PKI server")

cmd.Flags().StringVar(&o.IdentityToken, "identity-token", "",
Expand Down
4 changes: 3 additions & 1 deletion cmd/cosign/cli/options/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (
"github.com/spf13/cobra"
)

const DefaultOIDCIssuerURL = "https://oauth2.sigstore.dev/auth"

// OIDCOptions is the wrapper for OIDC related options.
type OIDCOptions struct {
Issuer string
Expand All @@ -30,7 +32,7 @@ var _ Interface = (*OIDCOptions)(nil)

// AddFlags implements Interface
func (o *OIDCOptions) AddFlags(cmd *cobra.Command) {
cmd.Flags().StringVar(&o.Issuer, "oidc-issuer", "https://oauth2.sigstore.dev/auth",
cmd.Flags().StringVar(&o.Issuer, "oidc-issuer", DefaultOIDCIssuerURL,
"[EXPERIMENTAL] OIDC provider to be used to issue ID token")

cmd.Flags().StringVar(&o.ClientID, "oidc-client-id", "sigstore",
Expand Down
4 changes: 3 additions & 1 deletion cmd/cosign/cli/options/rekor.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (
"github.com/spf13/cobra"
)

const DefaultRekorURL = "https://rekor.sigstore.dev"

// RekorOptions is the wrapper for Rekor related options.
type RekorOptions struct {
URL string
Expand All @@ -28,6 +30,6 @@ var _ Interface = (*RekorOptions)(nil)

// AddFlags implements Interface
func (o *RekorOptions) AddFlags(cmd *cobra.Command) {
cmd.Flags().StringVar(&o.URL, "rekor-url", "https://rekor.sigstore.dev",
cmd.Flags().StringVar(&o.URL, "rekor-url", DefaultRekorURL,
"[EXPERIMENTAL] address of rekor STL server")
}

0 comments on commit d2781b8

Please sign in to comment.