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

Specify the service account issuer for kubernetes clusters #722

Merged
merged 2 commits into from
Aug 9, 2023
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
5 changes: 3 additions & 2 deletions .github/workflows/add-remove-new-fulcio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,13 @@ jobs:
- uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1

- name: Setup Cluster
uses: chainguard-dev/actions/setup-kind@cc7afeaca6e5871be191ecc1b8bce10274bc1ee4
uses: chainguard-dev/actions/setup-kind@main
id: kind
with:
k8s-version: ${{ matrix.k8s-version }}
registry-authority: registry.local:5000
cluster-suffix: cluster.local
service-account-issuer: https://kubernetes.default.svc.cluster.local

- name: Setup Knative
uses: chainguard-dev/actions/setup-knative@main
Expand Down Expand Up @@ -163,7 +164,7 @@ jobs:
cosign verify --rekor-url "${{ env.REKOR_URL }}" \
--allow-insecure-registry "${{ env.demoimage }}" \
--certificate-identity "https://kubernetes.io/namespaces/default/serviceaccounts/default" \
--certificate-oidc-issuer "https://kubernetes.default.svc"
--certificate-oidc-issuer "https://kubernetes.default.svc.cluster.local"

- name: Spin up a new Fulcio with new keys
run: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/fulcio-rekor-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ jobs:
- uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1

- name: Setup Cluster
uses: chainguard-dev/actions/setup-kind@cc7afeaca6e5871be191ecc1b8bce10274bc1ee4
uses: chainguard-dev/actions/setup-kind@main
id: kind
with:
k8s-version: ${{ matrix.k8s-version }}
registry-authority: registry.local:5000
cluster-suffix: cluster.local
service-account-issuer: https://kubernetes.default.svc.cluster.local

- name: Setup Knative
uses: chainguard-dev/actions/setup-knative@main
Expand Down Expand Up @@ -171,7 +172,7 @@ jobs:
cosign verify --rekor-url "${{ env.REKOR_URL }}" \
--allow-insecure-registry "${{ env.demoimage }}" \
--certificate-identity "https://kubernetes.io/namespaces/default/serviceaccounts/default" \
--certificate-oidc-issuer "https://kubernetes.default.svc"
--certificate-oidc-issuer "https://kubernetes.default.svc.cluster.local"

# Test with cosign in 'airgapped mode'
# Uncomment these once modified cosign goes in.
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ jobs:

- name: Setup Cluster
# TODO: update after next release.
uses: chainguard-dev/actions/setup-kind@52eca3baf7c09ec1dbc4195449779fa59cc618e6
uses: chainguard-dev/actions/setup-kind@main
id: kind
with:
k8s-version: ${{ matrix.k8s-version }}
registry-authority: registry.local:5000
cluster-suffix: cluster.local
service-account-issuer: https://kubernetes.default.svc.cluster.local

- name: Setup Knative
uses: chainguard-dev/actions/setup-knative@main
Expand Down
2 changes: 1 addition & 1 deletion config/fulcio/fulcio/200-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data:
{
"OIDCIssuers": {
"https://kubernetes.default.svc.cluster.local": {
"IssuerURL": "https://kubernetes.default.svc",
"IssuerURL": "https://kubernetes.default.svc.cluster.local",
"ClientID": "sigstore",
"Type": "kubernetes"
},
Expand Down
2 changes: 1 addition & 1 deletion hack/setup-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ kubeadmConfigPatches:
name: config
apiServer:
extraArgs:
"service-account-issuer": "https://kubernetes.default.svc"
"service-account-issuer": "https://kubernetes.default.svc.cluster.local"
"service-account-key-file": "/etc/kubernetes/pki/sa.pub"
"service-account-signing-key-file": "/etc/kubernetes/pki/sa.key"
"service-account-api-audiences": "api,spire-server"
Expand Down
2 changes: 1 addition & 1 deletion hack/setup-scaffolding-from-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ if [ "${NEED_TO_UPDATE_FULCIO_CONFIG}" == "true" ]; then
echo "Fixing Fulcio config for < 1.23.X Kubernetes"
curl -Ls "${FULCIO}" | sed 's@https://kubernetes.default.svc.cluster.local@https://kubernetes.default.svc@' | kubectl apply -f -
else
curl -Ls "${FULCIO}" | sed 's@"IssuerURL": "https://kubernetes.default.svc",@"IssuerURL": "https://kubernetes.default.svc.cluster.local",@' | kubectl apply -f -
kubectl apply -f "${FULCIO}"
fi

kubectl get -n fulcio-system cm fulcio-config -o json
Expand Down
Loading