Unable to enable AzureAD Auth when behind a proxy #1092

Closed
opened 2026-02-04 23:44:05 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @comnam90 on GitHub (Mar 14, 2019).

The bug
I'm trying to add AzureAD Auth to my existing instance with LDAP.
Everything appears to be setup correctly, and the 'Connect Account' icon shows up in edit profile.
However, when I try to connect, it eventually fails with the below error.
cURL error 7: Failed to connect to login.microsoftonline.com port 443: Connection timed out (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)/var/www/bookstack/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php#185

I believe this is because the server that Bookstack is hosted on doesn't have 443 out to the internet, and needs to go via a proxy for internet access.
HTTP_PROXY environment variable is set, and other apps on the server have internet access using the proxy.

Do I need to specify the proxy explicitly in .env or something?

Steps To Reproduce
Steps to reproduce the behavior:

  1. Deploy bookstack on a server without direct internet access (via proxy server only)
  2. Configure Environment variable HTTP_Proxy to point to proxy
  3. Confirm internet access with wget
  4. Enable LDAP Auth
  5. Enable Azure AD Auth
  6. Connect AzureAD account with LDAP account.

Expected behavior
Accounts are connected and AzureAD Logins/SSO work

Configuration:

  • Exact BookStack Version (Found in settings): v25.2
  • PHP Version: 7.0.33
  • Hosting Method (Nginx/Apache/Docker): nginx
Originally created by @comnam90 on GitHub (Mar 14, 2019). **The bug** I'm trying to add AzureAD Auth to my existing instance with LDAP. Everything appears to be setup correctly, and the 'Connect Account' icon shows up in edit profile. However, when I try to connect, it eventually fails with the below error. `cURL error 7: Failed to connect to login.microsoftonline.com port 443: Connection timed out (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)/var/www/bookstack/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php#185` I believe this is because the server that Bookstack is hosted on doesn't have 443 out to the internet, and needs to go via a proxy for internet access. HTTP_PROXY environment variable is set, and other apps on the server have internet access using the proxy. Do I need to specify the proxy explicitly in .env or something? **Steps To Reproduce** Steps to reproduce the behavior: 1. Deploy bookstack on a server without direct internet access (via proxy server only) 2. Configure Environment variable HTTP_Proxy to point to proxy 3. Confirm internet access with wget 4. Enable LDAP Auth 5. Enable Azure AD Auth 6. Connect AzureAD account with LDAP account. **Expected behavior** Accounts are connected and AzureAD Logins/SSO work **Configuration:** - Exact BookStack Version (Found in settings): v25.2 - PHP Version: 7.0.33 - Hosting Method (Nginx/Apache/Docker): nginx
OVERLORD added the 🐕 Support🚪 Authentication labels 2026-02-04 23:44:05 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Feb 7, 2021):

For future potential reference, Socialite does seem to take/pass guzzle parameters via a guzzle key of the configs for the services:
https://github.com/laravel/socialite/blob/5.x/src/SocialiteManager.php#L127

And Guzzle takes a proxy array: https://docs.guzzlephp.org/en/stable/request-options.html#proxy

@ssddanbrown commented on GitHub (Feb 7, 2021): For future potential reference, Socialite does seem to take/pass guzzle parameters via a `guzzle` key of the configs for the services: https://github.com/laravel/socialite/blob/5.x/src/SocialiteManager.php#L127 And Guzzle takes a proxy array: https://docs.guzzlephp.org/en/stable/request-options.html#proxy
Author
Owner

@ssddanbrown commented on GitHub (Nov 8, 2022):

I'm going to go ahead and close this off since there's been little demand for proxy support since this request.

@ssddanbrown commented on GitHub (Nov 8, 2022): I'm going to go ahead and close this off since there's been little demand for proxy support since this request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1092