Closed erictune closed 2 years ago
@tallclair Would really love to see this land as GA in 1.16. Is that possible?
@lachie83 No, we're not sure we want PodSecurityPolicy to go to GA. It's not clear that this is a use case that should be solved by Kubernetes core, and we're looking into out-of-core alternatives. If you'd like to discuss it in more detail, it's a good topic for SIG-Auth.
@tallclair Would stuff like Open Policy Agent's gatekeeper be a better path to head down?
Yes, exactly. That might be the leading contender, and I'm working closely with that team to see make sure it will cover these use cases.
The one thing I've been waiting for, is a tool that could potentially translate PodSecurityPolicy
--> OPA rego policy. That would make deprecating them from your standpoint a lot easier.
@tallclair appreciate the prompt response
@SEJeff agreed. We will not deprecate PodSecurityPolicy until there is a clear replacement with feature parity and migration path.
Hey @tallclair, you mentioned a roadmap to GA or a plan for deprecation. Seems like we're leaning towards the latter.
Do we have something written to help people that are looking at PSPs as a solution close the loop?
Not yet. Part of the hesitation is that we don't want to say that we'll be deprecating it in favor of something else until there is a clear replacement. Although I'm excited about gatekeeper, it doesn't have the features (or stability) we need to replace PSP yet. Another possibility is that we could move PSP out of tree, and bring it to GA as an admission webhook (the 2 options aren't mutually exclusive). We haven't formally laid out a roadmap yet though.
Wtf
Hi @tallclair looks like nothing is happening here for 1.16 as well so I'll keep it the same.
Hey there @tallclair -- 1.17 Enhancement lead here -- it looks like this is staying as is for 1.17. If that changes, please don't hesitate to give me a poke and I can add it to the tracking sheet 👍
Has there been any more discussion on a clear path for the future of PSP?
Yes, exactly. That might be the leading contender, and I'm working closely with that team to see make sure it will cover these use cases.
@tallclair - we have implemented most PSP checks in Kyverno. Can you help take a look? Would love to discuss ideas and details.
https://github.com/nirmata/kyverno/blob/master/samples/README.md
The Gatekeeper project has also been looking at what a post-PSP world would look like. Our initial approach has been to break down the PSP resource into individual constraints. We were wondering what the community’s thoughts were on this approach. Maybe it would be a good time to re-imagine how these policies compose? Migration for both new users and existing PSP users will also be important.
cc @maxsmythe @sozercan @tsandall
I have some concerns about breaking the policies into individual constraints, namely that I need to create many more constraint objects. If I think need to clone or alter those for different workloads, I'm worried it will become very complex.
I think the best approach would be a user-centric one. If we can get real feedback on how PSP's are being used, and then see what a similar setup would look like under these alternative plugins, then that can help shape the design.
@tallclair one of the use cases we are pursuing is related to namespace based multi-tenancy. The intent is to use policies to enforce restrictions and ensure that namespaces are properly configured.
Before this can go to GA, we need to fix these problems:
- Flawed authorization model - PSP usage is granted through RBAC, and can either be granted to the user, or the created pod. Granting it to the user is the intuitive approach, but is problematic (see explanation). This approach also has some security issues.
@tallclair , I'm wondering about the above -- can you elaborate on how this approach is problematic and/or has security issues?
Can someone more informed please confirm this tweet:
https://twitter.com/TechJournalist/status/1197658440040165377
And if that's true, what should people using PSP to limit linux capabilities today do going forward?
Hi all, This is a very interesting discussion and we are currently looking for solutions to secure Pod creation in Kubernetes clusters.
We have taken a look at both OPA Gatekeeper and PodSecurityPolicies, as well as the effort to reimplement PSP in OPA constraints. The fundamental issue we found with this comparison is that we are dealing with two opposite models.
From a security perspective, I would argue that the PSP model is better, albeit more difficult to bring into existing clusters as all workloads must conform to it.
How do you plan to bridge this fundamental gap in architecture, between PSP and the Constraint Framework?
/cc @ritazh I'd love to hear your opinion on this, since you have worked on porting the PSP functionality to OPA.
The different approaches definitely make migration more complicated. We're exploring different ways to make the transition smoother.
In a perfect world, I agree that deny-all-by-default is the more secure approach. However, it's one of the things that makes PSP so difficult to use and roll out. In practice, I think gradually ratcheting down permissions is more feasible, and as the old adage goes "the best security is the security you use".
On a side note, we're also discussing how to opt out / exclude / get exceptions to constraints (for example to protect the kube-system namespace). Depending on how this works, you could implement a deny-by-default approach by locking everything down, and then granting exceptions. I'm not sure if that's a use case we want to design for though...
@tallclair do you expect any progress on this in 1.18? I am an enhancements shadow for the release and would like to know if we should be tracking this.
No changes planned for 1.18
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
/remove-lifecycle stale
@tallclair Hi Tim. Any plans for this in 1.19?
No plans for v1.19, although I'm hoping to see some movement in the v1.20 timeframe.
Just stumbled upon Kubernetes Pod Security Policies with Open Policy Agent. @tallclair can you share what's blocking us and where help is needed, happy to contribute as well.
can you share what's blocking us
Basically we just need to make a decision on a path forward. Currently, I think there is agreement that PSP should not go GA in its current form, but we haven't settled on a replacement yet. Options we've discussed:
Am I reading https://github.com/kubernetes/kubernetes/pull/90603 correctly that because the pod security standards are published there's no planned replacement for PSPs in the API server and any replacement will need to be implemented as an outside system?
See https://github.com/kubernetes/enhancements/issues/5#issuecomment-637066475
The deprecation schedule for the current beta version in 1.22 is independent of whether or not an in-tree implementation of the standard pod security profiles will be provided. That has not yet been determined.
Thanks @liggitt was confirming that nothing had been set. thought originally nothing would be deprecated until a replacement was available. Wasn't clear if a decision had been made one way or another.
The deprecation timeline is not specific to PSP and was added as part of https://github.com/kubernetes/enhancements/tree/master/keps/sig-architecture/1635-prevent-permabeta
if i'm reading this correctly, whats pushing the deprecation is that no API should be in the same beta version for more then 9 months so PSP needs to get promoted or deprecated and since there won't be any new betas or GA of psp it needs to get on track for deprecation even though a replacement hasn't been decided on?
if i'm reading this correctly, whats pushing the deprecation is that no API should be in the same beta version for more then 9 months
exactly. all future beta versions of all built in APIs will come with a prebaked deprecation and removal target when they are first introduced
Hi @tallclair
Enhancements Lead here. Any plans for this in 1.20?
Thanks, Kirsten
No plans for v1.20.
This situation is extremely frustrating for those of us needing to run high security clusters. Our options are:
So, my company has implemented fully locked down PSPs. They are not easy to implement, and debugging them is a chore, but they are highly functional, and they actually work. We even published a blog post detailing how they could be used this way, and how to handle exceptions when they happen.
IMO, the PSP beta should be merged as is into the mainline kubernetes core. My reasons are:
@zapman449 can you clarify what you mean by a "fully restrictive PSP replacement"?
Hopefully the Gatekeeper PSP library makes it easier to enforce rules similar to those used by PSP. I'm definitely interested in any functional gaps you are seeing.
@zapman449 would you happen to have a link to that blogpost?
@christianhuening https://developer.squareup.com/blog/kubernetes-pod-security-policies
@maxsmythe I haven't caught up on what Gatekeeper PSP is doing, will review.
However, what I mean is:
These are provided today with PSPs.
If we're asking for a wishlist, I'd love:
@zapman449 - If you haven't seen it, we discussed the future of PSPs in the last sig-auth meeting (https://docs.google.com/document/d/1woLGRoONE3EBVx-wTb4pvp4CI7tmLZ6lS26VTbosLKM/view#heading=h.hsgtsqg83z5u). We'll continue the discussion in the December 9th meeting if you're able to make it, but we also won't make any final decisions without a proposal being sent to the mailing list.
Our intention here is absolutely not to leave anyone high and dry. We know that PSPs address an important security need for Kubernetes, and the purpose of these discussions is to figure out what the best way to meet those needs in the future is.
For anyone following this ticket, PSPs will be deprecated in 1.21 with removal targeted for 1.25.
For anyone following this ticket, PSPs will be deprecated in 1.21 with removal targeted for 1.25.
This is correct. We moved deprecation from 1.22 to 1.21 because we know that existing PSP API will not be losslessly backward compatible with a future replacement. PSP removal is staying at the previously planned 1.25.
next action is removal in 1.25
@liggitt next action is PSP Replacement KEP
For more information on the deprecation, see PodSecurityPolicy Deprecation: Past, Present, and Future.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
Feature Description
Related issues
use
verb inpolicy
API group (will need to allow via either group for some time period)