diff --git a/awx/main/utils/external_logging.py b/awx/main/utils/external_logging.py index ec8b279048..32f90af8d8 100644 --- a/awx/main/utils/external_logging.py +++ b/awx/main/utils/external_logging.py @@ -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})'])