Skip to content

Kubernetes API errors are not logged as errors #168

@rbayerl

Description

@rbayerl

A recent change to the Kubernetes auth method changed error logs to debug logs. These errors can be raised for a number of reasons:

  1. The Kubernetes API timed out
  2. The Kubernetes API is broken
  3. The CA certificate does not match
  4. There's an issue with the request

Vault does not differentiate between these separate and very different issues and just always returns HTTP 403 Permission Denied. This wasn't a big deal when context could be found in the logs, but now those logs are gone too. This makes debugging issues much harder by requiring the log level to be set to debug constantly to catch these issues. Can we either:

  1. Change the log level back to error (easiest)
  2. Include the error response in what is sent back to the client
  3. Send the appropriate response code to the client (instead of just Permission Denied for any error)
  4. Both 2 and 3 (best)

I'm happy to open a PR and implement the solution, but it would be nice to have an idea of which option the maintainers prefer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions