Astronomer Software supports Kerberos authentication for Airflow deployment databases, allowing you to connect to Kerberized PostgreSQL databases. This feature is available starting in Astronomer Software 0.37.7.
Kerberos is an authentication protocol that uses tickets to allow secure authentication in network environments. In enterprise environments with strict security requirements, databases are often configured to use Kerberos authentication instead of traditional username and password authentication.
With Kerberos database support in Astronomer Software, you can:
Astronomer Software uses PgBouncer as a proxy between Airflow components and the Kerberized database. When you enable Kerberos for a deployment:
The following diagram shows the architecture for Kerberos database authentication in Astronomer Software 0.37.7:

Before configuring Kerberos authentication, ensure you have:
Kerberos authentication requires the Kerberos-enabled PgBouncer image quay.io/astronomer/ap-pgbouncer-krb:1.25.0-2. The generic quay.io/astronomer/ap-pgbouncer image does not support Kerberos (GSSAPI) authentication and must not be used. You configure this image in values.yaml as part of Step 1.
If you are running an airgapped installation, you must mirror quay.io/astronomer/ap-pgbouncer-krb:1.25.0-2 to your private registry in addition to the standard 0.37.7 image list — this image is not included in the automated image list. See Configure the Docker registry used for platform images for mirroring instructions.
Kerberos database authentication in Astronomer Software follows a shared responsibility model:
The following are supported in Astronomer Software 0.37.7 with Kerberos Authentication:
Future releases may expand support to other executors, deployment types, and databases.
You are responsible for implementing a mechanism to inject Kerberos credentials into PgBouncer Pods. One common approach is using a Kubernetes mutation webhook.
A mutation webhook can automatically inject Kerberos credentials when PgBouncer Pods are created. The webhook typically:
krb5.conf) and keytabs as volumesWhen creating a deployment, you’ll specify labels in the pgbouncerConfig section that trigger your webhook to inject the necessary credentials.
Other methods for credential injection include:
Choose the approach that best fits your organization’s security requirements and infrastructure.
For implementation guidance, contact Astronomer support or your Astronomer representative.
Before creating Kerberos-enabled deployments, you must enable manual connection strings in your Astronomer configuration.
Open your values.yaml file.
Add the following configuration:
You must create a Kerberos user in your PostgreSQL database with the appropriate permissions.
Connect to your PostgreSQL database using a superuser account.
Create the Kerberos user. The username must be in the format <username>@<REALM>:
Replace astro_user with your Kerberos username and APC.ASTRONOMER.IO with your Kerberos realm.
If you need to use a Kerberized database for the control plane (Houston’s database), you must configure PgBouncer in the astronomer namespace.
pgbouncer.ini file with the following contents. Replace the placeholders with your actual values:users.txt file:users.txt file with the password hashes:The password authentication in users.txt is used for Houston to connect to PgBouncer. PgBouncer then authenticates to the PostgreSQL database using Kerberos (GSSAPI).
Open your values.yaml file.
Add the following PgBouncer configuration:
The username and password are the user and password from the users.txt file above.
The query parameters pgbouncer=true&connection_limit=100&pool_timeout=60&prisma_connection_limit=100 are critical for Prisma to work correctly with PgBouncer. Without these parameters, the control plane may experience connection issues.
Upgrade the Astronomer installation. You must perform the upgrade in two steps:
Step 1: First, upgrade with the --no-hooks flag. This installs PgBouncer in the control plane without running database migration jobs:
The <version> is the Astronomer Software version you want to upgrade to (e.g., 0.37.7).
Step 2: After the upgrade completes and PgBouncer is running, run the upgrade again without the --no-hooks flag. This runs the Airflow database migration jobs:
The <version> is the Astronomer Software version you want to upgrade to (e.g., 0.37.7).
The two-step upgrade process is necessary because:
Before creating a Kerberos-enabled deployment, you must manually create the Airflow database.
Follow these steps to create the database:
For example:
Kerberos-enabled deployments must be created using the Houston API. They cannot be created from the Astronomer UI.
kerberosEnabled: Must be set to true. This enables Houston to perform Kerberos-specific validation.metadataConnectionJson and resultBackendConnectionJson:
user: Must be in the format <username>@<REALM>pass: Can be any value (e.g., "no-pass") since PgBouncer uses Kerberos for database authenticationhost: The hostname of your Kerberized PostgreSQL databasedb: The database name you created (e.g., mydeployment_airflow)pgbouncerConfig:
labels: Custom labels for the PgBouncer Pod. Use these labels to trigger your Kerberos credential injection mechanism (e.g., "krb-inject": "enabled" or "component": "pgbouncer").env: Environment variables for the PgBouncer Pod. Your credential injection mechanism can use these to configure Kerberos authentication (e.g., KERBEROS_USER, KERBEROS_PASSWORD).extraIniMetadata and extraIniResultBackend: Must specify the Kerberos user.extraIni: Must include Kerberos/GSS settings:
server_gssauth_negotiate = allowserver_krb_spn = postgres/<airflow-db-host>@<kerberos_realm>sslmode: Set to prefer for RDS or other TLS-enabled databasesAfter creating your deployment, verify that Kerberos authentication is working correctly.
Look for log entries showing connections using the Kerberos principal.
Verify that the Airflow UI loads successfully:
a. Log in to the Astronomer UI.
b. Navigate to your deployment.
c. Click Airflow UI.
If the Airflow UI loads without errors, PgBouncer is successfully connecting to the database using Kerberos authentication.
If the PgBouncer Pod fails to start, check the following:
Verify that your Kerberos credential injection mechanism is configured correctly.
Check the Pod events for error messages:
Verify that the labels in pgbouncerConfig match what your credential injection mechanism expects.
If authentication fails, verify:
server_krb_spn in the PgBouncer configuration matches your database hostname and realm.If the Airflow UI fails to load:
metadataConnectionJson and resultBackendConnectionJson are correctly configured.