[PR #7928] [MERGED] Fix #7751: LDAP: Only get API user from ldap when FIND_GROUP_PERMS is on #13299

Closed
opened 2025-12-29 22:26:37 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/7928
Author: @kkthxbye-code
Created: 11/25/2021
Status: Merged
Merged: 12/3/2021
Merged by: @jeremystretch

Base: developHead: fix-7751


📝 Commits (1)

  • 8bb0cba Fix #7751 - LDAP: Only get API user from ldap when FIND_GROUP_PERMS is enabled

📊 Changes

1 file changed (+7 additions, -4 deletions)

View changed files

📝 netbox/netbox/api/authentication.py (+7 -4)

📄 Description

Fixes: #7751

When using the LDAP backend for auth, all API requests would refresh the user (local or LDAP created) from the LDAP server, causing performance issues. With this fix, the user is only refreshed when FIND_GROUP_PERMS is enabled.

I tested all combinations I could think of. Not sure if this change in logic warrants a warning in the release notes. The changes for different combinations of settings can be seen in the issue: #7751


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/7928 **Author:** [@kkthxbye-code](https://github.com/kkthxbye-code) **Created:** 11/25/2021 **Status:** ✅ Merged **Merged:** 12/3/2021 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `fix-7751` --- ### 📝 Commits (1) - [`8bb0cba`](https://github.com/netbox-community/netbox/commit/8bb0cba949ca6fd4fe3d48b1cec0153ab1ae4817) Fix #7751 - LDAP: Only get API user from ldap when FIND_GROUP_PERMS is enabled ### 📊 Changes **1 file changed** (+7 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `netbox/netbox/api/authentication.py` (+7 -4) </details> ### 📄 Description ### Fixes: #7751 When using the LDAP backend for auth, all API requests would refresh the user (local or LDAP created) from the LDAP server, causing performance issues. With this fix, the user is only refreshed when FIND_GROUP_PERMS is enabled. I tested all combinations I could think of. Not sure if this change in logic warrants a warning in the release notes. The changes for different combinations of settings can be seen in the issue: #7751 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:26:37 +01:00
adam closed this issue 2025-12-29 22:26:37 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13299