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

✨ Enable webhook authorization options #3198

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

xrstf
Copy link
Contributor

@xrstf xrstf commented Nov 13, 2024

Summary

This PR allows to configure an external webhook for authorization. Previously the relevant flags have been explicitly disabled in kcp, because kcp has its own authorizer. The webhook authorizer would sit next to the existing authorizers (allowPath, allowGroup) and so is an alternative to the built-in authorizers.

Since I only implemented and tested the webhook mode, I did not surface the --authorization-mode flag, but instead set this value based on the presence of the other webhook related flags.

This PR also includes a dependency bump to include kcp-dev/kubernetes#151, which will take care of including the cluster name in the webhook's payload. In that dependency bump is also, slightly hidden, a cleanup for the bump-k8s script, which failed at least since the 1.31 bump since the legacy-cloud-providers module doesn't exist anymore.

Lastly, I removed the custom Authentication setup logic, as what we did here was exactly the same as upstream code already does and it simply seemed redundant.

Release Notes

Add CLI options to enable the authorization-webhook

@kcp-ci-bot kcp-ci-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has signed the DCO. labels Nov 13, 2024
@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

@kcp-ci-bot kcp-ci-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 13, 2024
@xrstf xrstf marked this pull request as draft November 13, 2024 15:57
@kcp-ci-bot kcp-ci-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 13, 2024
@xrstf
Copy link
Contributor Author

xrstf commented Nov 14, 2024

/test all

@xrstf
Copy link
Contributor Author

xrstf commented Nov 29, 2024

/test all

@xrstf
Copy link
Contributor Author

xrstf commented Nov 29, 2024

/test all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has signed the DCO. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants