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

WIP: Convert SigstoreKeys to protobuf-specs type #26

Merged
merged 27 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
eec7c6f
update setup-ko action reference (#1328)
codysoyland Mar 25, 2024
2e27de5
chore(deps): Bump mikefarah/yq from 4.42.1 to 4.43.1 (#1329)
dependabot[bot] Mar 25, 2024
fc2800a
chore(deps): Bump anchore/sbom-action from 0.15.9 to 0.15.10 (#1331)
dependabot[bot] Mar 27, 2024
a46f2d2
chore(deps): Bump codecov/codecov-action from 4.1.0 to 4.1.1 (#1332)
dependabot[bot] Mar 29, 2024
509e098
chore(deps): Bump github.com/aws/aws-sdk-go from 1.51.6 to 1.51.10 (#…
dependabot[bot] Mar 30, 2024
a25922d
chore(deps): Bump github.com/sigstore/sigstore/pkg/signature/kms/aws …
dependabot[bot] Apr 1, 2024
99365e1
chore(deps): Bump github.com/sigstore/sigstore/pkg/signature/kms/gcp …
dependabot[bot] Apr 1, 2024
bfd9afc
chore(deps): Bump github.com/sigstore/sigstore from 1.8.2 to 1.8.3 (#…
dependabot[bot] Apr 1, 2024
5b35593
chore(deps): Bump github.com/aws/aws-sdk-go from 1.51.10 to 1.51.11 (…
dependabot[bot] Apr 1, 2024
f4fd92c
chore(deps): Bump github.com/sigstore/sigstore/pkg/signature/kms/azur…
dependabot[bot] Apr 1, 2024
4ee0834
chore(deps): Bump github.com/aws/aws-sdk-go from 1.51.11 to 1.51.12 (…
dependabot[bot] Apr 2, 2024
1dabf18
chore(deps): Bump sigs.k8s.io/release-utils from 0.7.7 to 0.8.0 (#1342)
dependabot[bot] Apr 2, 2024
6126ea8
WIP: Convert SigstoreKeys to protobuf-specs type
codysoyland Mar 7, 2024
e479c99
Use dash in CR hash algorithm name, as documented
codysoyland Mar 13, 2024
aec6ca5
Fix broken reconciler tests
codysoyland Mar 14, 2024
052122d
Add func to canonicalize SigstoreKeys
codysoyland Mar 15, 2024
d736dd3
Add support for trusted_root.json
codysoyland Mar 18, 2024
bfdb6c0
Add time ranges, log ids, and urls to converted SigstoreKeys
codysoyland Mar 19, 2024
77fe652
Refactor DeserializePublicKey to also return crypto.PublicKey
codysoyland Mar 20, 2024
2fe1a90
add missing license headers
bdehamer Mar 20, 2024
5da24e9
lintfix
bdehamer Mar 20, 2024
b925797
fix e2e_test_trustroot_crd.sh
bdehamer Mar 20, 2024
705ddae
Couple of fixes
codysoyland Mar 22, 2024
ff865ed
Remove unneccesary conversion
codysoyland Mar 22, 2024
18eea2b
Add test for fetching trusted_root.json from TUF repo
codysoyland Mar 22, 2024
6e683d9
Fix erroneous date
codysoyland Apr 3, 2024
ee576e2
Improve error handling
codysoyland Apr 3, 2024
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 .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
check-latest: true

# will use the latest release available for ko
- uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6
- uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

- uses: chainguard-dev/actions/goimports@dacf41f3472c33979cfd49bca5b503236be57de0 # main

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/kind-cluster-image-policy-no-tuf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ jobs:
check-latest: true

# will use the latest release available for ko
- uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6
- uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

- uses: imranismail/setup-kustomize@2ba527d4d055ab63514ba50a99456fc35684947f # v2.1.0

- name: Install yq
uses: mikefarah/yq@9adde1ac14bb283b8955d2b0d567bcaf3c69e639 # v4.42.1
uses: mikefarah/yq@c35ec752e38ea0c096d3c44e13cfc0797ac394d8 # v4.43.1

- name: Setup mirror
uses: chainguard-dev/actions/setup-mirror@main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ jobs:
check-latest: true

# will use the latest release available for ko
- uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6
- uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

- uses: imranismail/setup-kustomize@2ba527d4d055ab63514ba50a99456fc35684947f # v2.1.0

- name: Install yq
uses: mikefarah/yq@9adde1ac14bb283b8955d2b0d567bcaf3c69e639 # v4.42.1
uses: mikefarah/yq@c35ec752e38ea0c096d3c44e13cfc0797ac394d8 # v4.43.1

- name: Setup mirror
uses: chainguard-dev/actions/setup-mirror@main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/kind-cluster-image-policy-trustroot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ jobs:
check-latest: true

# will use the latest release available for ko
- uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6
- uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

- uses: imranismail/setup-kustomize@2ba527d4d055ab63514ba50a99456fc35684947f # v2.1.0

- name: Install yq
uses: mikefarah/yq@9adde1ac14bb283b8955d2b0d567bcaf3c69e639 # v4.42.1
uses: mikefarah/yq@c35ec752e38ea0c096d3c44e13cfc0797ac394d8 # v4.43.1

- name: Setup mirror
uses: chainguard-dev/actions/setup-mirror@main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/kind-cluster-image-policy-tsa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ jobs:
check-latest: true

# will use the latest release available for ko
- uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6
- uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

- uses: imranismail/setup-kustomize@2ba527d4d055ab63514ba50a99456fc35684947f # v2.1.0

- name: Install yq
uses: mikefarah/yq@9adde1ac14bb283b8955d2b0d567bcaf3c69e639 # v4.42.1
uses: mikefarah/yq@c35ec752e38ea0c096d3c44e13cfc0797ac394d8 # v4.43.1

- name: Setup mirror
uses: chainguard-dev/actions/setup-mirror@main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/kind-cluster-image-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ jobs:
check-latest: true

# will use the latest release available for ko
- uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6
- uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

- uses: imranismail/setup-kustomize@2ba527d4d055ab63514ba50a99456fc35684947f # v2.1.0

- name: Install yq
uses: mikefarah/yq@9adde1ac14bb283b8955d2b0d567bcaf3c69e639 # v4.42.1
uses: mikefarah/yq@c35ec752e38ea0c096d3c44e13cfc0797ac394d8 # v4.43.1

- name: Setup mirror
uses: chainguard-dev/actions/setup-mirror@main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/kind-e2e-cosigned.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ jobs:
go-version-file: './go.mod'
check-latest: true

- uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6
- uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

- uses: imranismail/setup-kustomize@2ba527d4d055ab63514ba50a99456fc35684947f # v2.1.0

- name: Install yq
uses: mikefarah/yq@9adde1ac14bb283b8955d2b0d567bcaf3c69e639 # v4.42.1
uses: mikefarah/yq@c35ec752e38ea0c096d3c44e13cfc0797ac394d8 # v4.43.1

- uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/kind-e2e-trustroot-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ jobs:
go-version-file: './go.mod'
check-latest: true

- uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6
- uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

- uses: imranismail/setup-kustomize@2ba527d4d055ab63514ba50a99456fc35684947f # v2.1.0

- name: Install yq
uses: mikefarah/yq@9adde1ac14bb283b8955d2b0d567bcaf3c69e639 # v4.42.1
uses: mikefarah/yq@c35ec752e38ea0c096d3c44e13cfc0797ac394d8 # v4.43.1

- uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4

- uses: anchore/sbom-action/download-syft@9fece9e20048ca9590af301449208b2b8861333b # v0.15.9
- uses: anchore/sbom-action/download-syft@ab5d7b5f48981941c4c5d6bf33aeb98fe3bae38c # v0.15.10

- uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Run Go tests
run: go test -covermode atomic -coverprofile coverage.txt $(go list ./... | grep -v third_party/)
- name: Upload Coverage Report
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0
uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4.1.1
with:
env_vars: OS
- name: Run Go tests w/ `-race`
Expand Down
10 changes: 6 additions & 4 deletions cmd/tester/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,13 @@ func main() {
log.Fatal(err)
}

c := &config.SigstoreKeys{}
c.ConvertFrom(context.Background(), tr.Spec.SigstoreKeys)
maps := make(map[string]config.SigstoreKeys, 0)
c, err := config.ConvertSigstoreKeys(context.Background(), tr.Spec.SigstoreKeys)
if err != nil {
log.Fatal(err)
}
maps := make(map[string]*config.SigstoreKeys, 0)

maps[tr.Name] = *c
maps[tr.Name] = c
configCtx.SigstoreKeysConfig = &config.SigstoreKeysMap{SigstoreKeys: maps}

ctx = config.ToContext(ctx, configCtx)
Expand Down
61 changes: 31 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.21
toolchain go1.21.1

require (
github.com/aws/aws-sdk-go v1.51.6
github.com/aws/aws-sdk-go-v2 v1.25.2 // indirect
github.com/aws/aws-sdk-go v1.51.12
github.com/aws/aws-sdk-go-v2 v1.26.0 // indirect
github.com/cenkalti/backoff/v3 v3.2.2
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
Expand All @@ -31,7 +31,7 @@ require (
github.com/ryanuber/go-glob v1.0.0
github.com/sigstore/cosign/v2 v2.2.3
github.com/sigstore/rekor v1.3.5
github.com/sigstore/sigstore v1.8.2
github.com/sigstore/sigstore v1.8.3
github.com/stretchr/testify v1.9.0
github.com/theupdateframework/go-tuf v0.7.0
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399
Expand All @@ -40,8 +40,8 @@ require (
golang.org/x/net v0.22.0
golang.org/x/sys v0.18.0 // indirect
golang.org/x/time v0.5.0
google.golang.org/grpc v1.62.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
google.golang.org/grpc v1.62.1 // indirect
google.golang.org/protobuf v1.33.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.29.3
k8s.io/apimachinery v0.29.3
Expand All @@ -51,7 +51,7 @@ require (
knative.dev/hack v0.0.0-20231016131700-2c938d4918da
knative.dev/hack/schema v0.0.0-20221024013916-9d2ae47c16b2
knative.dev/pkg v0.0.0-20231101193506-b09d4f2a2845
sigs.k8s.io/release-utils v0.7.7
sigs.k8s.io/release-utils v0.8.0
sigs.k8s.io/yaml v1.4.0
)

Expand All @@ -61,26 +61,27 @@ require (
github.com/docker/docker v26.0.0+incompatible
github.com/docker/go-connections v0.5.0
github.com/go-jose/go-jose/v3 v3.0.3
github.com/sigstore/protobuf-specs v0.3.1
github.com/sigstore/scaffolding v0.6.17
github.com/sigstore/sigstore/pkg/signature/kms/aws v1.8.2
github.com/sigstore/sigstore/pkg/signature/kms/azure v1.8.2
github.com/sigstore/sigstore/pkg/signature/kms/gcp v1.8.2
github.com/sigstore/sigstore/pkg/signature/kms/aws v1.8.3
github.com/sigstore/sigstore/pkg/signature/kms/azure v1.8.3
github.com/sigstore/sigstore/pkg/signature/kms/gcp v1.8.3
github.com/sigstore/sigstore/pkg/signature/kms/hashivault v1.8.2
github.com/spf13/viper v1.18.2
gopkg.in/go-jose/go-jose.v2 v2.6.3
)

require (
cloud.google.com/go/compute v1.23.4 // indirect
cloud.google.com/go/compute v1.24.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.6 // indirect
cloud.google.com/go/kms v1.15.7 // indirect
cloud.google.com/go/kms v1.15.8 // indirect
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect
contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect
cuelang.org/go v0.7.0 // indirect
github.com/AliyunContainerService/ack-ram-tool/pkg/credentials/alibabacloudsdkgo/helper v0.2.0 // indirect
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.1.0 // indirect
Expand Down Expand Up @@ -111,20 +112,20 @@ require (
github.com/alibabacloud-go/tea-xml v1.1.3 // indirect
github.com/aliyun/credentials-go v1.3.1 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go-v2/config v1.27.4 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.4 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 // indirect
github.com/aws/aws-sdk-go-v2/config v1.27.9 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.9 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ecr v1.24.7 // indirect
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.21.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 // indirect
github.com/aws/aws-sdk-go-v2/service/kms v1.29.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.6 // indirect
github.com/aws/aws-sdk-go-v2/service/kms v1.30.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.5 // indirect
github.com/aws/smithy-go v1.20.1 // indirect
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231024185945-8841054dbdb8 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand Down Expand Up @@ -184,7 +185,7 @@ require (
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.1 // indirect
github.com/googleapis/gax-go/v2 v2.12.3 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
github.com/hashicorp/vault/api v1.12.0 // indirect
Expand Down Expand Up @@ -247,8 +248,8 @@ require (
github.com/yashtewari/glob-intersection v0.2.0 // indirect
go.mongodb.org/mongo-driver v1.14.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect
Expand All @@ -259,17 +260,17 @@ require (
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.16.1 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/api v0.167.0 // indirect
google.golang.org/api v0.171.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240205150955-31a09d347014 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 // indirect
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading
Loading