-
Notifications
You must be signed in to change notification settings - Fork 937
Add staging service accounts to roles/iam.serviceAccountTokenCreator
#3854
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
Conversation
|
@saschagrunert What if we instead setup a specific service account for Cloudbuild : https://cloud.google.com/build/docs/securing-builds/configure-user-specified-service-accounts ? I'm hesitant to add more permissions to the default service account. |
a2891ef to
6b016e7
Compare
883dbdd to
b530231
Compare
b530231 to
0e5ad68
Compare
|
Trying to run the script: Made a suggestion. |
| ensure_service_account \ | ||
| "${project}" \ | ||
| "${sa_name}" \ | ||
| "used by prow to sign artifacts for ${project}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "used by prow to sign artifacts for ${project}" | |
| "used by prow to build container images and sign artifacts for ${project}" |
0e5ad68 to
4946f2d
Compare
Thanks, fixed as suggested 👍 |
The idea is to use the GCB service account to be able to sign images in staging and promote them later into production. This way we can use cloudbuild.yaml to specify something like: ``` env: GOOGLE_SERVICE_ACCOUNT_NAME=448637284062@cloudbuild.gserviceaccount.com ``` We have to obtain the project ID since it is created randomly for each staging project. Signed-off-by: Sascha Grunert <[email protected]>
551ba0a to
8430a5c
Compare
@saschagrunert I want to ensure we can use that approach to build images. The PR by itself is fine but I want to double-check. Let me update #3578 and try to build it. |
Awesome, do you have any news on that topic? |
I got a failure trying the use the SA: #3578 (comment). I didn't have the time to investigate. I'll merge this PR tomorrow and actuate the script. we can investigate the failure as a followup. |
|
@ameukam do you think we can merge this now? |
Yes. we need some follow-up PR to make sure subprojects can sign the images. There is an issue with service account impersonation between the service account used by prow and the one used by GCB. /lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ameukam, JAORMX, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The idea is to use the GCB service account to be able to sign images in
staging and promote them later into production. This way we can use
cloudbuild.yaml to specify something like:
We have to obtain the project ID since it is created randomly for each
staging project.
Refers to kubernetes-sigs/security-profiles-operator#984
Should fix the permission issue mentioned in kubernetes-sigs/security-profiles-operator#984 (comment)
/assign @puerco @ameukam