-
-
Notifications
You must be signed in to change notification settings - Fork 126
Closed as not planned
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Set up an Docker Enviroment for Bookstack and want to try to enable Azure Authentification.
Set up the AppRegistration in Entra and the added following Lines to docker-compose.yml:
- AUTH_METHOD=azure
- AZURE_APP_ID=XXXXXXXXXX
- AZURE_APP_SECRET=XXXXXXXXXX
- AZURE_TENANT=XXXXXXXXXX
- AZURE_AUTO_REGISTER=true
- AZURE_AUTO_CONFIRM_EMAIL=true
and got following Error:
Error
InvalidArgumentException
Auth guard [azure] is not defined.
And this Stack trace:
#0 /app/www/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php(70): Illuminate\Auth\AuthManager->resolve()
#1 /app/www/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php(340): Illuminate\Auth\AuthManager->guard()
#2 /app/www/app/Http/Middleware/CheckEmailConfirmed.php(40): Illuminate\Auth\AuthManager->__call()
#3 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): BookStack\Http\Middleware\CheckEmailConfirmed->handle()
#4 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(88): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():184}:185}()
#5 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#6 /app/www/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():184}:185}()
#7 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#8 /app/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():184}:185}()
#9 /app/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#10 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\Session\Middleware\StartSession->handle()
#11 /app/www/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():184}:185}()
#12 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#13 /app/www/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(75): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():184}:185}()
#14 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#15 /app/www/app/Http/Middleware/ApplyCspRules.php(33): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():184}:185}()
#16 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): BookStack\Http\Middleware\ApplyCspRules->handle()
#17 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():184}:185}()
#18 /app/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\Pipeline\Pipeline->then()
#19 /app/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php(786): Illuminate\Routing\Router->runRouteWithinStack()
#20 /app/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php(750): Illuminate\Routing\Router->runRoute()
#21 /app/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php(739): Illuminate\Routing\Router->dispatchToRoute()
#22 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(201): Illuminate\Routing\Router->dispatch()
#23 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(170): Illuminate\Foundation\Http\Kernel->{closure:Illuminate\Foundation\Http\Kernel::dispatchToRouter():198}()
#24 /app/www/app/Http/Middleware/PreventResponseCaching.php(28): Illuminate\Pipeline\Pipeline->{closure:Illuminate\Pipeline\Pipeline::prepareDestination():168}()
#25 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): BookStack\Http\Middleware\PreventResponseCaching->handle()
#26 /app/www/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(58): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():184}:185}()
#27 /app/www/app/Http/Middleware/TrustProxies.php(41): Illuminate\Http\Middleware\TrustProxies->handle()
#28 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): BookStack\Http\Middleware\TrustProxies->handle()
#29 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():184}:185}()
#30 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#31 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\Foundation\Http\Middleware\TrimStrings->handle()
#32 /app/www/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():184}:185}()
#33 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\Http\Middleware\ValidatePostSize->handle()
#34 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():184}:185}()
#35 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#36 /app/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():184}:185}()
#37 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\Pipeline\Pipeline->then()
#38 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#39 /app/www/public/index.php(23): Illuminate\Foundation\Http\Kernel->handle()
#40 {main}
Is it generally Possible? What am i doing wrong?
Expected Behavior
No response
Steps To Reproduce
- Set up App-Registraion in EntraID
- Add the lines to docker-compose.yml
Environment
- OS: Windows 11
- How docker service was installed:
Docker Enviroment with mariaDB
CPU architecture
x86-64
Docker creation
---
# This is an example complete example docker-compose.yml
# file for a linuxserver.io based BookStack setup
# using the linuxserver.io MariaDB container.
# ENSURE YOU PAY ATTENTION TO ALL COMMENTS BELOW.
# Many of the values are just examples, and you WILL
# have to make changes to suit your environment.
# These containers are maintained by the linuxserver.io
# team, not the official BookStack project.
# For non-commented options, refer to the linuxserver documentation:
# https://docs.linuxserver.io/images/docker-bookstack/#environment-variables-e
services:
# The container for BookStack itself
bookstack:
# You should update the version here to match the latest
# release of BookStack: https://github.com/BookStackApp/BookStack/releases
# You'll change this when wanting to update the version of BookStack used.
image: lscr.io/linuxserver/bookstack:latest
container_name: bookstack
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
# APP_URL must be set as the base URL you'd expect to access BookStack
# on via the browser. The default shown here is what you might use if accessing
# direct from the browser on the docker host, hence the use of the port as configured below.
- APP_URL=http://localhost:6875
# APP_KEY must be a unique key. Generate your own by running
# docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey
# You should keep the "base64:" part for the option value.
- APP_KEY=base64:XXXXXX
# The below database details are purposefully aligned with those
# configured for the "mariadb" service below:
- DB_HOST=mariadb
- DB_PORT=3306
- DB_DATABASE=bookstack
- DB_USERNAME=bookstack
- DB_PASSWORD=XXXXX
# The below options are for the BookStack authentication method.
# The default is to use the built-in BookStack authentication,
- AUTH_METHOD=azure
- AZURE_APP_ID=XXXXXXX
- AZURE_APP_SECRET=XXXXX
- AZURE_TENANT=XXXXX
- AZURE_AUTO_REGISTER=true
- AZURE_AUTO_CONFIRM_EMAIL=true
- APP_DEBUG=true
volumes:
# This maps the BookStack config and app data
- ./bookstack_app_data:/config
# This adds a custom CSS file for design overrides
- ./custom.css:/config/www/public/custom/custom.css
ports:
# This exposes port 6875 for general web access.
# Commonly you'd have a reverse proxy in front of this,
# redirecting incoming requests to this port.
- 6875:80
restart: unless-stopped
# The container for the database which BookStack will use to store
# most of its core data/content.
mariadb:
# You should update the version here to match the latest
# main version of the linuxserver mariadb container version:
# https://github.com/linuxserver/docker-mariadb/pkgs/container/mariadb/versions?filters%5Bversion_type%5D=tagged
image: lscr.io/linuxserver/mariadb:11.4.4
container_name: mariadb
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
# You may want to change the credentials used below,
# but be aware the latter three options need to align
# with the DB_* options for the BookStack container.
- MYSQL_ROOT_PASSWORD=rootpass
- MYSQL_DATABASE=bookstack
- MYSQL_USER=bookstack
- MYSQL_PASSWORD=XXX
volumes:
# You generally only ever need to map this one volume.
# This maps it to a "bookstack_db_data" folder in the same
# directory as this compose config file.
- ./bookstack_db_data:/config
# These ports are commented out as you don't really need this port
# exposed for normal use, mainly only if connecting direct to the
# database externally. Otherwise, this risks exposing access to the
# database when not needed.
# ports:
# - 3306:3306
restart: unless-stopped
Container logs
bookstack | 2025-07-29 12:01:09.737 | [migrations] started
bookstack | 2025-07-29 12:01:09.743 | [migrations] 01-nginx-site-confs-default: skipped
bookstack | 2025-07-29 12:01:09.747 | [migrations] 02-default-location: skipped
bookstack | 2025-07-29 12:01:09.747 | [migrations] done
bookstack | 2025-07-29 12:01:09.800 | ───────────────────────────────────────
bookstack | 2025-07-29 12:01:09.800 |
bookstack | 2025-07-29 12:01:09.800 | ██╗ ███████╗██╗ ██████╗
bookstack | 2025-07-29 12:01:09.800 | ██║ ██╔════╝██║██╔═══██╗
bookstack | 2025-07-29 12:01:09.800 | ██║ ███████╗██║██║ ██║
bookstack | 2025-07-29 12:01:09.800 | ██║ ╚════██║██║██║ ██║
bookstack | 2025-07-29 12:01:09.800 | ███████╗███████║██║╚██████╔╝
bookstack | 2025-07-29 12:01:09.800 | ╚══════╝╚══════╝╚═╝ ╚═════╝
bookstack | 2025-07-29 12:01:09.800 |
bookstack | 2025-07-29 12:01:09.800 | Brought to you by linuxserver.io
bookstack | 2025-07-29 12:01:09.800 | ───────────────────────────────────────
bookstack | 2025-07-29 12:01:09.800 |
bookstack | 2025-07-29 12:01:09.800 | To support LSIO projects visit:
bookstack | 2025-07-29 12:01:09.800 | https://www.linuxserver.io/donate/
bookstack | 2025-07-29 12:01:09.800 |
bookstack | 2025-07-29 12:01:09.800 | ───────────────────────────────────────
bookstack | 2025-07-29 12:01:09.800 | GID/UID
bookstack | 2025-07-29 12:01:09.800 | ───────────────────────────────────────
bookstack | 2025-07-29 12:01:09.803 |
bookstack | 2025-07-29 12:01:09.804 | User UID: 1000
bookstack | 2025-07-29 12:01:09.804 | User GID: 1000
bookstack | 2025-07-29 12:01:09.804 | ───────────────────────────────────────
bookstack | 2025-07-29 12:01:09.805 | Linuxserver.io version: v25.05.2-ls213
bookstack | 2025-07-29 12:01:09.805 | Build-date: 2025-07-28T18:39:51+00:00
bookstack | 2025-07-29 12:01:09.805 | ───────────────────────────────────────
bookstack | 2025-07-29 12:01:09.805 |
bookstack | 2025-07-29 12:01:09.904 | using keys found in /config/keys
bookstack | 2025-07-29 12:01:10.023 | **** The following active confs have different version dates than the samples that are shipped. ****
bookstack | 2025-07-29 12:01:10.023 | **** This may be due to user customization or an update to the samples. ****
bookstack | 2025-07-29 12:01:10.023 | **** You should compare the following files to the samples in the same folder and update them. ****
bookstack | 2025-07-29 12:01:10.023 | **** Use the link at the top of the file to view the changelog. ****
bookstack | 2025-07-29 12:01:10.023 | ┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
bookstack | 2025-07-29 12:01:10.023 | │ old date │ new date │ path │
bookstack | 2025-07-29 12:01:10.023 | ├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
bookstack | 2025-07-29 12:01:10.023 | │ 2025-05-31 │ 2025-07-18 │ /config/nginx/ssl.conf │
bookstack | 2025-07-29 12:01:10.023 | └────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
bookstack | 2025-07-29 12:01:10.063 | Waiting for DB to be available
bookstack | 2025-07-29 12:01:17.265 |
bookstack | 2025-07-29 12:01:17.265 | INFO Nothing to migrate.
bookstack | 2025-07-29 12:01:17.265 |
bookstack | 2025-07-29 12:01:17.358 | [custom-init] No custom files found, skipping...
bookstack | 2025-07-29 12:01:17.373 | [ls.io-init] done.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done