Introduce a custom permission action for rendering configuration templates #9880

Closed
opened 2025-12-29 21:23:56 +01:00 by adam · 3 comments
Owner

Originally created by @jeremystretch on GitHub (Jun 21, 2024).

Originally assigned to: @jnovinger on GitHub.

NetBox version

v4.0.5

Feature type

Change to existing functionality

Proposed functionality

Rendering a configuration template for a device or virtual machine will require a new custom permission action, render_config.

Currently, rendering a configuration template via the UI does not require any permissions beyond view for the relevant object type (e.g. dcim.view_device). However, rendering a configuration template via the REST API currently requires the add permission (e.g. dcim.add_device). While the requirement for write permission makes sense for API calls (because we're accepting and processing arbitrary user data), the specific permission for creating devices does not and has been captured as a bug in #14634.

Use case

This new permission action can be used to allow config rendering via the REST API without needing to grant users permission to create new devices/VMs.

Database changes

None

External dependencies

None

Originally created by @jeremystretch on GitHub (Jun 21, 2024). Originally assigned to: @jnovinger on GitHub. ### NetBox version v4.0.5 ### Feature type Change to existing functionality ### Proposed functionality Rendering a configuration template for a device or virtual machine will require a new custom permission action, `render_config`. Currently, rendering a configuration template via the UI does not require any permissions beyond `view` for the relevant object type (e.g. `dcim.view_device`). However, rendering a configuration template via the REST API currently requires the `add` permission (e.g. `dcim.add_device`). While the requirement for write permission makes sense for API calls (because we're accepting and processing arbitrary user data), the specific permission for creating devices does not and has been captured as a bug in #14634. ### Use case This new permission action can be used to allow config rendering via the REST API without needing to grant users permission to create new devices/VMs. ### Database changes None ### External dependencies None
adam closed this issue 2025-12-29 21:23:57 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 21, 2024):

Tagging #14400 as related

@jeremystretch commented on GitHub (Jun 21, 2024): Tagging #14400 as related
Author
Owner

@mraerino commented on GitHub (Sep 9, 2024):

could we do the same for the /api/extras/config-templates/{id}/render/ route? it seems logical since both of them basically have the same implications and similar use cases. only difference is that this API route does not require any permissions on a device, just on the template itself

@mraerino commented on GitHub (Sep 9, 2024): could we do the same for the `/api/extras/config-templates/{id}/render/` route? it seems logical since both of them basically have the same implications and similar use cases. only difference is that this API route does not require any permissions on a device, just on the template itself
Author
Owner

@github-actions[bot] commented on GitHub (Apr 25, 2025):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Apr 25, 2025): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9880