netbox
netbox copied to clipboard
Performance difference when doing a API GET Call with Active user(regular users) vs Superuser
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
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 , 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
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.