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

design for multi-tenancy support #18

Open
kstewart opened this issue Aug 9, 2017 · 20 comments
Open

design for multi-tenancy support #18

kstewart opened this issue Aug 9, 2017 · 20 comments
Labels
Area/multi-tenancy backlog Breaking change Impacts backwards compatibility Enhancement/User End-User Enhancement to Velero kind/requirement Needs Product Blocked needing input or feedback from Product Reviewed Q2 2021

Comments

@kstewart
Copy link

kstewart commented Aug 9, 2017

Allow users other than cluster-admin to use Ark. This has security implications:

  • need to ensure a user can only back up/restore PVs/snapshots they have access to
  • need to ensure a user can only back up kube resources they have access to
  • need to find a way to have the restore "run as" the user, so there's no privilege escalation
@ncdc
Copy link
Contributor

ncdc commented Jun 4, 2018

@yastij is also interested in helping out here

@yastij
Copy link
Member

yastij commented Jun 4, 2018

+1

@dhawal55
Copy link

+1. I'm willing to help too. I will start by getting familiar with the codebase and come up with a proposal

@ncdc ncdc added the Breaking change Impacts backwards compatibility label Jul 6, 2018
@ncdc ncdc added this to the TBD milestone Nov 9, 2018
@skriss skriss removed their assignment Nov 29, 2018
@skriss skriss added the Enhancement/User End-User Enhancement to Velero label May 17, 2019
@ncdc ncdc removed their assignment Jul 15, 2019
@abessifi
Copy link
Contributor

Guys, do you please know in which upcomming release this feature will be available ?

@skriss
Copy link
Member

skriss commented Oct 28, 2019

@abessifi we haven't slated it for a release yet - we are still in the stage of needing to do some R&D/design work to figure out how this would work. we'll update here as/when it progresses!

If you have any input on this item - please feel free to add comments on this issue about your use case, that would be helpful for the team.

@skriss skriss modified the milestones: TBD, v1.3 Dec 3, 2019
@skriss
Copy link
Member

skriss commented Dec 3, 2019

Moving this into v1.3 for tracking purposes, as we have some community members who are interested in helping to design/implement.

@yastij yastij removed their assignment Dec 4, 2019
@skriss skriss unassigned nrb Dec 6, 2019
@skriss skriss changed the title Multi-tenancy support design for multi-tenancy support Dec 6, 2019
@ezzoueidi
Copy link
Contributor

I am interested on helping with this feature. Maybe we could take this up to the velero community meeting and discuss it with all the other interested community members?

@michmike
Copy link
Contributor

michmike commented Jan 8, 2020

@nzoueidi please attend our next community meeting and we can discuss your use case. Karl from the Cruise team was spearheading this effort if you want to sync with them as well.

@abessifi
Copy link
Contributor

The biggest concern for us is that once a non-admin user is granted permissions which allow them to either 1. access the Velero namespace, or 2. create Velero resources, then we have broken the security model.

I expect users to interract with Velero only through CRDs. This is the best way to abstract the access to Velero and it's underlying infra (Restic in this case). I think the challenge here is more about redesigning Velero to support multi-tenancy out-of-the-box which may lead to a lot of code refactoring.

@bgagnon
Copy link
Contributor

bgagnon commented Mar 13, 2020

Can we imagine a model that fits more directly with RBAC principles?

  • velero server can run in its own namespace
  • velero resources can exist in any namespace
  • access to velero Backup/Snapshot objects are managed via ClusterRole, Role, ClusterRoleBinding and RoleBinding
  • velero backups are scheduled as individual pods (Jobs) in the same namespace as the Backup/Restore object (thus, visible and manageable by tenants)
  • velero service accounts used in the jobs are bound to namespaces and also subject to RBAC rules

One thing that doesn't fit well with this model is a multi-namespace backup, which seems like a typical pattern for Velero. Should we sacrifice this for the sake of multi-tenancy? Probably not...

@skriss
Copy link
Member

skriss commented Mar 13, 2020

@bgagnon yeah, I have been thinking about something like that as well. Another challenge is how cluster-scoped resources are dealt with - Persistent Volumes being the first one that comes to mind. If you have a constrained service account per namespace, then it needs to be able to GET these cluster-scoped resources in order to back them up.

@bgagnon
Copy link
Contributor

bgagnon commented Mar 13, 2020

PersistentVolume objects are going to be difficult, for sure. In our multi-tenant platform we've allowed anyone to list/get them, but only cluster admins can create/update/delete them. Tenants can only manipulate PersistentVolumeClaims. We didn't find this transparency to be a concern (our tenants all know and trust each other).

Even then, there's a need for carefully managing the PV binding references. For one thing, there's a need to permanently annotate PVs (and/or their corresponding cloud volume) with the name of the tenant that owns it. This info can later be used to restrict was is allowed or not-allowed as a PVC source.

Overall, I think some sort of coordination with another instance of velero running with elevated privileges is going to be necessary for the pieces that involve mutating PersistentVolume objects.

@bsctl
Copy link

bsctl commented Apr 4, 2020

Hello, any progress to introduce multi-tenancy in Velero?

@reasonerjt
Copy link
Contributor

Per discussion, we decided to put this in the backlog and revisit in planning some future release.

@likku123
Copy link

Any update on multitenancy implementation in Velero?

@mcgrawia
Copy link

My team and I are also running into this issue. Is there any suggestion on where to start with an MR to add support for this? We would be interested in contributing towards a solution. Thanks

@BNutterJP
Copy link

Hi - do you please know in which up-coming release this feature will be available ? A timeline would helpful. Thanks!

@pknee
Copy link

pknee commented Oct 25, 2023

Hi!

We do run k8s as a platform for hosted namespaces so this would hugely benefit our usecase!

Thanks!

@ksyblast
Copy link

+1 for the feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/multi-tenancy backlog Breaking change Impacts backwards compatibility Enhancement/User End-User Enhancement to Velero kind/requirement Needs Product Blocked needing input or feedback from Product Reviewed Q2 2021
Projects
None yet
Development

Successfully merging a pull request may close this issue.