You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/05/04 16:50:14 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #15599: Mask passwords and sensitive info in task logs and UI

kaxil commented on a change in pull request #15599:
URL: https://github.com/apache/airflow/pull/15599#discussion_r625943685



##########
File path: docs/apache-airflow/security/secrets/index.rst
##########
@@ -30,6 +30,69 @@ The following are particularly protected:
 .. toctree::
     :maxdepth: 1
     :glob:
+    :caption: Further reading:
 
-    fernet
-    secrets-backend/index
+    Encryption at rest <fernet>
+    Using external Secret stores <secrets-backend/index>
+
+.. _security:mask-sensitive-values:
+
+Masking sensitive data
+----------------------
+
+Airflow will by default mask Connection passwords and sensitive Variables and keys from a Connection's
+extra (JSON) field when they appear in Task logs, in the Variable and in the Rendered fields views of the UI.
+
+It does this by looking for the specific *value* appearing anywhere in your output. This means that if you
+have a connection with a password of ``a``, then every instance of the letter a in your logs will be replaced
+with ``***``.
+
+To disable masking you can setting :ref:`config:core__hide_sensitive_var_conn_fields` to false.
+
+The automatic masking is triggered by Connection or Variable access. This means that if you pass a sensitive
+value via XCom or any other side-channel it will not be masked when printed in the downstream task.
+
+Sensitive field names
+"""""""""""""""""""""
+
+When masking is enabled, Airflow will always mask the password field of every Connection that is accessed by a
+task.
+
+It will also mask the value of a Variable, or the field of a Connection's extra JSON blob if the name contains
+any words in ('password', 'secret', 'passwd', 'authorization', 'api_key', 'apikey', 'access_token'). This list

Review comment:
       Can wr do a "include"/"exampleinclude" of it from the code so that we don't have to maintain this list at two places if in future we add another word here.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org