<@ULVA73B9P> - Using Self hosted prefect - 3.6.7 w...
# ask-marvin
c
@Marvin - Using Self hosted prefect - 3.6.7 with services separation and Redis integration. We are using Kerberos Authentication to connect PostgreSQL, but postgres_listener doesn't support kerberos, due which i am getting error - Failed to establish raw asyncpg connection for LISTEN/NOTIFY: unexpected error while performing authentication: Major(851968): Unspecified GSS failure. Minor Code may provide more information, Minor (2529638919): Server not found in Kerberos database. Any latest Prefect version has the fix to support for Kerberos Authentication for Postgres Listener.
m
thought for 330.9 seconds
Short answer: not yet. In Prefect 3.x (including 3.6.7 and the latest releases), the Postgres listener service does not support Kerberos/GSSAPI auth. The listener creates a raw asyncpg connection and only passes a small, fixed set of parameters (host, port, user, password, database, and some
server_settings
). It does not forward other connection options from the URL/query string, so Kerberos-specific options are not available to the listener. References (source): - Postgres listener implementation: https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/utilities/postgres_listener.py - Database configuration (for comparison): https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/database/configurations.py What this means - Even if your main ORM connection to Postgres is working with Kerberos, the separate LISTEN/NOTIFY connection the listener establishes cannot be configured to use Kerberos today. - The error you’re seeing (GSS failure “Server not found in Kerberos database”) typically requires setting Kerberos-related connection options (e.g., service principal), but the listener does not expose a way to pass those through. Workarounds you can use now - Allow password auth for the single listener connection only (keep Kerberos for your other connections). Postgres can accept multiple auth methods per host/database in pg_hba.conf. - Put a proxy in front of Postgres (e.g., pgbouncer or stunnel) that authenticates to Postgres with Kerberos and presents a password/TLS endpoint to Prefect’s listener. - Maintain a small fork/patch of Prefect to pass through extra asyncpg connect kwargs (e.g., from the DB URL query string or env vars) in
get_pg_notify_connection()
in
postgres_listener.py
. Next steps - If Kerberos for the listener is a hard requirement for you, I recommend opening a feature request so we can track and prioritize it. Here’s the link to start a new issue: https://github.com/PrefectHQ/prefect/issues/new/choose - If you want, I can file the request for you with your environment details and error message. If any of the above workarounds could work in your environment, let me know which direction you’d prefer and I can help with concrete steps.
c
@Marvin - Please file request with requirement required and error message
m
Error: GraphQL errors: [{'type': 'FORBIDDEN', 'path': ['repository'], 'extensions': {'saml_failure': False}, 'locations': [{'line': 3, 'column': 13}], 'message': "The 'PrefectHQ' organization forbids access via a personal access tokens (classic) if the token's lifetime is greater than 180 days. Please adjust your token's lifetime at the following URL: https://github.com/settings/tokens/2034986401"}]
Sorry, I encountered an error while processing your request. Please try again.