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

Auth failure when running local Tilt Up #13870

Open
rubvs opened this issue Aug 12, 2024 · 0 comments
Open

Auth failure when running local Tilt Up #13870

rubvs opened this issue Aug 12, 2024 · 0 comments

Comments

@rubvs
Copy link

rubvs commented Aug 12, 2024

Context

Running a local tilt up and sending data via sendotlp generates with following error:

2024-08-12T17:57:28-04:00 FATAL sendotlp/main.go:114 error sending data {"error": "rpc error: code = Unauthenticated desc = authentication failed: missing or improperly formatted Authorization header: expected 'Authorization: Bearer secret_token' or 'Authorization: ApiKey base64(API key ID:API key)'\nerror shutting down meter provider: failed to upload metrics: rpc error: code = Unauthenticated desc = authentication failed: missing or improperly formatted Authorization header: expected 'Authorization: Bearer secret_token' or 'Authorization: ApiKey base64(API key ID:API key)'"}

Methods Tried

  1. Running with an empty API Key fails.
  2. Running with a Kibana generated API Key a also fails.
  3. However, pulling the Secret Key from k8s and piping it to sendotlp does work:
> TOKEN=$(kubectl get secrets apm-server-apm-token -o json | jq '. | {name: .metadata.name,data: .data|map_values(@base64d)}.data."secret-token"' | tr -d '"') && go run main.go -insecure=true -secret-token="$TOKEN" -endpoint=http://localhost:8200

2024-08-12T18:03:51-04:00	INFO	sendotlp/main.go:155	sending OTLP data to http://localhost:8200 (grpc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant