From 8af65a051468949c002dd69dd84ab8270b124bd5 Mon Sep 17 00:00:00 2001 From: Felipe Reyes Date: Tue, 9 Aug 2022 13:19:54 -0400 Subject: [PATCH] Add debug config option This config option enables debug logging for the configured LocationMatch section in Apache. --- .jujuignore | 3 +++ config.yaml | 5 +++++ templates/apache-openidc-location.conf | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.jujuignore b/.jujuignore index 03e12c9..8401cad 100644 --- a/.jujuignore +++ b/.jujuignore @@ -5,3 +5,6 @@ .coverage __pycache__/ .stestr +*~ +\#* +*.swp diff --git a/config.yaml b/config.yaml index 9c20a94..57cfd0a 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,9 @@ options: + debug: + default: False + type: boolean + description: | + Enable debug logging. remote-id-attribute: default: 'HTTP_OIDC_SUB' type: string diff --git a/templates/apache-openidc-location.conf b/templates/apache-openidc-location.conf index fe8d9b1..6139431 100644 --- a/templates/apache-openidc-location.conf +++ b/templates/apache-openidc-location.conf @@ -39,6 +39,7 @@ OICDRemoteUserClaim {{ options.oidc_remote_user_claim }} AuthType {{ options.auth_type }} Require valid-user +{% if options.debug -%} LogLevel debug +{% endif -%} -