Performance difference when doing a API GET Call with Active user(regular users) vs Superuser #9297

Closed
opened 2025-12-29 20:48:03 +01:00 by adam · 3 comments
Owner

Originally created by @ashokthangaraj on GitHub (Feb 27, 2024).

Deployment Type

Self-hosted

NetBox Version

v3.7.0

Python Version

3.8

Steps to Reproduce

Authenticate ldap user (Active User) no constraints for any objects
user profile-->Create API Token.
Authenticate ldap user (SuperUser) no constraints for any objects
user profile-->Create API Token.

Using Postman for GET API Call to any objects, eg: Racks, devices

Expected Behavior

Response time should be same for both Active user and Superuser when doing postman GET call.
When i change the Active user to Super user i can see the response time change to less than 200ms.

Observed Behavior

Superuser response time is less than 200ms but the same Get call with Active user API token takes more than 2seconds.
Attached the Postman Screenshot
Screenshot 2024-02-26 at 4 59 00 PM

Originally created by @ashokthangaraj on GitHub (Feb 27, 2024). ### Deployment Type Self-hosted ### NetBox Version v3.7.0 ### Python Version 3.8 ### Steps to Reproduce Authenticate ldap user (Active User) no constraints for any objects user profile-->Create API Token. Authenticate ldap user (SuperUser) no constraints for any objects user profile-->Create API Token. Using Postman for GET API Call to any objects, eg: Racks, devices ### Expected Behavior Response time should be same for both Active user and Superuser when doing postman GET call. When i change the Active user to Super user i can see the response time change to less than 200ms. ### Observed Behavior Superuser response time is less than 200ms but the same Get call with Active user API token takes more than 2seconds. Attached the Postman Screenshot <img width="1619" alt="Screenshot 2024-02-26 at 4 59 00 PM" src="https://github.com/netbox-community/netbox/assets/26494670/7f2b03e8-3454-4567-8b20-5cf619c36cc6">
adam closed this issue 2025-12-29 20:48:03 +01:00
Author
Owner

@jeremystretch commented on GitHub (Feb 27, 2024):

Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.

@jeremystretch commented on GitHub (Feb 27, 2024): Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.
Author
Owner

@ashokthangaraj commented on GitHub (Feb 27, 2024):

@jeremystretch ,
Here is the steps to reproduce the steps:
Fresh install netbox
user1 Authenticate using ldap
create 10 devices devices without any constraints.
Create API token for the user with user as Active User
Make a GET Call using postman to https://netbox.domain.com/api/dcim/racks/8000/
Total Response Time: +2seconds
Change the user status to Superuser
Make a GET Call using postman to https://netbox.domain.com/api/dcim/racks/8000/
Total Response Time: less than : 3ms

Expected Behaviour: Get call Response time should be similar for all the user regardless of Active/staff/superuser
Observer Behaviour: Response Time differs for each user status.

Attached the screenshot of the same with two different user status making a GET call to same objects and the plese find the Response Time in the screenshot.

Reference Community Slack Update Thread:
https://netdev-community.slack.com/archives/C01P0FRSXRV/p1708988406344519

@ashokthangaraj commented on GitHub (Feb 27, 2024): @jeremystretch , Here is the steps to reproduce the steps: Fresh install netbox user1 Authenticate using ldap create 10 devices devices without any constraints. Create API token for the user with user as Active User Make a GET Call using postman to https://netbox.domain.com/api/dcim/racks/8000/ Total Response Time: +2seconds Change the user status to Superuser Make a GET Call using postman to https://netbox.domain.com/api/dcim/racks/8000/ Total Response Time: less than : 3ms Expected Behaviour: Get call Response time should be similar for all the user regardless of Active/staff/superuser Observer Behaviour: Response Time differs for each user status. Attached the screenshot of the same with two different user status making a GET call to same objects and the plese find the Response Time in the screenshot. Reference Community Slack Update Thread: https://netdev-community.slack.com/archives/C01P0FRSXRV/p1708988406344519
Author
Owner

@jeremystretch commented on GitHub (Feb 29, 2024):

I'm afraid this isn't something we'll be able to attempt reproducing, as it requires an external LDAP authentication server with a specific configuration (yours) for testing. It's almost certainly an issue with the authentication between NetBox and this remote server; you'll need to do some troubleshooting to determine exactly where the problem lies. You can try starting a discussion for assistance, but this is likely going to be somewhat unique to your local deployment.

If you are able to track a specific issue in NetBox itself, please submit a new bug report detailing your specific findings.

@jeremystretch commented on GitHub (Feb 29, 2024): I'm afraid this isn't something we'll be able to attempt reproducing, as it requires an external LDAP authentication server with a specific configuration (yours) for testing. It's almost certainly an issue with the authentication between NetBox and this remote server; you'll need to do some troubleshooting to determine exactly where the problem lies. You can try starting a [discussion](https://github.com/netbox-community/netbox/discussions/new/choose) for assistance, but this is likely going to be somewhat unique to your local deployment. If you are able to track a specific issue in NetBox itself, please submit a new bug report detailing your specific findings.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9297