https://airflow.apache.org/docs/apache-airflow/1.10.3/howto/connection/index.html
https://airflow.apache.org/docs/apache-airflow/1.10.5/_modules/airflow/models/connection.html
Airflow connections can be managed in the GUI.
Airflow connections are stored in the database. They are encrypted.
Doesn't seem to be possible to see when a connection was changed.
It is possible to run some python to obtain the connection details unencrypted.
from airflow.hooks.base_hook import BaseHook
connection = BaseHook.get_connection("conn_name")
# connection = BaseHook.get_connection("username_connection")
conn_password = connection.password
conn_login = connection.login
To actually use a connection
from airflow.models import Connection
def create_conn(username, password, host=None):
new_conn = Connection(conn_id=f'{username}_connection',
login=username,
host=host if host else None)
new_conn.set_password(password)
https://stackoverflow.com/questions/45280650/store-and-access-password-using-apache-airflow https://stackoverflow.com/questions/55626195/export-all-airflow-connections-to-new-environment
From CLI can list connections
https://airflow.apache.org/docs/apache-airflow/1.10.3/cli.html?highlight=connections#connections