Permission tenancy #8741

Closed
opened 2025-12-29 20:40:39 +01:00 by adam · 1 comment
Owner

Originally created by @venomnom on GitHub (Oct 13, 2023).

NetBox version

v3.6.2

Feature type

Change to existing functionality

Proposed functionality

A new field for permissions where it is possible (not forced) to add tenants or tenant groups, where this permission should be granted.
If no tenant is added, it is enabled globally, if one or more are added, the permissions are only granted for devices within these tenants or tenant groups.

This is currently very hard to impossible with constraints as many objects do not posses a field for a tenant. For every one of these it would be needed to create a new permission with the specific constraint to find the tenant, which is a big waste of time and the count of needed permissions.

Use case

At my workplace we are planning to roll NetBox out to all our other locations and with the current permission model it is next to impossible to create a proper access control where NetBox users are only allowed to access the objects from their location and not others. To create a reliable source of truth, from our point of view it is necessary to restrict write permissions to ones own location only for most colleagues.

With this in place, it would also be possible for housing service providers, to have a NetBox instance to be shared with their customers where everyone has his own tenant and can only manage, see and create devices within his own tenant.

Database changes

Added field for nullable foreign keys for tenants in users_objectpermission table

External dependencies

No response

Originally created by @venomnom on GitHub (Oct 13, 2023). ### NetBox version v3.6.2 ### Feature type Change to existing functionality ### Proposed functionality A new field for permissions where it is possible (not forced) to add tenants or tenant groups, where this permission should be granted. If no tenant is added, it is enabled globally, if one or more are added, the permissions are only granted for devices within these tenants or tenant groups. This is currently very hard to impossible with constraints as many objects do not posses a field for a tenant. For every one of these it would be needed to create a new permission with the specific constraint to find the tenant, which is a big waste of time and the count of needed permissions. ### Use case At my workplace we are planning to roll NetBox out to all our other locations and with the current permission model it is next to impossible to create a proper access control where NetBox users are only allowed to access the objects from their location and not others. To create a reliable source of truth, from our point of view it is necessary to restrict write permissions to ones own location only for most colleagues. With this in place, it would also be possible for housing service providers, to have a NetBox instance to be shared with their customers where everyone has his own tenant and can only manage, see and create devices within his own tenant. ### Database changes Added field for nullable foreign keys for tenants in users_objectpermission table ### External dependencies _No response_
adam added the type: feature label 2025-12-29 20:40:39 +01:00
adam closed this issue 2025-12-29 20:40:39 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 13, 2023):

You may be misunderstanding how permissions are applied: There is no relationship between tenant objects and NetBox users or groups. You can accomplish what you want to do using groups. Please consider starting a discussion if you'd like assistance with this.

@jeremystretch commented on GitHub (Oct 13, 2023): You may be misunderstanding how permissions are applied: There is no relationship between tenant objects and NetBox users or groups. You can accomplish what you want to do using groups. Please consider starting a [discussion](https://github.com/netbox-community/netbox/discussions/new/choose) if you'd like assistance with this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8741