mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
only use a basic auth password for external logging if username is set
This commit is contained in:
committed by
Christian Adams
parent
bba680671b
commit
269558876e
@@ -58,7 +58,8 @@ def construct_rsyslog_conf_template(settings=settings):
|
||||
password = getattr(settings, 'LOG_AGGREGATOR_PASSWORD', '')
|
||||
if username:
|
||||
params.append(f'uid="{username}"')
|
||||
if password:
|
||||
if username and password:
|
||||
# you can only have a basic auth password if there's a username
|
||||
params.append(f'pwd="{password}"')
|
||||
params = ' '.join(params)
|
||||
parts.extend(['module(load="omhttp")', f'action({params})'])
|
||||
|
||||
Reference in New Issue
Block a user