Skip to content

Warning about invisible connections/variable in the Web UI #10867

Open

Description

@mik-laj

Hello,

Currently, you can define a new connection/variable in several ways.

  • Metabase
  • Environment variable
  • Secret backend

However, only the connections defined with the Metabase are visible from the Web UI. This is surprising among users because a natural way to check connection/variable configuration is to use the Web UI, which may not show complete information.
I would be happy if there was a warning stating that not all connections / variables are visible when the user has a configured secret backend or when the AIRFLOW__CONN_* /AIRFLOW__VAR_* environment variable is defined. This should appear above the list of connections/variables.

This change is intended to improve the user experience.

Best regards,
Kamil Breguła

Activity

  1. JeffryMAC commented on Sep 11, 2020

    @JeffryMAC

    If a connection defined in one of those hidden options.
    What will happen if I will try to define a new connection in the UI with the exact name?

  2. randr97 commented on Sep 11, 2020

    @randr97
    Contributor

    If a connection defined in one of those hidden options.
    What will happen if I will try to define a new connection in the UI with the exact name?

    • It will override the env. (currently)
      But based on suggested changes, we should jus warn the user and nothing more.
      @mik-laj Should we consider having the env conn/vars displayed in UI or jus show a warning?
  3. mik-laj commented on Sep 11, 2020

    @mik-laj
    MemberAuthor

    @randr97 For security reasons, we should only display database entries in the Web UI. The entries that are configured in the database are user-controlled entries and the user can fully manage them.

    @JeffryMAC will be created but never used, because backend entries with higher priority will be used.

    def initialize_secrets_backends() -> List[BaseSecretsBackend]:
    """
    * import secrets backend classes
    * instantiate them and return them in a list
    """
    backend_list = []
    custom_secret_backend = get_custom_secret_backend()
    if custom_secret_backend is not None:
    backend_list.append(custom_secret_backend)
    for class_name in DEFAULT_SECRETS_SEARCH_PATH:
    secrets_backend_cls = import_string(class_name)
    backend_list.append(secrets_backend_cls())
    return backend_list

    DEFAULT_SECRETS_SEARCH_PATH = [
    "airflow.secrets.environment_variables.EnvironmentVariablesBackend",
    "airflow.secrets.metastore.MetastoreBackend",
    ]

    def get_connections_from_secrets(cls, conn_id: str) -> List['Connection']:
    """
    Get all connections as an iterable.
    :param conn_id: connection id
    :return: array of connections
    """
    for secrets_backend in ensure_secrets_loaded():
    conn_list = secrets_backend.get_connections(conn_id=conn_id)
    if conn_list:
    return list(conn_list)
    raise AirflowNotFoundException("The conn_id `{0}` isn't defined".format(conn_id))

  4. kaxil commented on Sep 11, 2020

    @kaxil
    Member

    Yes we should definitely not display Connections and Variable coming from Secrets Backend, I am happy with us showing just the keys for debugging but not values

  5. potiuk commented on Sep 11, 2020

    @potiuk
    Member

    +1. It would be nice to prevent creating one if there is a secret backend one already but it's not really necessary

  6. kaxil commented on Dec 29, 2021

    @kaxil
    Member

    @blag will take care of it for 2.3.0 if no-one does it by then

  7. changed the title [-]Warning about invisible connections/variable in the Web UI.[/-] [+]Warning about invisible connections/variable in the Web UI[/+] on May 21, 2026
  8. rino0601 commented on Aug 20, 2026

    @rino0601
    Contributor

    Still reproducing on Airflow 3.3.0 (the report in #65784 was on 3.2.1), and the surface is wider
    than the UI now — the REST API and the CLI have the same gap.

    GET /api/v2/connections, GET /api/v2/variables, and airflow connections list all run a plain
    select(Connection) / select(Variable), so they return metastore rows only. Neither the response
    nor the OpenAPI schema carries any hint that the list may be incomplete, so generated clients can't
    surface it either.

    Two things make the confusion sharper than it was in 2020:

    Single-item lookups disagree with the lists. airflow connections get resolves through
    the backend chain, but GET /api/v2/connections/{id} returns 404 for that same id. Someone
    comparing the two has no signal that the difference is intentional.
    It keeps getting filed as a bug. #65784 (reported on 3.2.1, April 2026) is the most recent,
    closed with "This is by design" and linking a Stack Overflow question about the same confusion.
    #24679 implemented exactly what this issue asks for — CLI warnings plus a banner on the list views —
    but was closed without being merged, so the gap is still open.

    Would a banner on the Airflow 3 list views, plus a note in the CLI output and in the REST API docs,
    still be welcome here? Happy to pick it up if so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions