Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Google CA v1beta1 API and associated config #349

Merged
merged 2 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The public Fulcio root CA is currently running on [GCP CA Service](https://cloud
You can also run Fulcio with your own CA on CA Service by passing in a parent and specifying Google as the CA:

```
go run main.go serve --ca googleca --gcp_private_ca_parent=projects/myproject/locations/us-central1/caPools/mypool --gcp_private_ca_version=v1
go run main.go serve --ca googleca --gcp_private_ca_parent=projects/myproject/locations/us-central1/caPools/mypool
```

### PKCS11CA
Expand Down
16 changes: 5 additions & 11 deletions cmd/app/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"github.com/sigstore/fulcio/pkg/ca/ephemeralca"
"github.com/sigstore/fulcio/pkg/ca/fileca"
googlecav1 "github.com/sigstore/fulcio/pkg/ca/googleca/v1"
googlecav1beta1 "github.com/sigstore/fulcio/pkg/ca/googleca/v1beta1"
"github.com/sigstore/fulcio/pkg/ca/x509ca"
"github.com/sigstore/fulcio/pkg/config"
"github.com/sigstore/fulcio/pkg/log"
Expand All @@ -56,7 +55,6 @@ func newServeCmd() *cobra.Command {
cmd.Flags().String("ca", "", "googleca | pkcs11ca | fileca | ephemeralca (for testing)")
cmd.Flags().String("aws-hsm-root-ca-path", "", "Path to root CA on disk (only used with AWS HSM)")
cmd.Flags().String("gcp_private_ca_parent", "", "private ca parent: /projects/<project>/locations/<location>/<name> (only used with --ca googleca)")
cmd.Flags().String("gcp_private_ca_version", "v1", "private ca version: [v1|v1beta1] (only used with --ca googleca)")
cmd.Flags().String("hsm-caroot-id", "", "HSM ID for Root CA (only used with --ca pkcs11ca)")
cmd.Flags().String("ct-log-url", "http://localhost:6962/test", "host and path (with log prefix at the end) to the ct log")
cmd.Flags().String("config-path", "/etc/fulcio-config/config.json", "path to fulcio config json")
Expand Down Expand Up @@ -98,6 +96,10 @@ func runServeCmd(cmd *cobra.Command, args []string) {
if !viper.IsSet("gcp_private_ca_parent") {
log.Logger.Fatal("gcp_private_ca_parent must be set when using googleca")
}
if viper.IsSet("gcp_private_ca_version") {
// There's a MarkDeprecated function in cobra/pflags, but it doesn't use log.Logger
log.Logger.Warn("gcp_private_ca_version is deprecated and will soon be removed; please remove it")
}

case "fileca":
if !viper.IsSet("fileca-cert") {
Expand Down Expand Up @@ -130,15 +132,7 @@ func runServeCmd(cmd *cobra.Command, args []string) {
var baseca certauth.CertificateAuthority
switch viper.GetString("ca") {
case "googleca":
version := viper.GetString("gcp_private_ca_version")
switch version {
case "v1":
baseca, err = googlecav1.NewCertAuthorityService(cmd.Context(), viper.GetString("gcp_private_ca_parent"))
case "v1beta1":
baseca, err = googlecav1beta1.NewCertAuthorityService(cmd.Context(), viper.GetString("gcp_private_ca_parent"))
default:
err = fmt.Errorf("invalid value for gcp_private_ca_version: %v", version)
}
baseca, err = googlecav1.NewCertAuthorityService(cmd.Context(), viper.GetString("gcp_private_ca_parent"))
case "pkcs11ca":
params := x509ca.Params{
ConfigPath: viper.GetString("pkcs11-config-path"),
Expand Down
1 change: 0 additions & 1 deletion config/fulcio-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ data:
host: 0.0.0.0
port: 5555
ca: googleca
gcp_private_ca_version: v1
ct-log-url: http://ct-log/test
log_type: prod
kind: ConfigMap
Expand Down
198 changes: 0 additions & 198 deletions pkg/ca/googleca/v1beta1/googleca.go

This file was deleted.

81 changes: 0 additions & 81 deletions pkg/ca/googleca/v1beta1/googleca_test.go

This file was deleted.