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

[Proposal] Allow a Pod Security Policy to managing access to the Flexvolumes #723

Merged

Conversation

php-coder
Copy link
Contributor

@php-coder php-coder commented Jun 14, 2017

This PR proposes to add the AllowedFlexVolumes to a PSP to control pod's access to the different Flexvolume drivers.

PTAL @smarterclayton @pweil- @mfojtik

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 14, 2017
@liggitt
Copy link
Member

liggitt commented Jun 14, 2017

@Q-Lee @kubernetes/sig-auth-proposals

@ericchiang ericchiang changed the title [Poposal] Allow a Pod Security Policy to managing access to the Flexvolumes [Proposal] Allow a Pod Security Policy to managing access to the Flexvolumes Jun 19, 2017
@adelton
Copy link
Contributor

adelton commented Jul 25, 2017

Do we really want to go with separate AllowedFlexDrivers? Would it be easier for users to list the allowed vendor/drivers as part of the volumes list, something like flexVolume/redhat.com/kvm, flexVolume/example.com/keytab?

In a similar manner, there could then be hostPath/var/lib/datax and similar ways to restrict scope of other volume types.

@pweil-
Copy link
Contributor

pweil- commented Jul 25, 2017

Do we really want to go with separate AllowedFlexDrivers? Would it be easier for users to list the allowed vendor/drivers as part of the volumes list, something like flexVolume/redhat.com/kvm, flexVolume/example.com/keytab?

We currently validate that we're covering volume sources to prevent drift between allowed and available volumes so that would have to be changed if we decided to do this (just need to keep that in mind)

@liggitt
Copy link
Member

liggitt commented Jul 25, 2017

each volume source type is likely to have different options. for hostpath, it is the local filesystem path. for flexvolumes, it's driver (and possibly option-level control in the future). I'd rather keep different things different.

@adelton
Copy link
Contributor

adelton commented Jul 27, 2017

In general, the proposal LGTM.

@php-coder
Copy link
Contributor Author

AllowedFlexDrivers was renamed to AllowedFlexvolumes and type was changed from []string to []AllowedFlexvolume. This lets us expand options in the future (suggested by @liggitt).

// Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes
// is allowed in the "Volumes" field.
// +optional
AllowedFlexvolumes []AllowedFlexvolume
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, AllowedFlexVolumes (match the case in the field)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed.

@liggitt liggitt added sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/storage Categorizes an issue or PR as relevant to SIG Storage. labels Aug 2, 2017
@liggitt
Copy link
Member

liggitt commented Aug 2, 2017

cc @kubernetes/sig-storage-proposals @kubernetes/sig-auth-proposals


### Validation rules

No validation is expected for Flexvolume driver names. API server should allow
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: driver name should be non-empty

@liggitt
Copy link
Member

liggitt commented Aug 12, 2017

this LGTM and parallels fine-grained control over hostpaths. control over specific flex drivers is important as they begin to be used for a wider variety of applications

@liggitt
Copy link
Member

liggitt commented Aug 12, 2017

ping @kubernetes/sig-storage-proposals @saad-ali @childsb

@k8s-github-robot k8s-github-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 15, 2017
@php-coder
Copy link
Contributor Author

Commits were squashed without changes.

PTAL.

@childsb
Copy link
Contributor

childsb commented Aug 23, 2017

This LGTM

@liggitt
Copy link
Member

liggitt commented Aug 23, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 23, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 3518e7d into kubernetes:master Aug 23, 2017
@php-coder php-coder deleted the flex_volumes_drivers_scc branch August 23, 2017 14:12
@saad-ali
Copy link
Member

Seems reasonable to me.

openshift-merge-robot added a commit to openshift/origin that referenced this pull request Sep 6, 2017
Automatic merge from submit-queue

SCC: add AllowedFlexVolumes to manage a whitelist of allowed flexvolumes drivers

Proposal: kubernetes/community#723
Trello: https://trello.com/c/YT6sNEay/61-5-sccfsi-psp-scc-flex-volume-support
Examples: #15558 (comment)
vdemeester pushed a commit to vdemeester/kubernetes that referenced this pull request Nov 23, 2017
Automatic merge from submit-queue (batch tested with PRs 55824, 53179). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow Pod Security Policy to manage access to the Flexvolumes

**What this PR does / why we need it**:
For proposal: https://github.com/kubernetes/community/blob/a1b9495e1b722699196ccec88d831fc850100827/contributors/design-proposals/auth/flex-volumes-drivers-psp.md (kubernetes/community#723)
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
Pod Security Policy can now manage access to specific FlexVolume drivers
```
sttts pushed a commit to sttts/api that referenced this pull request Nov 27, 2017
Automatic merge from submit-queue (batch tested with PRs 55824, 53179). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow Pod Security Policy to manage access to the Flexvolumes

**What this PR does / why we need it**:
For proposal: https://github.com/kubernetes/community/blob/a1b9495e1b722699196ccec88d831fc850100827/contributors/design-proposals/auth/flex-volumes-drivers-psp.md (kubernetes/community#723)
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
Pod Security Policy can now manage access to specific FlexVolume drivers
```

