-
Notifications
You must be signed in to change notification settings - Fork 139
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
Support GitLab's build and release instances as OIDC providers #1327
Support GitLab's build and release instances as OIDC providers #1327
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1327 +/- ##
==========================================
+ Coverage 58.40% 58.49% +0.09%
==========================================
Files 50 50
Lines 3053 3053
==========================================
+ Hits 1783 1786 +3
+ Misses 1112 1110 -2
+ Partials 158 157 -1 |
Thanks! Can you update the order to be alphabetized? |
2f90ef0
to
93428eb
Compare
@haydentherapper Sure. Done. |
@balasankarc Can you confirm how the gitlab.com issuer is used? |
@haydentherapper I'm trying to setup a local fulcio/rekor instance and imitate the test in #1214 (comment) Config file of fulcio is as follows {
"OIDCIssuers": {
"https://ops.gitlab.net": {
"IssuerURL": "https://ops.gitlab.net",
"ClientID": "sigstore",
"Type": "gitlab-pipeline"
}
}
} $ cosign sign --yes --oidc-issuer="https://ops.gitlab.net" --fulcio-url="http://fulcio.balasankarc.in:5555" --rekor-url="http://fulcio.balasankarc.in:3000" --insecure-skip-verify "docker://${CI_REGISTRY_IMAGE}:${CI_JOB_ID}@${image_digest}"
Generating ephemeral keys...
Retrieving signed certificate...
Error: signing [docker://registry.ops.gitlab.net/balasankarc/test-fulcio:10937947@sha256:c5c5fda71656f28e49ac9c5416b3643eaa6a108a8093151d6d1afc9463be8e33]: getting signer: getting key from Fulcio: retrieving cert: POST http://fulcio.balasankarc.in:5555/api/v1/signingCert returned 400 Bad Request: "{\"code\":3,\"message\":\"There was an error processing the identity token\",\"details\":[]}"
main.go:74: error during command execution: signing [docker://registry.ops.gitlab.net/balasankarc/test-fulcio:10937947@sha256:c5c5fda71656f28e49ac9c5416b3643eaa6a108a8093151d6d1afc9463be8e33]: getting signer: getting key from Fulcio: retrieving cert: POST http://fulcio.balasankarc.in:5555/api/v1/signingCert returned 400 Bad Request: "{\"code\":3,\"message\":\"There was an error processing the identity token\",\"details\":[]}" In the fulcio logs, I am seeing
Looks like I might be getting hit with sigstore/cosign#1258 as I am not seeing the OIDC issuer I specified being used by cosign, but google is being used (this is being run on a GCP VM, spun up by a GitLab CI job, which has |
Can you set |
@balasankarc Did you have any updates on if this is working as intended for you? Also just wanted to confirm that the gitlab.com issuer is still in use? |
Just wanted to bump this - I'm good to merge this and get these into staging once you confirm this is working for you locally and the gitlab.com issuer is needed. |
@haydentherapper Apologies - I was OOO for last two weeks and away from my work computer and am just back today. I will continue with testing it locally and get back to you. Also, to answer your other question
Yes. It is definitely still in use. |
@haydentherapper Confirmed that this works locally.
I believe this PR is good to go. I've rebased against latest |
Signed-off-by: Balasankar 'Balu' C <[email protected]>
93428eb
to
7174b50
Compare
@haydentherapper Thanks for the merge. Just to confirm - did these changes already get deployed to the staging/public instances (and thus can be used already) or is that to be done manually? |
They’ll be deployed within the week, I’ll ping you here once it’s rolled out. |
Thank you. Much appreciated. |
@balasankarc Changes are deployed to the prod and staging environments, let me know if you have any issues. |
Summary
We at GitLab (https://about.gitlab.com) are looking at integrating cosign to our official build and release workflow and are very much interested in using the keyless signing flow for it. However, our builds and releases happen not at GitLab.com, but at two separate GitLab instances - dev.gitlab.org and ops.gitlab.net. This PR adds support for those instances as valid OIDC token providers so that keyless signing and verification can be done in pipelines running on those instances.
As the first step, we will be signing our cloud native Docker images using cosign, and are also thinking about signing other build artifacts in the future.
PS: I referred to #1214 for this PR.
Release Note
Documentation