Index
This source lets users authenticate with their Mailcow credentials by configuring Mailcow as a federated identity provider with OAuth 2.0.
Preparation¶
The following placeholders are used in this guide:
authentik.companyis the FQDN of the authentik installation.mailcow.companyis the FQDN of the Mailcow installation.
Mailcow configuration¶
To integrate Mailcow with authentik, create an OAuth application in Mailcow.
- Log in to Mailcow as an administrator.
- Navigate to System > Configuration, and then Access > OAuth2 Apps.
- Click Add OAuth2 client and provide the Redirect URI:
https://authentik.company/source/oauth/callback/mailcow/ - Take note of the Client ID and Client Secret. These values will be required in the next section.
authentik configuration¶
- Log in to authentik as an administrator and open the authentik Admin interface.
- Navigate to Directory > Federation and Social login, click New Source, and then configure the following settings:
- Select type: select OAuth Source as the source type.
- Create OAuth Source: provide a name, a slug that must match the slug used in the Mailcow
Redirect URIfield (e.g.mailcow), and set the following required configurations:- Protocol settings
- Consumer key:
<client_ID> - Consumer secret:
<client_secret> - Scopes (optional): define any further access scopes.
- Consumer key:
- URL settings
- Authorization URL:
https://mailcow.company/oauth/authorize - Access token URL:
https://mailcow.company/oauth/token - Profile URL:
https://mailcow.company/oauth/profile
- Authorization URL:
- Protocol settings
- Click Finish to save your settings.
:::info Display new source on login screen For instructions on how to display the new source on the authentik login page, refer to the Add sources to default login page documentation. :::
:::info Embed new source in flow :ak-enterprise For instructions on embedding the new source within a flow, such as an authorization flow, refer to the Source Stage documentation. :::
Source property mappings¶
Source property mappings allow you to modify or gather extra information from sources. See the overview for more information.