Skip to content

Commit

Permalink
Redact conn secrets in webserver logs (apache#16579)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2a59de3)
(cherry picked from commit 9ac87a9)
(cherry picked from commit 836803b)
  • Loading branch information
msumit authored and kaxil committed Jun 23, 2021
1 parent bc82a23 commit 55b836b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions airflow/hooks/base.py
Expand Up @@ -23,6 +23,7 @@
from airflow.models.connection import Connection
from airflow.typing_compat import Protocol
from airflow.utils.log.logging_mixin import LoggingMixin
from airflow.utils.log.secrets_masker import redact

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -70,8 +71,8 @@ def get_connection(cls, conn_id: str) -> Connection:
conn.port,
conn.schema,
conn.login,
conn.password,
conn.extra_dejson,
redact(conn.password),
redact(conn.extra_dejson),
)
return conn

Expand Down

0 comments on commit 55b836b

Please sign in to comment.