File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1138,6 +1138,17 @@ def webserver(args):
1138
1138
py2_deprecation_waring ()
1139
1139
print (settings .HEADER )
1140
1140
1141
+ # Check for old/insecure config, and fail safe (i.e. don't launch) if the config is wildly insecure.
1142
+ if conf .get ('webserver' , 'secret_key' ) == 'temporary_key' :
1143
+ print (
1144
+ "ERROR: The `secret_key` setting under the webserver config has an insecure "
1145
+ "value - Airflow has failed safe and refuses to start. Please change this value to a new, "
1146
+ "per-environment, randomly generated string, for example using this command `openssl rand "
1147
+ "-hex 30`" ,
1148
+ file = sys .stderr ,
1149
+ )
1150
+ sys .exit (1 )
1151
+
1141
1152
access_logfile = args .access_logfile or conf .get ('webserver' , 'access_logfile' )
1142
1153
error_logfile = args .error_logfile or conf .get ('webserver' , 'error_logfile' )
1143
1154
num_workers = args .workers or conf .get ('webserver' , 'workers' )
You can’t perform that action at this time.
0 commit comments