Skip to content

feat: add support for custom authorization header names#2524

Open
Ndugu2 wants to merge 1 commit intokubernetes-client:masterfrom
Ndugu2:fix-custom-auth-header-2510
Open

feat: add support for custom authorization header names#2524
Ndugu2 wants to merge 1 commit intokubernetes-client:masterfrom
Ndugu2:fix-custom-auth-header-2510

Conversation

@Ndugu2
Copy link

@Ndugu2 Ndugu2 commented Mar 13, 2026

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR adds the ability to use custom authorization header names in the Kubernetes Python client. Currently, the client hardcodes "Authorization" as the header name, which prevents users who need custom headers (e.g., "MY-AUTH-TOKEN") for security compliance.

Changes:

  • Add authorization_header config option (defaults to "Authorization")
  • Support case-insensitive matching for header names
  • Update auth_settings() to use configured header name
  • Maintain backward compatibility

Which issue(s) this PR fixes:

Fixes #2510

Signed-off-by: Kosea Kalema <koseakalema2@gmail.com>
@k8s-ci-robot
Copy link
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 13, 2026
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Ndugu2
Once this PR has been reviewed and has the lgtm label, please assign roycaihw for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from roycaihw and yliaog March 13, 2026 11:12
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken websocket client on custom authorization header names

2 participants