This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new ad15af5cab Update documentation to enable test connection (#34905)
ad15af5cab is described below
commit ad15af5cab6fc7aebb10d194fd5ca28a5e185492
Author: vatsrahul1001 <[email protected]>
AuthorDate: Mon Oct 16 21:44:42 2023 +0530
Update documentation to enable test connection (#34905)
---------
Co-authored-by: Pankaj Koti <[email protected]>
Co-authored-by: Tzu-ping Chung <[email protected]>
---
airflow/api_connexion/openapi/v1.yaml | 9 +++++++++
airflow/www/static/js/types/api-generated.ts | 18 ++++++++++++++++++
docs/apache-airflow/howto/connection.rst | 20 +++++++++++++++++++-
3 files changed, 46 insertions(+), 1 deletion(-)
diff --git a/airflow/api_connexion/openapi/v1.yaml
b/airflow/api_connexion/openapi/v1.yaml
index b3194f3881..d36e4a05a0 100644
--- a/airflow/api_connexion/openapi/v1.yaml
+++ b/airflow/api_connexion/openapi/v1.yaml
@@ -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
diff --git a/airflow/www/static/js/types/api-generated.ts
b/airflow/www/static/js/types/api-generated.ts
index 99e8754c56..5c7a8ecb08 100644
--- a/airflow/www/static/js/types/api-generated.ts
+++ b/airflow/www/static/js/types/api-generated.ts
@@ -44,6 +44,15 @@ export interface paths {
/**
* 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*
*/
post: operations["test_connection"];
@@ -2568,6 +2577,15 @@ export interface operations {
/**
* 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*
*/
test_connection: {
diff --git a/docs/apache-airflow/howto/connection.rst
b/docs/apache-airflow/howto/connection.rst
index 0db100fd29..2c07b03b6d 100644
--- a/docs/apache-airflow/howto/connection.rst
+++ b/docs/apache-airflow/howto/connection.rst
@@ -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``.
+
+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.
+* 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 the
: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>`.