Failed authentications on pangolin returns 400 error code instead of 401 in the DownStreamStatus field in traefik logs #1742

Closed
opened 2026-04-05 19:40:38 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @LePresidente on 3/4/2025

When a failed login attempt is done on pangolin the DownStreamStatus is 400 instead of 401 in the traefik logs

snip from the traefik log

{"ClientAddr":"<redacted>:64974","ClientHost":"<redacted>","DownstreamContentSize":114,"DownstreamStatus":400,"Duration":20032776,"RequestMethod":"POST","RequestPath":"/api/v1/auth/login","RequestProtocol":"HTTP/2.0","RetryAttempts":0,"ServiceName":"api-service@file","StartUTC":"2025-03-04T17:36:36.207121382Z","TLSCipher":"TLS_AES_128_GCM_SHA256","TLSVersion":"1.3","downstream_Content-Type":"application/json; charset=utf-8","downstream_X-Forwarded-Proto":"https","level":"info","msg":"","origin_Content-Type":"application/json; charset=utf-8","origin_X-Forwarded-Proto":"https","request_Content-Type":"application/json","request_User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36","request_X-Forwarded-For":"<redacted>","request_X-Forwarded-Proto":"https","request_X-Real-Ip":"<redacted>","time":"2025-03-04T17:36:36Z"}

Current Error Code: 400 Bad Request
Expected Error Code: 401 Unauthorized

Note if the error code is 401, crowdsec will automatically catch these as failed login attempts.

*Originally created by @LePresidente on 3/4/2025* When a failed login attempt is done on pangolin the DownStreamStatus is 400 instead of 401 in the traefik logs snip from the traefik log ``` {"ClientAddr":"<redacted>:64974","ClientHost":"<redacted>","DownstreamContentSize":114,"DownstreamStatus":400,"Duration":20032776,"RequestMethod":"POST","RequestPath":"/api/v1/auth/login","RequestProtocol":"HTTP/2.0","RetryAttempts":0,"ServiceName":"api-service@file","StartUTC":"2025-03-04T17:36:36.207121382Z","TLSCipher":"TLS_AES_128_GCM_SHA256","TLSVersion":"1.3","downstream_Content-Type":"application/json; charset=utf-8","downstream_X-Forwarded-Proto":"https","level":"info","msg":"","origin_Content-Type":"application/json; charset=utf-8","origin_X-Forwarded-Proto":"https","request_Content-Type":"application/json","request_User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36","request_X-Forwarded-For":"<redacted>","request_X-Forwarded-Proto":"https","request_X-Real-Ip":"<redacted>","time":"2025-03-04T17:36:36Z"} ``` Current Error Code: 400 Bad Request Expected Error Code: 401 Unauthorized **Note** _if the error code is 401, crowdsec will automatically catch these as failed login attempts._
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#1742