Ability to create/view an API keys without permission to do so #6944

Closed
opened 2025-12-29 19:47:04 +01:00 by adam · 1 comment
Owner

Originally created by @dteknet on GitHub (Sep 7, 2022).

NetBox version

v3.3.1

Python version

3.8

Steps to Reproduce

  1. Create a new user with no permissions assigned
  2. Log in as the new user
  3. Open the user's menu on the top right and select API Tokens
  4. Create a new API key

Expected Behavior

Operation is rejected or the "Add a Token" button is not displayed at all if permission to create a new key is not granted.

Observed Behavior

A user can see and create new API tokens despite he doesn't have explicit permission to do so.

Originally created by @dteknet on GitHub (Sep 7, 2022). ### NetBox version v3.3.1 ### Python version 3.8 ### Steps to Reproduce 1. Create a new user with no permissions assigned 2. Log in as the new user 3. Open the user's menu on the top right and select API Tokens 4. Create a new API key ### Expected Behavior Operation is rejected or the "Add a Token" button is not displayed at all if permission to create a new key is not granted. ### Observed Behavior A user can see and create new API tokens despite he doesn't have explicit permission to do so.
adam closed this issue 2025-12-29 19:47:04 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 7, 2022):

A user can see and create new API tokens despite he doesn't have explicit permission to do so.

This is intended behavior per #6073 and #8436. It's also noted in the REST API documentation:

All users can create and manage REST API tokens under the user control panel in the UI.

@jeremystretch commented on GitHub (Sep 7, 2022): > A user can see and create new API tokens despite he doesn't have explicit permission to do so. This is intended behavior per #6073 and #8436. It's also noted in the [REST API documentation](https://docs.netbox.dev/en/stable/integrations/rest-api/#tokens): > All users can create and manage REST API tokens under the user control panel in the UI.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6944