-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
⚠️ Use limited reader in webhooks #2598
Conversation
@inteon would you mind splitting this up in one PR per change, so discussions can stay targeted and the changelog will have a more meaningful entry than "Improve Webhook"? |
7206b34
to
a169f8b
Compare
Ok, this PR now focuses on adding |
a169f8b
to
03eca92
Compare
03eca92
to
016ba4c
Compare
b96f9fa
to
9dcfc53
Compare
d703a85
to
dc57d59
Compare
/retest |
@inteon PTAL when you have some time :) |
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
dc57d59
to
a1a68d0
Compare
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
a1a68d0
to
930ab18
Compare
@sbueringer I updated the limits and comments based on the review feedback. |
Thx! /lgtm /assign @alvaroaleman @vincepri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets also mark this change as breaking, please, as there is a non-zero change it might cause issues in the context of the token reviews for example
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, inteon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR adds a LimitedReader which prevents DOS attacks due to OOM caused by the
io.ReadAll
function.Depends on #2604.
Code is based on https://github.com/kubernetes/kubernetes/blob/c28c2009181fcc44c5f6b47e10e62dacf53e4da0/staging/src/k8s.io/pod-security-admission/cmd/webhook/server/server.go