Integrate with BuildBuddy
Support level: Community
What is BuildBuddy?
BuildBuddy is a developer productivity platform for the Bazel build system. It provides a results UI for builds and tests, remote build execution, and remote caching, and can be self-hosted or used as a managed cloud service.
Preparation
The following placeholders are used in this guide:
authentik.companyis the FQDN of the authentik installation.buildbuddy.companyis the FQDN of the BuildBuddy installation, when using self-hosted BuildBuddy.
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.
Self-hosted BuildBuddy supports authentication in its Enterprise version only, via OIDC. BuildBuddy Cloud uses SAML instead, and BuildBuddy support completes the activation after you share the authentik metadata URL with them.
Integration configuration
To support the integration of BuildBuddy with authentik, you need to create an application/provider pair in authentik. Select the tab that matches your BuildBuddy deployment.
- Self-hosted (OIDC)
- Cloud (SAML)
authentik configuration
In authentik versions earlier than 2026.5, all Redirect URIs are automatically treated as Authorization type. If you are using one of these older authentik versions, add only the Authorization URL to your Redirect URIs and do not configure a Post Logout URI.
Create an application and provider
-
Log in to authentik as an administrator and open the authentik Admin interface.
-
Navigate to Applications > Applications and click New Application to open the application wizard.
- Application: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings. Note the Slug value because it is required later.
- Choose a Provider type: select OAuth2/OpenID Connect as the provider type.
- Configure the Provider: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and the following required configurations.
- Note the Client ID and Client Secret values because they are required later.
- Add a Redirect URI of type
StrictAuthorizationashttps://buildbuddy.company/auth/. - Select any available signing key.
- Under Advanced protocol settings, add the
authentik default OAuth Mapping: OpenID 'offline_access'scope to Selected Scopes because BuildBuddy requests a refresh token.
- Configure Bindings (optional): you can create a binding (policy, group, or user) to manage the listing and access to applications on a user's Application Dashboard page.
-
Click Submit to save the new application and provider.
BuildBuddy configuration
Add the following to the BuildBuddy configuration file, then restart BuildBuddy:
auth:
jwt_key: "<randomly-generated-secret>"
oauth_providers:
- issuer_url: "https://authentik.company/application/o/<application_slug>/"
client_id: "<Client ID from authentik>"
client_secret: "<Client Secret from authentik>"
Set jwt_key to a securely generated random value, for example the output of openssl rand -hex 32, and use the same value on every BuildBuddy server replica.
Configuration verification
To confirm that authentik is properly configured with BuildBuddy, log out of BuildBuddy, click Login, and log back in via authentik.
authentik configuration
Your BuildBuddy organization slug is required for these steps. Find it on the BuildBuddy Organization Settings page and use it as <org-slug> below.
Create a property mapping
BuildBuddy reads the user's email address from a SAML attribute named email.
-
Log in to authentik as an administrator and open the authentik Admin interface.
-
Navigate to Customization > Property Mappings and click Create.
-
Select SAML Provider Property Mapping as the property mapping type and click Next.
-
Create a property mapping with the following values:
-
Name:
BuildBuddy email -
SAML Attribute Name:
email -
Expression:
return request.user.email
-
-
Click Finish to save the property mapping.
Create an application and provider
authentik 2026.5 introduces changes to how the SAML provider behaves. Specifically, the provider now automatically sets the Issuer value to: https://authentik.company/application/saml/<application_slug>/metadata/
Older versions of authentik set this value to authentik by default. If you're running an older version, please set Issuer to https://authentik.company/application/saml/<application_slug>/metadata/, where <application_slug> is the slug that you selected for the application.
-
Navigate to Applications > Applications and click New Application to open the application wizard.
- Application: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings. Note the Slug value because it is required later.
- Choose a Provider type: select SAML Provider as the provider type.
- Configure the Provider: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and the following required configurations.
- ACS URL:
https://app.buildbuddy.io/auth/saml/acs?slug=<org-slug> - Audience:
https://app.buildbuddy.io/saml/metadata?slug=<org-slug> - Service Provider Binding:
Post - Under Advanced protocol settings:
- Select any available Signing Certificate.
- Add the
BuildBuddy emailproperty mapping that you created in the previous section.
- ACS URL:
- Configure Bindings (optional): you can create a binding (policy, group, or user) to manage the listing and access to applications on a user's Application Dashboard page.
-
Click Submit to save the new application and provider.
BuildBuddy configuration
Share the authentik metadata URL, https://authentik.company/application/saml/<application_slug>/metadata/, with BuildBuddy support and ask them to enable SAML login for your organization slug. BuildBuddy support confirms when the activation is complete.
Configuration verification
To confirm that authentik is properly configured with BuildBuddy, open https://app.buildbuddy.io/login?slug=<org-slug> and log in via authentik.