Skip to content

Basic Auth annotation Support #200

Closed
@r4j4h

Description

@r4j4h

Problem:

When trying to protect some endpoints with Basic Auth I learned that the Base64-carrying Authorization Header is passed even if proxy_hide_header is used. Apparently proxy_set_header Authorization "" is necessary to qualm it.

See "Issues with reverse proxy authentication" from this page for a source reference. Also note that practically all other related references that show up from searches only mention proxy_set_header, further implying this is the case.

Currently:

proxy-hide-headers and proxy-pass-headers are directly provided by this Ingress controller, and while proxy-set-header is not directly provided it is documented to be indirectly provided in tandem with other options and states, namely around keepalive.

Request:

Since this is probably one of a few edge cases where this is necessary, fully exposing proxy_set_header is not necessarily needed, a terminate-authorization-header: "true" annotation or configmap entry could suffice.

While it would be nice to expose the set header functionality I feel it might be a bigger problem than it appears on surface with key-value pairs and potentially nested quotes.

Alternatively, perhaps upstream nginx could hide this header if configured to, instead of apparently ignoring it or treating it as a non-header? As it was hard to find any examples of others trying to do this with proxy_hide_header and the official docs simply imply it should work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementPull requests for new features/feature enhancementsproposalAn issue that proposes a feature requeststalePull requests/issues with no activity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions