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

Introduce a permission to destroy only snapshots, not datasets #11524

Open
emtiu opened this issue Jan 25, 2021 · 11 comments
Open

Introduce a permission to destroy only snapshots, not datasets #11524

emtiu opened this issue Jan 25, 2021 · 11 comments
Labels
Type: Feature Feature request or new feature

Comments

@emtiu
Copy link

emtiu commented Jan 25, 2021

Currently, destroying datasets and destroying snapshots are both covered by the destroy permission.

As per this blogpost and this old bug report, it would be useful to be able to delegate the permission to destroy snapshots, but not datasets. This permissions might be called destroysnaps.

There's at least two use cases:

  1. Consider an environment in which users might want to take snapshots, but not create or destroy any datsets (such as: there's one dataset per home directory for all users). Here, we might want to allow users to maintain snapshots on their own (in order to save space, or maintain a tidy set of snapshots). This is currently not possible without also granting the permission to destroy datasets, which is undesirable.
  2. destroysnaps might bring more peace of mind to anxious users (like myself): We could allow ourselves to destroy snapshots as a normal user, but leave the destroying of datasets to root, avoiding the horror of being one typo away from accidentally destroying a dataset.
@emtiu emtiu added the Type: Feature Feature request or new feature label Jan 25, 2021
@crabique
Copy link

crabique commented Mar 12, 2021

Agree, every time I'm recursively destroying snapshots I'm anxious if I forgot the @ somewhere, also could be useful for enforcing capabilities in multi-tenant filesystem scenarios.

It could also be a nice exempt from mount permission for destroying snapshots that are auto-mount only, the less permissions are required the better :)

@putnam
Copy link

putnam commented Jan 27, 2022

This seems like a no-brainer and I'd really like to see this. Besides the risky command line stuff, there are lots of snapshot management tools where you really want to give them the least amount of permissions possible. There is a big difference between destroying a snap and a dataset.

@allanjude
Copy link
Contributor

What about bookmarks? Is that implied by the snapshot permission? Or does it need its own?

@emtiu
Copy link
Author

emtiu commented Jan 27, 2022

What about bookmarks? Is that implied by the snapshot permission? Or does it need its own?

Since users here are mainly concerned with the safety of preventing accidental datset destruction while allowing for simple maintenance tasks, I'd say bookmarks could be included under destroysnaps.

@parke
Copy link

parke commented Jan 15, 2023

Fwiw, the idea of adding granular permission for snapshot destruction was mentioned in @allanjude's talk at the OpenZFS Developer Summit 2022.

@skirmess
Copy link

What about bookmarks? Is that implied by the snapshot permission? Or does it need its own?

They need their own as destroying bookmarks can destroy your backup procedure. You don't want users, or accidents, to prevent your backup from working.

@emtiu
Copy link
Author

emtiu commented Aug 25, 2023

They need their own as destroying bookmarks can destroy your backup procedure. You don't want users, or accidents, to prevent your backup from working.

Good point. So destroysnaps and destroybookmarks should be separate.

@f0x52
Copy link

f0x52 commented Dec 26, 2024

Has there been any progress on this, or are there particular reasons this seems to be stuck?

@emtiu
Copy link
Author

emtiu commented Dec 26, 2024

My best guess is that no developers capable of implementing this feature are interested in it.

@joshenders
Copy link

joshenders commented Dec 26, 2024

The best way to get attention for this feature is to add it to the agenda and discuss it in a monthly OpenZFS Leadership meeting: https://openzfs.org/wiki/OpenZFS_Leadership_Meeting

@bghira
Copy link

bghira commented Dec 27, 2024

the best way to get this feature rolling is to open a half-assed pull request and hope that others come along to point out the flaws and help fix/improve it for inclusion; i do this all the time to good effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Feature request or new feature
Projects
None yet
Development

No branches or pull requests

9 participants