r/BookStack • u/Longjumping-Good1480 • Jul 12 '25
BookStack SAML2 + Azure AD — idp_cert_or_fingerprint_not_found_and_required error despite valid fingerprint
Hello Everyone,
I’m running into a problem integrating BookStack (v25.05.2) with Azure AD using SAML2 authentication.
Context: • BookStack is correctly configured to use SAML2 as the authentication method, with Azure AD as the identity provider. • The SHA-1 fingerprint of the Azure IDP certificate has been extracted and set as an environment variable. • The fingerprint is properly picked up (verified via artisan tinker), and no full certificate is provided — only the fingerprint, as recommended. • The certificate is valid, and the idp_cert_or_fingerprint_not_found_and_required error persists regardless. • I manually added a saml2_settings.php file under /config as a fallback, but calling config('saml2_settings') returns null, which suggests it’s either not being loaded or ignored. • All Laravel cache commands (config:clear, cache:clear, etc.) have been run — no effect. • The error seems to be thrown by the onelogin/php-saml library used by BookStack, indicating that the configuration expected by the toolkit is not being passed or parsed properly.
Hypothesis:
It looks like either BookStack is not injecting the SAML2 fingerprint from the .env into the SAML settings array, or the config is missing a binding step that connects the environment values to what php-saml expects.
Has anyone successfully integrated BookStack with Azure AD recently using just the certificate fingerprint? Is there a special configuration file or override needed to pass settings to the toolkit? Or is this potentially a bug in the recent BookStack release?
Any help or insight would be much appreciated — I’m open to testing patches or workarounds.
Thanks in advance!
1
u/Longjumping-Good1480 Jul 12 '25
Thanks for your reply!
To clarify: • I’ve set the SHA-1 fingerprint via the SAML2_IDP_CERT_FINGERPRINT variable directly in the .env file at the root of the BookStack install (as per Laravel conventions). • I confirmed it’s being correctly loaded using php artisan tinker — env('SAML2_IDP_CERT_FINGERPRINT') returns the correct value.
I’ve based my setup on the official BookStack documentation, a YouTube video, and also tried troubleshooting with OpenAI — no luck so far.
My current hypothesis is that BookStack isn’t correctly mapping the SAML2_IDP_CERT_FINGERPRINT env variable to the configuration array expected by the OneLogin toolkit. Either that, or a binding step is missing during config initialization.
If you’ve successfully integrated BookStack with Azure AD, I’d love to hear what worked for you.
Thanks again for your help!
1
u/ssddanbrown Jul 12 '25
Specifically, what environment variable are you setting here? Where exactly is this being set?
What guidance are you following? Are you following AI? I would not expect those to work.