Kubernetes-commit: f0e337cd56f36a6c9b8a0107084baa18fc20ddd8
sttts pushed a commit to sttts/api that referenced this pull request Nov 27, 2017
Automatic merge from submit-queue (batch tested with PRs 55824, 53179). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow Pod Security Policy to manage access to the Flexvolumes

**What this PR does / why we need it**:
For proposal: https://github.com/kubernetes/community/blob/a1b9495e1b722699196ccec88d831fc850100827/contributors/design-proposals/auth/flex-volumes-drivers-psp.md (kubernetes/community#723)
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
Pod Security Policy can now manage access to specific FlexVolume drivers
```

Kubernetes-commit: f0e337cd56f36a6c9b8a0107084baa18fc20ddd8
sttts pushed a commit to sttts/api that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue (batch tested with PRs 55824, 53179). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow Pod Security Policy to manage access to the Flexvolumes

**What this PR does / why we need it**:
For proposal: https://github.com/kubernetes/community/blob/a1b9495e1b722699196ccec88d831fc850100827/contributors/design-proposals/auth/flex-volumes-drivers-psp.md (kubernetes/community#723)
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
Pod Security Policy can now manage access to specific FlexVolume drivers
```

Kubernetes-commit: f0e337cd56f36a6c9b8a0107084baa18fc20ddd8
sttts pushed a commit to sttts/api that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue (batch tested with PRs 55824, 53179). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow Pod Security Policy to manage access to the Flexvolumes

**What this PR does / why we need it**:
For proposal: https://github.com/kubernetes/community/blob/a1b9495e1b722699196ccec88d831fc850100827/contributors/design-proposals/auth/flex-volumes-drivers-psp.md (kubernetes/community#723)
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
Pod Security Policy can now manage access to specific FlexVolume drivers
```

Kubernetes-commit: f0e337cd56f36a6c9b8a0107084baa18fc20ddd8
sttts pushed a commit to sttts/api that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue (batch tested with PRs 55824, 53179). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow Pod Security Policy to manage access to the Flexvolumes

**What this PR does / why we need it**:
For proposal: https://github.com/kubernetes/community/blob/a1b9495e1b722699196ccec88d831fc850100827/contributors/design-proposals/auth/flex-volumes-drivers-psp.md (kubernetes/community#723)
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
Pod Security Policy can now manage access to specific FlexVolume drivers
```

Kubernetes-commit: f0e337cd56f36a6c9b8a0107084baa18fc20ddd8
sttts pushed a commit to sttts/api that referenced this pull request Nov 28, 2017
Automatic merge from submit-queue (batch tested with PRs 55824, 53179). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow Pod Security Policy to manage access to the Flexvolumes

**What this PR does / why we need it**:
For proposal: https://github.com/kubernetes/community/blob/a1b9495e1b722699196ccec88d831fc850100827/contributors/design-proposals/auth/flex-volumes-drivers-psp.md (kubernetes/community#723)
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
Pod Security Policy can now manage access to specific FlexVolume drivers
```

Kubernetes-commit: f0e337cd56f36a6c9b8a0107084baa18fc20ddd8
k8s-publishing-bot pushed a commit to k8s-publishing-bot/api that referenced this pull request Nov 29, 2017
Automatic merge from submit-queue (batch tested with PRs 55824, 53179). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow Pod Security Policy to manage access to the Flexvolumes

**What this PR does / why we need it**:
For proposal: https://github.com/kubernetes/community/blob/a1b9495e1b722699196ccec88d831fc850100827/contributors/design-proposals/auth/flex-volumes-drivers-psp.md (kubernetes/community#723)
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
Pod Security Policy can now manage access to specific FlexVolume drivers
```

Kubernetes-commit: f0e337cd56f36a6c9b8a0107084baa18fc20ddd8
k8s-publishing-bot pushed a commit to k8s-publishing-bot/api that referenced this pull request Dec 7, 2017
Automatic merge from submit-queue (batch tested with PRs 55824, 53179). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow Pod Security Policy to manage access to the Flexvolumes

**What this PR does / why we need it**:
For proposal: https://github.com/kubernetes/community/blob/a1b9495e1b722699196ccec88d831fc850100827/contributors/design-proposals/auth/flex-volumes-drivers-psp.md (kubernetes/community#723)
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
Pod Security Policy can now manage access to specific FlexVolume drivers
```

Kubernetes-commit: f0e337cd56f36a6c9b8a0107084baa18fc20ddd8
MadhavJivrajani pushed a commit to MadhavJivrajani/community that referenced this pull request Nov 30, 2021
…_scc

Automatic merge from submit-queue

[Proposal] Allow a Pod Security Policy to managing access to the Flexvolumes

This PR proposes to add the `AllowedFlexVolumes` to a PSP to control pod's access to the different Flexvolume drivers.

PTAL @smarterclayton @pweil- @mfojtik
danehans pushed a commit to danehans/community that referenced this pull request Jul 18, 2023
Co-authored-by: Mitch Connors <mitchconnors@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.