Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/javan.oidc-provider-yaml' into j…
Browse files Browse the repository at this point in the history
…avan.move-github
  • Loading branch information
javanlacerda committed Jul 2, 2024
2 parents 3696706 + 8ab3f2a commit 1fba94e
Show file tree
Hide file tree
Showing 36 changed files with 1,797 additions and 241 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
language: [ 'go' ]
steps:
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

# TODO: uncomment when we bump to go1.22 in go.mod
# - name: Extract version of Go to use
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/container-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
contents: read

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0

# TODO: uncomment when we bump to go1.22 in go.mod
Expand All @@ -48,7 +48,7 @@ jobs:
- name: deps
run: sudo apt-get update && sudo apt-get install -yq libpcsclite-dev

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

- name: Set up Cloud SDK
uses: google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

# TODO: uncomment when we bump to go1.22 in go.mod
# - name: Extract version of Go to use
Expand All @@ -53,7 +53,7 @@ jobs:
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...

- name: Upload Coverage Report
uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0

- name: Ensure no files were modified as a result of the build
run: git update-index --refresh && git diff-index --quiet -I"^\/\/\s+(-\s+)?protoc(-gen-go)?\s+v[0-9]+\.[0-9]+\.[0-9]+$" HEAD -- || git diff -I"^\/\/\s+(-\s+)?protoc(-gen-go)?\s+v[0-9]+\.[0-9]+\.[0-9]+$" --exit-code
2 changes: 1 addition & 1 deletion .github/workflows/protoc-dependabot-hack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:

# update the version in these places manually when Dependabot proposes a change to it here:
# 1. the version in main.yml used to install protoc
- uses: protocolbuffers/protobuf@v27.0
- uses: protocolbuffers/protobuf@v27.1
2 changes: 1 addition & 1 deletion .github/workflows/scorecard_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
id-token: write
steps:
- name: "Checkout code"
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/validate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
steps:
- name: Check Signature
run: |
cosign verify ghcr.io/gythialy/golang-cross:v1.22.3-0@sha256:3217c1e30a7081d73500e620987947d1539cfebc99064ba0f7d5d6eef399475e \
cosign verify ghcr.io/gythialy/golang-cross:v1.22.4-0@sha256:7769c9e4c92f1b598410566270a0aac39f6d0f68491e5bf0862df4ff0f11f06b \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--certificate-identity "https://github.com/gythialy/golang-cross/.github/workflows/release-golang-cross.yml@refs/tags/v1.22.3-0"
--certificate-identity "https://github.com/gythialy/golang-cross/.github/workflows/release-golang-cross.yml@refs/tags/v1.22.4-0"
env:
TUF_ROOT: /tmp

Expand All @@ -44,10 +44,10 @@ jobs:
needs:
- check-signature
container:
image: ghcr.io/gythialy/golang-cross:v1.22.3-0@sha256:3217c1e30a7081d73500e620987947d1539cfebc99064ba0f7d5d6eef399475e
image: ghcr.io/gythialy/golang-cross:v1.22.4-0@sha256:7769c9e4c92f1b598410566270a0aac39f6d0f68491e5bf0862df4ff0f11f06b

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

# Error: fatal: detected dubious ownership in repository at '/__w/fulcio/fulcio'
# To add an exception for this directory, call:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/verify-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
name: k8s manifest check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

# TODO: uncomment when we bump to go1.22 in go.mod
# - name: Extract version of Go to use
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
GIT_VERSION: test

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

# TODO: uncomment when we bump to go1.22 in go.mod
# - name: Extract version of Go to use
Expand All @@ -80,12 +80,12 @@ jobs:
go-version: '1.22'
check-latest: true

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

- name: Setup Cluster
uses: chainguard-dev/actions/setup-kind@f5a6616ce43b6ffabeddb87480a13721fffb3588 # main
uses: chainguard-dev/actions/setup-kind@f94883c3bd16936401291899070258f855b5d849 # main
with:
k8s-version: 1.24.x
k8s-version: 1.26.x
registry-authority: ${{ env.REGISTRY_NAME }}:${{ env.REGISTRY_PORT }}

- name: Generate temporary CA files
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
name: license boilerplate check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

