Skip to content

Commit

Permalink
website/integrations: Add documentation for Drupal (#12925)
Browse files Browse the repository at this point in the history
* Add documentation for Drupal

* Alter headings

* address feedback

* address feedback

* address feedback

* Update website/integrations/services/drupal/index.md

Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
Signed-off-by: Sally Young <github@justa.fish>

* Update website/integrations/services/drupal/index.md

Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
Signed-off-by: Sally Young <github@justa.fish>

* Update website/integrations/services/drupal/index.md

Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
Signed-off-by: Sally Young <github@justa.fish>

* Update website/integrations/services/drupal/index.md

Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
Signed-off-by: Sally Young <github@justa.fish>

* Update website/integrations/services/drupal/index.md

Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
Signed-off-by: Sally Young <github@justa.fish>

* Update website/integrations/services/drupal/index.md

Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
Signed-off-by: Sally Young <github@justa.fish>

* Update website/integrations/services/drupal/index.md

Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
Signed-off-by: Sally Young <github@justa.fish>

* address feedback

* address feedback and fix tests

---------

Signed-off-by: Sally Young <github@justa.fish>
Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
  • Loading branch information
justafish and tanberry authored Feb 28, 2025
1 parent 5eb6d62 commit afb3623
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
83 changes: 83 additions & 0 deletions website/integrations/services/drupal/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: Integrate with Drupal
sidebar_label: Drupal
support_level: community
---

## What is Drupal

> Drupal is a free and open-source content management system written in PHP and
> paired with a database.
>
> -- https://en.wikipedia.org/wiki/Drupal
:::note
There are many different modules for Drupal that allow you to set up SSO using
different authentication methods. This tutorial uses the
[OpenID Connect / OAuth client](https://www.drupal.org/project/openid_connect)
module.
:::

## Preparation

The following placeholders are used in this guide:

- `drupal.company` is the FQDN of Drupal installation.
- `authentik.company` is the FQDN of authentik installation.

:::note
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.
:::

## authentik configuration

### Provider

1. Go to Applications -> Providers
https://authentik.company/if/admin/#/core/providers
2. Create an OAuth2/OpenID Provider
3. Set the Authentication flow to default-authentication-flow
4. The Authorisation flow can be either default-provider-authorization-implicit-consent
or default-provider-authorization-explicit-consent
5. Set the Client type to "Confidential"
6. Note the Cliend ID and Client Secret
7. Set the Redirect URIs/Origins to your Drupal site
https://drupal.company/openid-connect/generic
8. Leave everything else as-is

### Application

1. Go to Applications -> Applications
https://authentik.company/if/admin/#/core/applications
2. Create an application e.g. "Drupal" and set the Provider field to the provider
created above

## Drupal configuration

1. From the Admin Toolbar or admin page at https://drupal.company/admin go to
**Configuration -> Web Services -> OpenID Connect** or directly at https://drupal.company/admin/config/services/openid-connect.
2. Input the Client ID and Secret you noted above.
3. Fill out the following endpoints:

- **Authorization endpoint**: <kbd>https://<em>authentik.company</em>/application/o/authorize/</kbd>
- **Token endpoint**: <kbd>https://<em>authentik.company</em>/application/o/token/</kbd>
- **UserInfo endpoint**: <kbd>https://<em>authentik.company</em>/application/o/userinfo/</kbd>

4. If your User Registration settings (**Admin -> Configuration -> People -> Account Settings** or
https://drupal.company/admin/config/people/accounts) does not allow new users, check the "Override registration
settings" checkbox to enable new accounts to be created. If you do not check this and log in as an unknown user, you
will get a message saying you've successfully logged in but your account is blocked and needs to be approved by
an administrator. Individual accounts can be unblocked at **Admin -> People** or https://drupal.company/admin/people.

:::info
If you are developing Drupal locally with DDEV and authentik is also running
locally, use `host.docker.internal:9000` as the hostname for the Token and UserInfo endpoints.
::: 5. Enable the OpenID button on the user login form.

## Configuration verification

To confirm that authentik is properly configured with Drupal, log out from the
Admin Toolbar link under your username, or go directly to
https://drupal.company/user/logout, and log back in via authentik at https://drupal.company/user/login.
1 change: 1 addition & 0 deletions website/sidebarsIntegrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ module.exports = {
label: "Platforms",
items: [
"services/budibase/index",
"services/drupal/index",
"services/wordpress/index",
],
},
Expand Down

0 comments on commit afb3623

Please sign in to comment.