vectordotdev / vectordotdev/vector
GCP token generation can fail with obscure error message
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 22.6k
- Forks
- 2.3k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 146
Description
As of PR #2351, when a GCP client running outside of the Google network is configured without credentials, it will fail with the following error message:
Apr 17 10:11:36.413 ERROR vector::topology: Configuration error: Sink "pubsub": Failed to get implicit GCP token
This error message used to indicate that no GCP credentials were configured, which is a less confusing error message.
This is happening because the same configuration, when run on a GCE instance, will be able to fetch a token from an internal hostname with no credentials.
I think the best way to check if Vector is running within GCP is to do a DNS lookup on the internal hostname and proceed with the instance token fetch if that succeeds.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with PR #2351 and trace the GCP client's implicit token path used by the Pub/Sub sink. Compare behavior when credentials are missing outside GCP with token retrieval on a GCE instance, then verify that the former missing-credentials error is restored without breaking instance token fetching.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- gcp, rust
- Domain
- authentication, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100