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

[BUG] "authentication failed: missing or improperly formatted Authorization header: expected 'Authorization: Bearer secret_token' or 'Authorization: ApiKey base64(API key ID:API key) #2152

Open
khteh opened this issue Aug 8, 2023 · 0 comments
Labels

Comments

@khteh
Copy link

khteh commented Aug 8, 2023

APM Agent version

The version of the Elastic.Apm nuget package used
1.22.0

Environment

Production
Operating system and version:
Ubuntu 23.04
.NET Framework/Core name and version (e.g. .NET 4.6.2, NET Core 3.1.100) :
.Net Core 7.0.109
Application Target Framework(s) (e.g. net462, netcoreapp3.1):
net7.0

Describe the bug

A clear and concise description of what the bug is.
I have APM server and fleet 8.9.0 running in my k8s cluster and seen the following error today:

[my-apm-server-7f75cffcf7-grj2t apm-server] {"log.level":"error","@timestamp":"2023-08-08T05:32:12.641Z","log.logger":"request","log.origin":{"file.name":"middleware/log_middleware.go","file.line":58},"message":"authentication failed: missing or improperly formatted Authorization header: expected 'Authorization: Bearer secret_token' or 'Authorization: ApiKey base64(API key ID:API key)'","service.name":"apm-server","url.original":"/intake/v2/events","http.request.method":"POST","user_agent.original":"apm-agent-dotnet/1.22.0+1248195c387cac21578a0da4ff22835d4fd5f1d4 (orders-apm 1.0) System.Net.Http/7.0.523.17405 .NET_7/7.0.5","source.address":"10.0.29.219","http.request.id":"5dfb2feb-3328-4af6-9b3c-b0d0b12ffb8b","event.duration":68170,"http.response.status_code":401,"error.message":"authentication failed: missing or improperly formatted Authorization header: expected 'Authorization: Bearer secret_token' or 'Authorization: ApiKey base64(API key ID:API key)'","ecs.version":"1.6.0"}

APM agent config:

{
    "ElasticApm": {
        "ServiceName": "orders-apm",
        "SecretToken": "",
        "ServerUrl": "https://my-apm-http:8200",
        "TransactionSampleRate": 1.0,
        "VerifyServerCert": false,
        "TransactionIgnoreUrls": "/health/*"
    }
}

To Reproduce

Steps to reproduce the behavior:

  1. Use this config '...'
  2. Then call '....'
  3. Then do '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Actual behavior

@khteh khteh added the bug Something isn't working label Aug 8, 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

1 participant