r/BookStack • u/Zealousideal_Prior40 • Sep 03 '25
OIDC or SAML2 for SSO?
When using Azure Entra ID for SSO, is there any reason to prefer OIDC over SAML2? (or indeed the other way around!). I don't believe we can use OIDC to pull user avatars from Azure anyway, so that's not going to matter.
2
Upvotes
2
u/ssddanbrown Sep 03 '25
From an implementation perspective, I'd prefer OIDC as it's a much nicer protocol IMO. In terms of BookStack, the end result is functionally relatively similar, with the main difference being in potential logout capability.
Entra can be somewhat awkard, but I think that probably applies to both options. By default (for OIDC i think, maybe SAML2 also) it user per-app-per-user unique IDs for users, which can make things a little tricky to map up if there's existing user accounts in BookStack to map across to Azure accounts. There's also an awkward limit to user groups Azure will provide on a user (can't remember the figure, think in the 100s) which can cause issues for group heavy environments. All kind possible to workaround though, but worth scanning the BookStack issue list for Azure specific issues if you encounter strange behavior.
2
u/MFKDGAF Sep 03 '25
SAML is authentication whereas OIDC is authorization.
In my experience, OIDC is easier to setup than SAML.
2
u/chaosphere_mk Sep 03 '25
Ive forced my org to prefer OIDC over SAML. OIDC is preferred over SAML because it’s built on OAuth 2.0, uses JSON and REST, and issues JWT tokens, which are easier to parse and validate than SAML XML. This makes OIDC better for modern workloads like APIs, SPAs, and mobile apps due to OIDC's more lightweight, stateless tokens (JWT). It also has way stronger library and SDK support across all modern languages, has better security features like PKCE, and integrates better with APIs and things like conditional access. SAML is still fine and secure if properly configured, but OIDC is the more modern option without a doubt.
1
u/rcdevssecurity Sep 04 '25
I would say that I prefer OIDC over SAML for your integration. It aligns better with modern methods and Microsoft ideas, I think that it has a brighter future compared to SAML.