# TODO: uncomment when we bump to go1.22 in go.mod
# - name: Extract version of Go to use
Expand All @@ -53,7 +53,7 @@ jobs:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: deps
run: sudo apt-get update && sudo apt-get install -yq libpcsclite-dev
Expand All @@ -71,13 +71,13 @@ jobs:
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
timeout-minutes: 10
with:
version: v1.57
version: v1.59

oidc-config:
name: oidc-config
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

# TODO: uncomment when we bump to go1.22 in go.mod
# - name: Extract version of Go to use
Expand Down
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
project_name: fulcio
version: 2

env:
- GO111MODULE=on
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ process](https://github.com/sigstore/.github/blob/main/SECURITY.md).
Fulcio is developed as part of the [`sigstore`](https://sigstore.dev) project.

We also use a [slack channel](https://sigstore.slack.com)!
Click [here](https://links.sigstore.dev/slack-invite) for the invite link.
To check more information about Slack and other communication channels please check the [community repository](https://github.com/sigstore/community?tab=readme-ov-file#slack)

## Additional Documentation

Expand Down
3 changes: 2 additions & 1 deletion cmd/app/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ func createHTTPServer(ctx context.Context, serverEndpoint string, grpcServer, le
} else {
opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials()))
}
cc, err := grpc.Dial(grpcServer.grpcServerEndpoint, opts...)
grpcHealthEndpoint := fmt.Sprintf("localhost:%s", viper.GetString("grpc-port"))
cc, err := grpc.NewClient(grpcHealthEndpoint, opts...)
if err != nil {
log.Logger.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/app/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func setupHTTPServer(t *testing.T) (httpServer, string) {
}
var wg sync.WaitGroup
grpcServer.startTCPListener(&wg)
conn, err := grpc.Dial(grpcServer.grpcServerEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.NewClient(grpcServer.grpcServerEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()))
defer func() {
if conn != nil {
_ = conn.Close()
Expand Down Expand Up @@ -100,7 +100,7 @@ func setupHTTPServerWithGRPCTLS(t *testing.T) (httpServer, string) {

var wg sync.WaitGroup
grpcServer.startTCPListener(&wg)
conn, err := grpc.Dial(grpcServer.grpcServerEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.NewClient(grpcServer.grpcServerEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()))
defer func() {
if conn != nil {
_ = conn.Close()
Expand Down
2 changes: 1 addition & 1 deletion cmd/app/serve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func TestDuplex(t *testing.T) {
var grpcRootCert string
t.Run("grpc", func(t *testing.T) {
// Grab the rootcert with the v2 endpoint
conn, err := grpc.Dial(fmt.Sprintf("localhost:%d", port), grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.NewClient(fmt.Sprintf("localhost:%d", port), grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
t.Fatal(err)
}
Expand Down
5 changes: 5 additions & 0 deletions config/config.jsn
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
"IssuerURL": "https://oidc.codefresh.io",
"ClientID": "sigstore",
"Type": "codefresh-workflow"
},
"https://issuer.enforce.dev": {
"IssuerURL": "https://issuer.enforce.dev",
"ClientID": "sigstore",
"Type": "chainguard-identity"
}
}
}
8 changes: 7 additions & 1 deletion config/fulcio-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ data:
"ClientID": "sigstore",
"Type": "gitlab-pipeline"
},
"https://issuer.enforce.dev": {
"IssuerURL": "https://issuer.enforce.dev",
"ClientID": "sigstore",
"Type": "chainguard-identity"
},
"https://oauth2.sigstore.dev/auth": {
"IssuerURL": "https://oauth2.sigstore.dev/auth",
"ClientID": "sigstore",
Expand Down Expand Up @@ -101,7 +106,8 @@ data:
"ClientID": "sigstore",
"Type": "github-workflow"
}
}
},
"CIIssuerMetadata": null
}
server.yaml: |-
host: 0.0.0.0
Expand Down
19 changes: 19 additions & 0 deletions federation/issuer.enforce.dev/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2024 The Sigstore Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

url: https://issuer.enforce.dev
# TODO(mattmoor): Change to a group.
contact: mattmoor@chainguard.dev
description: "Chainguard identity tokens"
type: "chainguard-identity"
Loading

0 comments on commit 1fba94e

Please sign in to comment.