import MarkdownAlert from "@/components/markdown/MarkdownAlert.astro";
This module configures Authentik for integration with GitHub SAML single sign-on.
Note: The GitHub Enterprise plan is required for SSO.
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.When a user is removed from Authentik, they will lose access to the organization. However, be aware of the following caveats:
- 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.
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.
- Log in to GitHub and navigate to your enterprise's dashboard. For example, Panfactum's enterprise url is https://github.com/enterprises/Panfactum.
- Click on your profile picture in the top right corner.
- Select
Your enterprises
. - Click on
settings
for your enterprise name. - Go to Authentication security.
- Toggle on
Require SAML authentication
. - Note the
assertion consumer service URL
. We will use this in the following step.
- Add a new
authentik_github_sso
folder adjacent to yourauthentik_core_resources
folder. - Add a new
terragrunt.hcl
file that looks like this. - Set the
acs_url
input using theassertion consumer service URL
from above. - Run
pf-tf-init
. - Run
terragrunt apply
. - Note the output as you'll use it in the following steps.
- Resume the Authentication security page
- Go to Security -> Authentication security.
- Set
Sign on URL
with thesso_post_url
output value from above. - Set
Issuer
with theissuer_url
output value from above. - Set
Public certificate
from thecertificate
output value from above. - Click on
Test SAML configuration
. - Save the
recovery codes
that you are prompted with. - Click on
Save
.