-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
A problem where information can be read even though read permissions have not been granted. #13543
Comments
Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v3.5.8. Please re-confirm the reported behavior on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data. To add more context, I created a user with 0 permissions and 0 groups and also did not provide any staff/superuser access. |
You did not mention that your user had other permissions like |
The first post has been updated. Please check back. |
There's an important distinction being overlooked here. Permissions relating to the ConfigContext model pertain to the config context objects themselves, not the rendered context for a given device or VM. This is best conveyed by this screenshot from above: Note that the rendered context is displayed, but the source contexts - the actual ConfigContext objects - are not. There is a bug insofar as the "config context" tab under the device view is hidden but the view remains accessible; this is obviously inconsistent. However, I reject the assertion that the I believe the fix here is to not condition display of the "config context" tab on the |
I understand that the behavior of the "config context" tab being hidden under the device view is more of a bug. In light of this implication, I believe a discussion is needed as to whether this feature should be added. |
I am in agreement here that the tab should be visible based on the person's ability to view the device itself. I think if there is a need to restrict render context data view, a new FR should be opened to discuss that. |
NetBox version
v3.5.5
Python version
3.10
Steps to Reproduce
Reload the page after granting, and some items will become viewable.

Open the appropriate device. The "Config Context" permission is not granted, so it is not shown in the tab.

Add "config-context/" to the current URL. In the image example, "https://netbox/dcim/devices/3009/config-context/"


6.Check the api page. You will see the "Config Context" section.

7.I do not have access to "https://netbox/extras/config-contexts/".

Expected Behavior
If you hit the URL directly, expect to see "You do not have permission to access this page.
We also expect that the API will not display any information that you do not have permission to access.
Observed Behavior
Users who do not have permissions to read the "Config Context" behave in such a way that the corresponding page and the "Config Context" of the "Device" are hidden.
However, in reality, this is visible by directly hitting the API or URL.
We believe this is a bug that allows users to read the "Config Context" information even though they do not have read permission.
The text was updated successfully, but these errors were encountered: