From 8f1c070632620daa0de449acb0e933c7501c15e7 Mon Sep 17 00:00:00 2001 From: Vansi Vallabhaneni Date: Wed, 13 Jan 2016 14:18:13 -0800 Subject: [PATCH] Encrypt logs --- airflow/bin/cli.py | 3 ++- airflow/configuration.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py index 8c16d7e09a..22ce5d93f2 100755 --- a/airflow/bin/cli.py +++ b/airflow/bin/cli.py @@ -223,7 +223,8 @@ def run(args): new_log = old_s3_log + '\n' + new_log # send log to S3 - s3_key.set_contents_from_string(new_log) + encrypt = configuration.get('core', 'ENCRYPT_S3_LOGS') + s3_key.set_contents_from_string(new_log, encrypt_key=encrypt) except: print('Could not send logs to S3.') diff --git a/airflow/configuration.py b/airflow/configuration.py index 9a29f21965..472b0d6d74 100644 --- a/airflow/configuration.py +++ b/airflow/configuration.py @@ -54,6 +54,7 @@ defaults = { 'security': None, 'donot_pickle': False, 's3_log_folder': '', + 'encrypt_s3_logs': False, 'dag_concurrency': 16, 'max_active_runs_per_dag': 16, },