[PR #3784] [CLOSED] Ldap host failover #6266

Closed
opened 2026-02-05 10:28:05 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/3784
Author: @ssddanbrown
Created: 10/17/2022
Status: Closed

Base: developmentHead: ldap_host_failover


📝 Commits (10+)

  • 4bacc45 multiple ldap server
  • 965258b multiple ldap server update
  • 8658459 Merge branch 'BookStackApp:development' into development
  • fc4380c Merge branch 'development' into Khazhinov/development
  • 392eef8 Added ldap host failover test, updated error handling
  • 303dbf9 Ldap host failover: updated method names and split out method
  • 3d8df95 Combined LDAP connect and bind for failover handling
  • 661d805 Fixed incorrect dn format in ldap mocks
  • 77d4a28 Refactored & split LDAP connection logic
  • 93433fd Added more complexity in an attempt to make ldap host failover fit

📊 Changes

10 files changed (+491 additions, -382 deletions)

View changed files

📝 .env.example.complete (+1 -1)
📝 app/Auth/Access/Guards/LdapSessionGuard.php (+1 -1)
app/Auth/Access/Ldap.php (+0 -136)
app/Auth/Access/Ldap/LdapConfig.php (+60 -0)
app/Auth/Access/Ldap/LdapConnection.php (+135 -0)
app/Auth/Access/Ldap/LdapConnectionManager.php (+121 -0)
📝 app/Auth/Access/Ldap/LdapService.php (+47 -153)
app/Exceptions/LdapFailedBindException.php (+7 -0)
📝 app/Providers/AuthServiceProvider.php (+1 -1)
📝 tests/Auth/LdapTest.php (+118 -90)

📄 Description

Continuation of #3742

TODO

  • Connection is no longer cached per-request. Either need to tweak test expectations or add caching layer in.
  • Manual Testing
  • Added automated failover/error coverage

🔄 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/BookStackApp/BookStack/pull/3784 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 10/17/2022 **Status:** ❌ Closed **Base:** `development` ← **Head:** `ldap_host_failover` --- ### 📝 Commits (10+) - [`4bacc45`](https://github.com/BookStackApp/BookStack/commit/4bacc45fb7daedb07830abaaf8399e17488f7cbf) multiple ldap server - [`965258b`](https://github.com/BookStackApp/BookStack/commit/965258baf5a73ac4a36b307d084ad8de837c7666) multiple ldap server update - [`8658459`](https://github.com/BookStackApp/BookStack/commit/86584591511f2c45d2ef9f1126eb8ffccbdfee06) Merge branch 'BookStackApp:development' into development - [`fc4380c`](https://github.com/BookStackApp/BookStack/commit/fc4380cbc7f002896dcc7e2c08910ae2602ce350) Merge branch 'development' into Khazhinov/development - [`392eef8`](https://github.com/BookStackApp/BookStack/commit/392eef82730478000e6a87060f02e88111fd02a1) Added ldap host failover test, updated error handling - [`303dbf9`](https://github.com/BookStackApp/BookStack/commit/303dbf9b01a62a4d2af5e95f5d977a04172ab617) Ldap host failover: updated method names and split out method - [`3d8df95`](https://github.com/BookStackApp/BookStack/commit/3d8df952b723b03f205e8eebe58da6b24ece6329) Combined LDAP connect and bind for failover handling - [`661d805`](https://github.com/BookStackApp/BookStack/commit/661d8059ed1c7deb3d6af7c5fe748d61036d2742) Fixed incorrect dn format in ldap mocks - [`77d4a28`](https://github.com/BookStackApp/BookStack/commit/77d4a28442313390d6f2033d5b2183b335fdd492) Refactored & split LDAP connection logic - [`93433fd`](https://github.com/BookStackApp/BookStack/commit/93433fdb0f87b5da791299335a7863ab04da7335) Added more complexity in an attempt to make ldap host failover fit ### 📊 Changes **10 files changed** (+491 additions, -382 deletions) <details> <summary>View changed files</summary> 📝 `.env.example.complete` (+1 -1) 📝 `app/Auth/Access/Guards/LdapSessionGuard.php` (+1 -1) ➖ `app/Auth/Access/Ldap.php` (+0 -136) ➕ `app/Auth/Access/Ldap/LdapConfig.php` (+60 -0) ➕ `app/Auth/Access/Ldap/LdapConnection.php` (+135 -0) ➕ `app/Auth/Access/Ldap/LdapConnectionManager.php` (+121 -0) 📝 `app/Auth/Access/Ldap/LdapService.php` (+47 -153) ➕ `app/Exceptions/LdapFailedBindException.php` (+7 -0) 📝 `app/Providers/AuthServiceProvider.php` (+1 -1) 📝 `tests/Auth/LdapTest.php` (+118 -90) </details> ### 📄 Description Continuation of #3742 ### TODO - [x] Connection is no longer cached per-request. Either need to tweak test expectations or add caching layer in. - [ ] Manual Testing - [ ] Added automated failover/error coverage --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:28:05 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6266