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

Feature+Docs: PodSecurityPolicy for Windows #64801

Closed
PatrickLang opened this issue Jun 6, 2018 · 40 comments
Closed

Feature+Docs: PodSecurityPolicy for Windows #64801

PatrickLang opened this issue Jun 6, 2018 · 40 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/windows Categorizes an issue or PR as relevant to SIG Windows.

Comments

@PatrickLang
Copy link
Contributor

Most of the fields in PodSecurityPolicy today cannot be implemented in Windows since they're based on Linux namespace and UID/GID assumptions.

We need a feature proposal to add or modify what can be implemented on Windows to achieve use cases such as:

Areas that need to be documented as does not apply to Windows:

  • hostPID, hostIPC, hostNetwork, hostPorts - these are not possible today without changes to Windows itself, could be considered for future
  • fsGroup
  • *Capabilities, seLinux, AppArmor, sysctl - these are all Linux specific

Is this a BUG REPORT or FEATURE REQUEST?:

/kind feature

Environment:

  • Kubernetes version (use kubectl version): v1.9, v1.10, v1.11
  • Cloud provider or hardware configuration: not specific
  • OS (e.g. from /etc/os-release): Windows Server 2016, Windows Server version 1709, Windows Server version 1803
@k8s-ci-robot k8s-ci-robot added needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. kind/feature Categorizes issue or PR as related to a new feature. labels Jun 6, 2018
@PatrickLang
Copy link
Contributor Author

/sig windows

@k8s-ci-robot k8s-ci-robot added sig/windows Categorizes an issue or PR as relevant to SIG Windows. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jun 6, 2018
@PatrickLang
Copy link
Contributor Author

/assign

@tallclair
Copy link
Member

I'd like to redo PodSecurityPolicy at some point, and don't necessarily see it progressing to GA in its current form. Given that, I think it will be useful to understand the windows requirements for PodSecurityPolicy to inform the design of the successor, but I don't think it's worth investing in retrofitting the current PSP for windows.

@feiskyer
Copy link
Member

feiskyer commented Jun 6, 2018

I'd like to redo PodSecurityPolicy at some point, and don't necessarily see it progressing to GA in its current form.

Any timeline for this?

@tallclair
Copy link
Member

No. Discussions are underway (wg-policy) about what should be a native policy vs. a policy DSL (e.g. OPA/rego). Any progress on PodSecurityPolicy is blocked on that guidance.

@derekwaynecarr
Copy link
Member

@PatrickLang we need to clarify the pod spec for windows before making updates around the policy discussion.

@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 7, 2018
@PatrickLang
Copy link
Contributor Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 7, 2018
@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 5, 2019
@PatrickLang PatrickLang added this to Backlog in SIG-Windows Jan 11, 2019
@PatrickLang
Copy link
Contributor Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 11, 2019
@krmayankk
Copy link

/sig auth

@k8s-ci-robot k8s-ci-robot added the sig/auth Categorizes an issue or PR as relevant to SIG Auth. label Feb 2, 2019
@enj
Copy link
Member

enj commented May 1, 2019

/priority awaiting-more-evidence

@k8s-ci-robot k8s-ci-robot added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label May 1, 2019
@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 30, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

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 rotten

@jsturtevant
Copy link
Contributor

This has come up quite a bit and starting to find more scenarios where although it should be ignore not affect windows pods they are either blocked or don't get scheduled. I will start to look into more as well as the how it might work in regards to Gatekeeper.

/assign

@tallclair
Copy link
Member

A good starting point might be to document that pod features that should be restricted on windows, as part of the "Pod Security Standards"

@jsturtevant
Copy link
Contributor

I went through the Pod Security Standards doc and mapped each to what can/should apply to windows and things that don't make sense. If folks want to have a look and leave comments we can discuss at a sig-windows meeting: https://docs.google.com/spreadsheets/d/1Snhqtnu38I2Sqa7UQQbD3ZwYTkXMo7L81lUHSmh7buU/edit?usp=sharing

For areas where the security context was causing issues with PSP these PR's should take care of them: #93475 and #91482

In summary the following should be available in windows and need to map to a particular "standard".

  • Usage of volume types
  • Usage of the host filesystem
  • Running as Non-root

There are on windows specific one that should be added:

  • GMSA

@jsturtevant
Copy link
Contributor

With the proposal for the Privileged Containers KEP, there was an analysis done for what would be potentially impacted in regards to Pod Security Standards and policies. Please see the KEP for details.

@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 3, 2020
@jsturtevant
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 3, 2020
@jglick
Copy link

jglick commented Jan 20, 2021

Can this be closed given #97171?

@liggitt
Copy link
Member

liggitt commented Jan 20, 2021

for PodSecurityPolicy specifically, I don't expect to see any windows-related changes, so this issue could probably be closed, but the points raised here (how OS-specific implications shape policy) would be good for the group working on a proposal for a PSP replacement to consider/incorporate if possible

cc @IanColdwater @tabbysable @tallclair

@jsturtevant
Copy link
Contributor

agree for PSP but would like to get update guidance for general Windows Pod Security Standards doc: https://kubernetes.io/docs/concepts/security/pod-security-standards/

@tabbysable
Copy link
Member

@jsturtevant It sounds like y'all in SIG Windows know what the hardening guidelines you have in mind are (at least somewhat, with the mappings you've done already), but would like some additional eyes on it and assistance with writing a PR to the Pod Security Standards doc? I'd recommend asking about that in the sig-security-docs channel on kubernetes slack to see if anybody has bandwidth to help.

@jsturtevant
Copy link
Contributor

Before writing the docs I wanted to ensure we had these working in some form (most likely via Gatekeeper) so if we publish guidance it is something that can be followed and implemented. I had to step away from this shortly after doing the initial analysis for other work. Hoping I can get back to it soon.

@tabbysable
Copy link
Member

Awesome! I assume you'll be PRing an example policy into https://github.com/open-policy-agent/gatekeeper-library/. Feel free to drop into #sig-security on k8s slack to ask if anyone wants to review it!

@jsturtevant
Copy link
Contributor

We got the first gate-keeper policy PR open for anyone following along: open-policy-agent/gatekeeper-library#70

@enj enj added this to Backlog in SIG Auth Old Apr 9, 2021
@enj enj moved this from Needs Triage to Backlog in SIG Auth Old Jun 7, 2021
@fejta-bot
Copy link

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-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 6, 2021
@k8s-triage-robot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 5, 2021
@tallclair
Copy link
Member

I think we can close this, since PSP is marked as deprecated and targeting removal in v1.25

SIG-Windows automation moved this from Backlog to Done (v1.23) Aug 19, 2021
SIG Auth Old automation moved this from Backlog to Closed / Done Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/windows Categorizes an issue or PR as relevant to SIG Windows.
Projects
Archived in project
SIG-Windows
  
Done (v1.23)
SIG Auth Old
Closed / Done
Development

No branches or pull requests