website/integrations/documentation/bookstack/index.mdx
import TabItem from "@theme/TabItem"; import Tabs from "@theme/Tabs";
BookStack is a free and open-source wiki software aimed for a simple, self-hosted, and easy-to-use platform. It uses the ideas of books to organise pages and store information. BookStack is multilingual and available in over thirty languages. For the simplicity, BookStack is considered as suitable for smaller businesses or freelancers.
The following placeholders are used in this guide:
bookstack.company is the FQDN of the BookStack installation.authentik.company is the FQDN of the authentik installation.:::info This documentation lists only the settings that you need to change from their default values. Be aware that any changes other than those explicitly mentioned in this guide could cause issues accessing your application. :::
You can configure Bookstack to use either OIDC or SAML, and this guide explains both options.
<Tabs defaultValue="oidc" values={[ { label: "Log in with OIDC", value: "oidc" }, { label: "Log in with SAML", value: "saml" }, ]}> <TabItem value="oidc">
To support the integration of BookStack with authentik, you need to create an application/provider pair in authentik.
Log in to authentik as an administrator and open the authentik Admin interface.
Navigate to Applications > Applications and click Create with Provider to create an application and provider pair. (Alternatively you can first create a provider separately, then create the application and connect it with the provider.)
Strict redirect URI to https://bookstack.company/oidc/callback.Click Submit to save the new application and provider.
Once that's done, the next step is to update your .env file to include the following variables:
```yaml showLineNumbers
AUTH_METHOD=oidc
AUTH_AUTO_INITIATE=false # Set this to "true" to automatically redirect the user to authentik.
OIDC_NAME=authentik # The display name shown on the login page.
OIDC_DISPLAY_NAME_CLAIMS=name # Claim(s) for the user's display name. Can have multiple attributes listed, separated with a '|' in which case those values will be joined with a space.
OIDC_CLIENT_ID=<Client ID from authentik>
OIDC_CLIENT_SECRET=<Client Secret from authentik>
OIDC_ISSUER=https://authentik.company/application/o/<application_slug>/
OIDC_ISSUER_DISCOVER=true
OIDC_END_SESSION_ENDPOINT=true
```
To support the integration of BookStack with authentik, you need to create an application/provider pair in authentik.
https://bookstack.company/saml2/acs.https://authentik.company.Post.https://bookstack.company/saml2/sls.Redirect.Front-channel (Iframe).https://bookstack.company/saml2/metadata.Provider for bookstack).Once that's done, the next step is to update your .env file to include the following variables:
```yaml showLineNumbers
AUTH_METHOD=saml2
AUTH_AUTO_INITIATE=true # Set this to "true" to automatically redirect the user to authentik.
SAML2_NAME=authentik # The display name shown on the login page.
SAML2_EMAIL_ATTRIBUTE=email
SAML2_EXTERNAL_ID_ATTRIBUTE=uid
SAML2_USER_TO_GROUPS=true
SAML2_GROUP_ATTRIBUTE=http://schemas.xmlsoap.org/claims/Group
SAML2_DISPLAY_NAME_ATTRIBUTES=http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname
SAML2_IDP_ENTITYID=<authentik metadata URL>
SAML2_AUTOLOAD_METADATA=true
```
To confirm that authentik is properly configured with BookStack, visit your BookStack installation, and click Login with authentik.