You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- ELLIPSIS_HIDDEN -->
> [!IMPORTANT]
> Introduces `authentik_github_sso` module for Authentik-GitHub SAML SSO
integration, focusing on authentication without user provisioning.
>
> - **New Module**:
> - Adds `authentik_github_sso` module for integrating Authentik with
GitHub SAML SSO.
> - Handles authentication only; does not support user provisioning or
de-provisioning.
> - Requires GitHub Enterprise plan.
> - **Configuration**:
> - Includes `main.tf`, `vars.tf`, `outputs.tf`, and `config.yaml` for
Terraform setup.
> - Uses providers: `authentik`, `kubernetes`, `kubectl`, `random`,
`tls`.
> - **Documentation**:
> - Adds `README.md` and `index.mdx` with setup guide and usage
instructions.
> - Updates `changelog/edge.mdx` and `modules.json` to include the new
module.
> - **Setup Guide**:
> - Provides step-by-step instructions for configuring SAML SSO at the
enterprise level.
> - Details on deploying GitHub provider and application in Authentik.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=Panfactum%2Fstack&utm_source=github&utm_medium=referral)<sup>
for 9ff13b2. It will automatically
update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->
---------
Signed-off-by: James Lee <[email protected]>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
import MarkdownAlert from "@/components/markdown/MarkdownAlert.astro";
2
+
3
+
# Authentik GitHub SSO
4
+
5
+
This module configures Authentik for integration with GitHub SAML single sign-on.
6
+
7
+
***Note:*** The [GitHub Enterprise plan](https://docs.github.com/en/enterprise-cloud@latest/admin/managing-iam/using-saml-for-enterprise-iam/configuring-saml-single-sign-on-for-your-enterprise) is required for SSO.
8
+
9
+
<MarkdownAlertseverity="warning">
10
+
Due to limitations with GitHub, this module only handles authentication and does not support user provisioning or de-provisioning at this time. As a result, users will not be automatically created or removed from GitHub when they are added or removed from Authentik.
11
+
12
+
When a user is removed from Authentik, they will lose access to the organization. However, be aware of the following caveats:
13
+
- Any active session tokens that the user has with the GitHub web UI and PATs the user may have generated will not be automatically revoked. Until these tokens expire, the user may still interact with the web UI / API unless they are manually removed from the GitHub organization.
14
+
</MarkdownAlert>
15
+
16
+
## Guide
17
+
18
+
<MarkdownAlertseverity="warning">
19
+
This guide sets up SAML SSO at the enterprise level, not the organization level. This is important because:
20
+
- An enterprise-level integration provides SSO coverage for all organizations within your GitHub Enterprise
21
+
- This eliminates the need to configure separate SSO integrations for each organization
22
+
- All authentication will be managed through a single integration point
23
+
24
+
While this guide focuses on enterprise-level setup, the same steps can be followed for organization-level SSO by selecting the organization settings instead of enterprise settings in GitHub.
25
+
</MarkdownAlert>
26
+
27
+
### Start the GitHub SAML SSO Setup
28
+
29
+
1. Log in to GitHub and navigate to your enterprise's dashboard. For example, Panfactum's enterprise url is https://github.com/enterprises/Panfactum.
30
+
1. Click on your profile picture in the top right corner.
31
+
2. Select `Your enterprises`.
32
+
3. Click on `settings` for your enterprise name.
33
+
2. Go to Authentication security.
34
+
3. Toggle on `Require SAML authentication`.
35
+
4. Note the `assertion consumer service URL`. We will use this in the following step.
36
+

37
+
38
+
39
+
### Deploy GitHub Provider & Application in Authentik
40
+
41
+
1. Add a new `authentik_github_sso` folder adjacent to your `authentik_core_resources` folder.
42
+
2. Add a new `terragrunt.hcl` file that looks like [this](https://github.com/Panfactum/stack/blob/__PANFACTUM_VERSION_MAIN__/packages/reference/environments/production/us-east-2/authentik_github_sso/terragrunt.hcl).
43
+
3. Set the `acs_url` input using the `assertion consumer service URL` from above.
44
+
4. Run `pf-tf-init`.
45
+
5. Run `terragrunt apply`.
46
+
6. Note the output as you'll use it in the following steps.
47
+
48
+
### Complete GitHub SAML single sign-on
49
+
50
+
1. Resume the Authentication security page
51
+
2. Go to Security -> Authentication security.
52
+
3. Set `Sign on URL` with the `sso_post_url` output value from above.
53
+
4. Set `Issuer` with the `issuer_url` output value from above.
54
+
5. Set `Public certificate` from the `certificate` output value from above.
55
+

56
+
6. Click on `Test SAML configuration`.
57
+
7. Save the `recovery codes` that you are prompted with.
58
+
8. Click on `Save`.
59
+
60
+
### Test and Validate the Integration
61
+
62
+
1. Go to your Authentik instance.
63
+
2. Find the GitHub application. Ensure you are in the user dashboard, not the admin dashboard.
0 commit comments