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

[feat] Support workload identity in GCP #20

Open
mlutx opened this issue Oct 31, 2023 · 3 comments
Open

[feat] Support workload identity in GCP #20

mlutx opened this issue Oct 31, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@mlutx
Copy link

mlutx commented Oct 31, 2023

Is your feature request related to a problem? Please describe.
Workload identity is supported by Apigee Hybrid, it is more secure and does not require key generation. (In some environments, service account key generation is not allowed by organization policy).

Describe the solution you'd like
when gcp.workloadIdentityEnable is set to true, no more check on serviceAccountRef during input check

Describe alternatives you've considered
No

Additional context
https://cloud.google.com/apigee/docs/hybrid/v1.10/install-configure-cluster.html#gke---workload-identity

@anaik91 anaik91 self-assigned this Nov 1, 2023
@anaik91 anaik91 added the enhancement New feature or request label Nov 1, 2023
@RiflerRick RiflerRick assigned RiflerRick and unassigned anaik91 Jan 8, 2024
@RiflerRick
Copy link
Collaborator

RiflerRick commented Jan 15, 2024

@anaik91
in terms of the requirement, I see that the overrides file of helm supports a workloadIdentity section: https://cloud.google.com/apigee/docs/hybrid/v1.11/config-prop-ref#gcp-workloadidentity-enabled

AFAIU, in the current configuration, we are using the create_service_account variable to create the service account and then generating the service account secret which is mounted as a volume in the corresponding deployments.

From the perspective of helm, it is simply a config that we have to enable. Currently the overrides.yaml.j2 file does not have the workloadIdentity.enable variable.

The vars file might look something like this:

create_service_account: true
gke:
  workloadIdentity:
    enabled: true
    gsa:
      connectAgent: <IAM SA for connectAgent>
      runtime: <IAM SA for runtime>
      synchronizer: <IAM SA for synchronizer>
      ...

Each of the GSA keys correspond to the google service accounts for the corresponding components.

  • If workloadIdentity.enabled is false, the normal route is followed for creating kubernetes secrets and mounting them onto the deployments.
  • if it's enabled and create_service_account is false, it is assumed that the service accounts for the components mentioned already exist and all we need to configure is the WI
  • if create_service_account flag is true, the gsa component service accounts are ignored.

Let me know how you feel about this!

@anaik91
Copy link
Collaborator

anaik91 commented Jan 15, 2024

@RiflerRick : Please do the following

@RiflerRick
Copy link
Collaborator

@RiflerRick : Please do the following

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants