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 Workload Identity Federation in Stackdriver output plugin #6083

Closed
DeanBrunt opened this issue Sep 22, 2022 · 5 comments
Closed
Labels

Comments

@DeanBrunt
Copy link

DeanBrunt commented Sep 22, 2022

Is your feature request related to a problem? Please describe.
We're currently deploying new infrastructure in AWS but want to be able to keep our logs backend and dashboard as Stackdriver/Google Cloud Logging.
This is possible with the Stackdriver exporter but requires explicit passing of the long lived private key which is not ideal.

Given that Workload Identity Federation exists between GCP and AWS (and other providers), it would be great to leverage this instead to avoid the need to manage long lived private keys for the cross-cloud authentication.
The Bigquery exporter plugin already supports this.

Describe the solution you'd like
Ability to opt into using Workload Identity Federation with the Stackdriver exporter so that I can send logs from AWS to Stackdriver without needing to manage long lived private keys.

Describe alternatives you've considered

  • Fluent Bit -> Fluentd -> Stackdriver
    • Not possible as the Google Auth Ruby Gem also doesn't support WI federation (notwithstanding this PR)
  • Passing private keys to fluent bit directly
    • This works fine, but lacks the security benefits of WI federation.
  • Fluent Bit -> OpenTelemetry Collector -> Stackdriver
    • This is the option I'll likely go with for now to leverage the power of Fluent Bit's log agent and k8s log processing config that I know works, whilst being able to offload via Otel collector to Stackdriver (Go auth library supports WI federation).
@gfrankliu
Copy link

There is a workaround by running the gke-addon-sidecar as the metadata server. That sidecar supports the Workload Identity Federation, and re-expose as a metadata server on localhost. In the stackdriver output config, you can then point metadata_server to it. Sidecar image can be found at gcr.io/gke-multi-cloud-release/gke-addon-sidecar

@DeanBrunt
Copy link
Author

There is a workaround by running the gke-addon-sidecar as the metadata server. That sidecar supports the Workload Identity Federation, and re-expose as a metadata server on localhost. In the stackdriver output config, you can then point metadata_server to it. Sidecar image can be found at gcr.io/gke-multi-cloud-release/gke-addon-sidecar

Ah interesting, thanks for this, this is potentially a neat workaround.
Do you know if there's some docs for the configuration surface of this sidecar?
I'm struggling to find anything when searching for it.

@JeffLuoo
Copy link
Contributor

JeffLuoo commented Oct 20, 2022

There is an example of using the sidecar in our another repo: https://github.com/GoogleCloudPlatform/anthos-samples/blob/main/aws-logging-monitoring/logging/forwarder.yaml#L94-L115

If you find this useful and we can add this to the documentation of Fluent Bit.

@DeanBrunt

Edit: The way the fleet workload identity works is to use a Kubernetes service account (KSA) to authenticate but you mentioned you want to use the AWS tokens? Could you provide the documentations of the federation between GCP and AWS?

@github-actions
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

@github-actions github-actions bot added the Stale label Jan 19, 2023
@github-actions
Copy link
Contributor

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants