<@U04S8PLJWMT> how does keycloak work in airbyte
# ask-ai
p
@kapa.ai how does keycloak work in airbyte
k
Airbyte uses Keycloak as its identity provider for Single Sign-On (SSO) in Self-Managed Enterprise deployments. In this setup, Keycloak runs as part of the Airbyte stack, and Airbyte stores the SSO-to-organization mapping (Keycloak realm per org) in its config database. Key points from the docs: - Airbyte deploys Keycloak and a setup job via Helm. In Helm chart V1 these components appear as keycloak and keycloak-setup; in chart V2 they’re keycloak and keycloakSetup. You can place these “static” services on a specific node group using nodeSelectors. [[Multiple node groups](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#multiple-node-groups); [Multiple node groups (Next)](https://docs.airbyte.com/platform/next/enterprise-setup/scaling-airbyte#multiple-node-groups)] - The config database includes an sso_config table that links an organization to a Keycloak realm and enforces uniqueness, so each organization is tied to exactly one realm. Columns include id, organization_id, keycloak_realm, created_at, updated_at, with indexes on keycloak_realm and organization_id. [[sso_config](https://docs.airbyte.com/platform/understanding-airbyte/database-data-catalog#sso_config); [sso_config Next](https://docs.airbyte.com/platform/next/understanding-airbyte/database-data-catalog#sso_config)] - When deploying with Helm, you configure Keycloak’s admin credentials and runtime settings in values.yaml (e.g., keycloak.auth.adminUsername/adminPassword, security contexts, node selectors). Example values are shown in a community thread discussing Helm upgrades, which reflects typical chart options. [[GitHub issue 49843](https://github.com/airbytehq/airbyte/issues/49843)] What’s not covered in the provided sources: - The exact end-to-end login flow inside the Airbyte UI with Keycloak (redirect URIs, role mapping, group/role semantics) isn’t detailed in these docs. - How to configure realms, clients, or mappers in Keycloak for Airbyte beyond the basic Helm configuration is not described here. If you’re looking to set up Keycloak with Airbyte Self-Managed Enterprise, the high-level steps are: deploy Airbyte with Keycloak enabled via the Helm chart, configure Keycloak admin settings in values.yaml, and ensure your organization-to-realm mapping exists (sso_config). For production, consider isolating Keycloak and other static services on a dedicated node group. [[Multiple node groups](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#multiple-node-groups); [sso_config](https://docs.airbyte.com/platform/understanding-airbyte/database-data-catalog#sso_config)]
p
@kapa.ai how to access keycloak
k
A message from kapa.ai
In Airbyte Self-Managed Enterprise, you access Keycloak through your deployment’s ingress under the /auth path. After you deploy or upgrade to Enterprise, ensure your ingress routes /auth to the Keycloak service. A minimal NGINX ingress example looks like this:
Copy code
apiVersion: networking.k8s.io/v1 kind: Ingress metadata:   name: enterprise-demo   annotations:     ingress.kubernetes.io/ssl-redirect: "false" spec:   ingressClassName: nginx   rules:     - host: enterprise-demo.airbyte.com       http:         paths:           - path: /             pathType: Prefix             backend:               service:                 name: airbyte-enterprise-airbyte-webapp-svc                 port:                   number: 80           - path: /auth             pathType: Prefix             backend:               service:                 name: airbyte-enterprise-airbyte-keycloak-svc                 port:                   number: 8180
Once this is applied and your DNS points to the ingress, you can visit: - https://your-airbyte-host/ for the Airbyte UI - https://your-airbyte-host/auth for Keycloak (login/admin flows) [[1.6 ingress](https://docs.airbyte.com/platform/1.6/enterprise-setup/implementation-guide#configuring-ingress); [Upgrade step 3](https://docs.airbyte.com/platform/enterprise-setup/upgrading-from-community#step-3-deploy-self-managed-enterprise)]. Notes: - The docs consistently show the /auth path mapped to the service named airbyte-enterprise-airbyte-keycloak-svc on port 8180. Adjust the service name to match your Helm release if it differs. [[1.6 ingress](https://docs.airbyte.com/platform/1.6/enterprise-setup/implementation-guide#configuring-ingress)]. - If you’re using AWS ALB instead of NGINX, use the ALB-specific annotations but still route /auth to the Keycloak service. [[1.6 ingress (ALB)](https://docs.airbyte.com/platform/1.6/enterprise-setup/implementation-guide#configuring-ingress)]. - Make sure global.airbyteUrl in your values.yaml matches the public URL you expose via the ingress. [[Next guide step 2](https://docs.airbyte.com/platform/next/enterprise-setup/implementation-guide#step-2-configure-your-deployment); [Enterprise guide step 2](https://docs.airbyte.com/platform/enterprise-setup/implementation-guide#step-2-configure-your-deployment)]. If you need the Helm upgrade commands and context (e.g., moving from Community to Enterprise), see the deployment step that includes the /auth ingress addition. [[Next upgrade step 3](https://docs.airbyte.com/platform/next/enterprise-setup/upgrading-from-community#step-3-deploy-self-managed-enterprise); [Enterprise upgrade step 3](https://docs.airbyte.com/platform/enterprise-setup/upgrading-from-community#step-3-deploy-self-managed-enterprise)].
p
@kapa.ai how does auth user get created in airbyte
k
A message from kapa.ai
Short answer: An auth user record is created in Airbyte when a person authenticates via the configured identity provider (SSO/OIDC). Airbyte stores the external identity alongside the internal user it maps to. What the docs explicitly say: - The config database has an auth_user table with: - id (PK), user_id (FK to user), auth_user_id (the external IdP subject/identifier), auth_provider (the IdP used), created_at, updated_at. - A unique constraint on (auth_user_id, auth_provider). [[auth_user](https://docs.airbyte.com/platform/understanding-airbyte/database-data-catalog#auth_user)] What’s implied but not fully documented: - During SSO login (Okta, Entra ID/OIDC), Airbyte forwards the user to the IdP and, upon successful login, associates the returned identity with an internal Airbyte user. This is when an auth_user row would be persisted, linking the internal user to the external auth_user_id for that auth_provider. The exact creation trigger/flow is not described step-by-step in the sources. [[Single sign on](https://docs.airbyte.com/platform/access-management/sso); [Single sign on (Next)](https://docs.airbyte.com/platform/next/access-management/sso)] Limitations: - The knowledge sources do not detail the precise moment or code path that inserts auth_user, whether it’s on first successful SSO login, during initial admin bootstrap, or through a provisioning job. They only define the table schema and the general SSO flow. [[auth_user](https://docs.airbyte.com/platform/understanding-airbyte/database-data-catalog#auth_user); [Single sign on](https://docs.airbyte.com/platform/access-management/sso)] If you can share whether you’re on Self-Managed Enterprise and which IdP you use (Okta vs. Entra ID), I can point you to the exact setup pages and fields you need to ensure the SSO login works and the mapping can be created. [[Entra ID setup](https://docs.airbyte.com/platform/access-management/sso-providers/azure-entra-id)]
p
@kapa.ai what does bootlaoder do
k
A message from kapa.ai
The Airbyte Bootloader is the component that prepares your deployment to run by validating and upgrading the platform’s databases and environment. What it does, at a high level: - Runs database migrations: Applies Flyway migrations for the config and jobs databases, creating baselines if needed. This is what you see in boot logs like “Creating baseline…” and schema history checks. [[Forum log](https://discuss.airbyte.io/t/3843); [Understanding Airbyte](https://docs.airbyte.com/platform/understanding-airbyte/high-level-view)] - Checks upgrade compatibility: Verifies the previous vs. target Airbyte version and protocol version ranges to prevent illegal upgrades. [[Forum log](https://discuss.airbyte.io/t/3843)] - Validates database availability: Waits for the DB to be reachable before migrating; errors here surface as “Unable to connect to the database” or migration failures. [[Forum log](https://discuss.airbyte.io/t/3843); [Install issue](https://github.com/airbytehq/airbyte/issues/45456)] - Fails fast on migration issues: If a migration cannot be applied (e.g., Flyway exceptions), the bootloader stops and surfaces the error so you can fix it before the platform starts. [[Migration issue](https://github.com/airbytehq/airbyte/issues/36855)] Where it fits in the architecture: - It’s one of the “non-steady-state” services that runs to upgrade/migrate DB tables and confirm the environment is ready. [[Understanding Airbyte](https://docs.airbyte.com/platform/understanding-airbyte/high-level-view); [1.6 view](https://docs.airbyte.com/platform/1.6/understanding-airbyte/high-level-view); [1.7 view](https://docs.airbyte.com/platform/1.7/understanding-airbyte/high-level-view); [Next view](https://docs.airbyte.com/platform/next/understanding-airbyte/high-level-view)] If you’re seeing boot failures, the logs from the airbyte-bootloader pod are the first place to look—they’ll show DB connectivity checks, version checks, and any Flyway errors that block startup. [[Install issue](https://github.com/airbytehq/airbyte/issues/45456); [Migration issue](https://github.com/airbytehq/airbyte/issues/36855)]