jenkinsci / jenkinsci/google-compute-engine-plugin

Add userinfo-email scope to VM service account

Open
#476 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
58
Forks
97
PR merge metrics
No merged PRs in 30d

Description

### What feature do you want to see added?

I'm using GCE plugin to provision Jenkins agents and trying to configure RBAC for them against my GKE cluster following docs on https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control.

The document points out that it needs `userinfo-email` scope so that the RoleBinding (and/or ClusterRoleBinding) can use the service account email instead of a numeric string of service account ID for its definition)

This feature request is to add the `userinfo-email` scope to the scopes of VM service account when provisioning Jenkins agent.

The `userinfo-email` scope is a read-only scope top get primary Google Account email address so it should be safe to add to this plugin.

Scope URL: `https://www.googleapis.com/auth/userinfo.email`
GKE docs: https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control#forbidden_error_for_service_accounts_on_vm_instances

### Upstream changes

_No response_

### Are you interested in contributing this feature?

I'm happy to make this change.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.