Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation to enable test connection #34905

Merged
merged 11 commits into from
Oct 16, 2023
9 changes: 9 additions & 0 deletions airflow/api_connexion/openapi/v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,15 @@ paths:
description: |
Test a connection.

For security reasons, the test connection functionality is disabled by default across Airflow UI, API and CLI.
For more information on capabilities of users, see the documentation:
https://airflow.apache.org/docs/apache-airflow/stable/security/security_model.html#capabilities-of-authenticated-ui-users.
It is strongly advised to not enable the feature until you make sure that only
highly trusted UI/API users have "edit connection" permissions.

Set the "test_connection" flag to "Enabled" in the "core" section of Airflow configuration (airflow.cfg) to enable testing of collections.
It can also be controlled by the environment variable `AIRFLOW__CORE__TEST_CONNECTION`.

*New in version 2.2.0*
x-openapi-router-controller: airflow.api_connexion.endpoints.connection_endpoint
operationId: test_connection
Expand Down
20 changes: 19 additions & 1 deletion docs/apache-airflow/howto/connection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,26 @@ Passwords cannot be manipulated or read without the key. For information on conf

Testing Connections
^^^^^^^^^^^^^^^^^^^
For security reasons, the test connection functionality is disabled by default across Airflow UI, API and CLI.

Airflow Web UI, REST API, and CLI allow you to test connections. The test connection feature can be used from
For more information on capabilities of users, see the documentation:
https://airflow.apache.org/docs/apache-airflow/stable/security/security_model.html#capabilities-of-authenticated-ui-users.
It is strongly advised to not enable the feature until you make sure that only
highly trusted UI/API users have "edit connection" permissions.

The availability of the
functionality can be controlled by the test_connection flag in
the core section of the Airflow configuration (airflow.cfg).
It can also be controlled by the environment variable
AIRFLOW__CORE__TEST_CONNECTION.
uranusjr marked this conversation as resolved.
Show resolved Hide resolved

The following values are accepted for this config param:

* Disabled: Disables the test connection functionality and disables the Test Connection button in the UI.This is also the default value set in the Airflow configuration.
uranusjr marked this conversation as resolved.
Show resolved Hide resolved
* Enabled: Enables the test connection functionality and activates the Test Connection button in the UI.
* Hidden: Disables the test connection functionality and hides the Test Connection button in UI.

After enabling Test Connection, it can be used from
uranusjr marked this conversation as resolved.
Show resolved Hide resolved
:ref:`create <creating_connection_ui>` or :ref:`edit <editing_connection_ui>` connection page in the UI, through calling
:doc:`Connections REST API </stable-rest-api-ref/>`, or running the ``airflow connections test`` :ref:`CLI command <cli>`.

Expand Down