Explain an authentication or authorization failure
explain_auth_failureTrace 401/403 authentication and authorization failures through Kong routes, plugins, consumers, and ACLs to pinpoint the exact configuration step rejecting credentials.
Instructions
Focused analysis of why requests to a route are being rejected, narrowed to the authentication and authorization chain.
USE WHEN: the reported symptom is specifically a 401 or 403, or the user says credentials are being rejected. For a broader or vaguer problem, use diagnose_route.
Walks the chain in the order Kong evaluates it and reports where it breaks:
does a route serve this path?
is an authentication plugin attached, and is it ENABLED?
does the named consumer exist?
does that consumer hold a credential of the required type? -> 401 if not
does an acl plugin apply, and is the consumer in an allowed group? -> 403 if not
RETURNS: chain with a per-step verdict, plus the authentication and authorization findings
and a likelyCause.
LIMITATIONS: reasons from configuration, not from observed traffic. It cannot tell you whether a client is sending a malformed header or an expired token -- only what the gateway is configured to require.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | URL path, e.g. "/payments". | |
| route | No | Route name or `route:<name>` reference. | |
| consumer | No | Username of the client that is failing to authenticate, if known. |