Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apiserver: set proxy auth info via request header #727

Merged
merged 1 commit into from
Feb 7, 2025
Merged

Conversation

Iceber
Copy link
Member

@Iceber Iceber commented Feb 6, 2025

What type of PR is this?

/kind feature
What this PR does / why we need it:
Users can set authentication information for proxy requests using the X-Clusterpedia-Proxy- prefix in the request headers, supporting:

  1. X-Clusterpedia-Proxy-CA
  2. X-Clusterpedia-Proxy-Token
  3. X-Clusterpedia-Proxy-Client-Cert
  4. X-Clusterpedia-Proxy-Client-Key

To make the feature more flexible, administrators can allow proxy requests to reuse the PediaCluster configuration by using the --allow-pediacluster-config-for-proxy-request flag. However, the permissions of this cluster configuration may not satisfy the proxy requests, and if the permissions are too high, it could lead to unauthorized operations. Additionally, reusing the PediaCluster configuration may also raise auditing issues.

$ ./bin/apiserver --help
...
Resource server flags:

      --allow-pediacluster-config-for-proxy-request
                Allow proxy requests to use the cluster configuration from PediaCluster when authentication information cannot be obtained from the header.
...

NOTE: However, for kubectl users, passing custom headers is difficult. In the future, we will add a kubectl plugin, but for now, you may need to enable b and ensure that the configuration within PediaCluster has sufficient permissions.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@clusterpedia-bot
Copy link

Hi @Iceber,
Thanks for your pull request!
If the PR is ready, use the /auto-cc command to assign Reviewer to Review.
We will review it shortly.

Details

Instructions for interacting with me using comments are available here.
If you have questions or suggestions related to my behavior, please file an issue against the gh-ci-bot repository.

@clusterpedia-bot clusterpedia-bot added the kind/feature New feature label Feb 6, 2025
@Iceber Iceber force-pushed the proxy_auth branch 4 times, most recently from cfffc9c to 3cd6e86 Compare February 6, 2025 23:20
@Iceber Iceber changed the title [WIP] apiserver: set proxy auth info via request header apiserver: set proxy auth info via request header Feb 6, 2025
@Iceber Iceber merged commit 3e4589e into main Feb 7, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants