authentik_github_sso
Stable
Direct

Authentik GitHub SSO

This module configures Authentik for integration with GitHub SAML single sign-on.

Note: The GitHub Enterprise plan is required for SSO.

Guide

Start the GitHub SAML SSO Setup

  1. Log in to GitHub and navigate to your enterprise’s dashboard. For example, Panfactum’s enterprise url is https://github.com/enterprises/Panfactum.
  2. Click on your profile picture in the top right corner.
  3. Select Your enterprises.
  4. Click on settings for your enterprise name.
  5. Go to Authentication security.
  6. Toggle on Require SAML authentication.
  7. Note the assertion consumer service URL. We will use this in the following step. GitHub ACS URL

Deploy GitHub Provider & Application in Authentik

  1. Add a new authentik_github_sso folder adjacent to your authentik_core_resources folder.
  2. Add a new terragrunt.hcl file that looks like this.
  3. Set the acs_url input using the assertion consumer service URL from above.
  4. Run pf-tf-init.
  5. Run terragrunt apply.
  6. Note the output as you’ll use it in the following steps.

Complete GitHub SAML single sign-on

  1. Resume the Authentication security page
  2. Go to Security -> Authentication security.
  3. Set Sign on URL with the sso_post_url output value from above.
  4. Set Issuer with the issuer_url output value from above.
  5. Set Public certificate from the certificate output value from above. SAML Form
  6. Click on Test SAML configuration.
  7. Save the recovery codes that you are prompted with.
  8. Click on Save.

Test and Validate the Integration

  1. Go to your Authentik instance.
  2. Find the GitHub application. Ensure you are in the user dashboard, not the admin dashboard. GitHub Application
  3. Click and confirm that you are able to login.

Providers

The following providers are needed by this module:

Required Inputs

The following input variables are required:

acs_url

Description: The ACS url provided by GitHub when configuring an external identity provider

Type: string

authentik_domain

Description: The domain name of the Authentik instance

Type: string

organization_name

Description: The name of your organization

Type: string

Optional Inputs

The following input variables are optional (have default values):

authentik_namespace

Description: The kubernetes namespace where Authentik is deployed

Type: string

Default: "authentik"

extra_allowed_groups

Description: Additional groups that can access GitHub

Type: set(string)

Default: []

media_configmap

Description: The ConfigMap holding the static media that Authentik will use

Type: string

Default: "media"

ui_description

Description: The description to display in the Authentik web dashboard

Type: string

Default: "GitHub"

Outputs

The following outputs are exported:

certificate

Description: The certificate used to sign SAML responses

issuer_url

Description: The Authentik issuer URL for the GitHub provider

saml_metadata

Description: The SAML metadata for the GitHub provider. https://en.wikipedia.org/wiki/SAML_metadata

sso_post_url

Description: The URL where SAML authentication requests are sent from the Service Provider (GitHub)

Maintainer Notes

No notes