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

Add kubernetes validation webhook endpoint? #59

Closed
omerlh opened this issue Sep 11, 2019 · 3 comments
Closed

Add kubernetes validation webhook endpoint? #59

omerlh opened this issue Sep 11, 2019 · 3 comments

Comments

@omerlh
Copy link

omerlh commented Sep 11, 2019

It will be really cool to run this project as a validation admission webhook - and by this denying any object creation that is insecure.
To add this, all that is required is adding another endpoint on the API server, that supports the validation webhook format. On each request, calculate the score of the object, and deny based on the result (the threshold can be configurable).

@sublimino
Copy link
Member

Thanks for the suggestion @omerlh -- you're right, it would : ]

We have a validating webhook for V1 that hasn't been updated to the V2 endpoint yet as we were nervous about changing too many things at once.

This is based on a kubectl-plugin that is still Kubesec V1. I'd defintely accept a PR on that to upgrade it to V2 (and optionally maintain V1 behaviour) if anybody has time, which would propagate the change to this webhook. The hosted endpoint changed from https://kubesec.io https://v2.kubesec.io/scan, and the JSON response has moved to a nested list.

Additionally V2 can now operate in HTTP mode, so a larger piece of work is to run V2 as a standalone webhook in this codebase. That's a slightly bigger piece of work than modifying the existing kubectl plugin, but again PRs welcome.

Have I missed anything @stefanprodan?

@stefanprodan
Copy link
Member

I've made a PR some time ago for the kubectl plugin, it should be easy to do the same thing for the webhook see controlplaneio/kubectl-kubesec#20

@06kellyjac
Copy link
Member

Moved to controlplaneio/kubesec-webhook#20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants