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

Add Support For Google Cloud Service Account Impersonation #310

Open
TigerC10 opened this issue Jan 7, 2025 · 0 comments
Open

Add Support For Google Cloud Service Account Impersonation #310

TigerC10 opened this issue Jan 7, 2025 · 0 comments
Labels
type/feature-request New feature or request

Comments

@TigerC10
Copy link

TigerC10 commented Jan 7, 2025

What is it?

Google recommends that Service Account Tokens should always be paired with Service Account Impersonation for security best practices. Service account impersonation is similar to Amazon Web Services (AWS) Security Token Service API methods like AssumeRole.

Why do it?

If a Service Account Token is compromised, it is useless to act on Google Cloud APIs without the associated service account to impersonate included in each API call (adding an additional layer of obfuscation, separating the lock from the key).

How does it function?

Two different service accounts are involved:

  1. Service Provider Service Account (🕵️)
  2. Privileged Service Account (🧑‍🔧)

The Service Provider Service Account (🕵️) has no privileges in GCP, with the exception of the Token Creator Role. This is the service account that a Service Account Token is generated for, and that token is provided to the service provider (Grafana, in this case).

The Privileged Service Account (🧑‍🔧) has the minimum privileges required to make the API calls required by the service provider. This service account should never have a Service Account Token generated for it. Google Cloud IAM permissions must grant the Service Provider Service Account (🕵️) Token Creator access to the Privileged Service Account (🧑‍🔧).

flowchart LR
    Grafana["Grafana<br/>Service Account Token<br/>(As 🕵️ Service Account)"] -->|"Impersonate<br/>🧑‍🔧 Service Account"| Impersonation([Make API Call])
    Impersonation --> API[Google Cloud]
Loading

When making API calls, set the impersonate-service-account property in the API call to the email address of the Privileged Service Account to impersonate. It's that easy! 😄

See Also:

Google Cloud has already baked Service Account Impersonation to the data source plugins they've authored

@zoltanbedi zoltanbedi added the type/feature-request New feature or request label Jan 7, 2025
@zoltanbedi zoltanbedi moved this to Backlog in OSS Big Tent Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature-request New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants