From d42b5ef901c0aef7ea8a9c2b175bca5a541e3232 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Fri, 27 Oct 2023 11:18:56 -0400 Subject: [PATCH] remove unused url props to avoid kratos complaining about invalid urls when they're blank --- salt/kratos/map.jinja | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/salt/kratos/map.jinja b/salt/kratos/map.jinja index a2477098d..a603d813a 100644 --- a/salt/kratos/map.jinja +++ b/salt/kratos/map.jinja @@ -23,4 +23,16 @@ {% if KRATOSMERGED.oidc.enabled and 'oidc' in salt['pillar.get']('features') %} {% do KRATOSMERGED.config.selfservice.methods.update({'oidc': {'enabled': true, 'config': {'providers': [KRATOSMERGED.oidc.config]}}}) %} -{% endif %} \ No newline at end of file +{% endif %} + +{% if KRATOSMERGED.oidc.config.auth_url is defined and not KRATOSMERGED.oidc.config.auth_url.strip() | length %} +{% do KRATOSMERGED.oidc.config.pop('auth_url') %} +{% endif %} + +{% if KRATOSMERGED.oidc.config.issuer_url is defined and not KRATOSMERGED.oidc.config.issuer_url.strip() | length %} +{% do KRATOSMERGED.oidc.config.pop('issuer_url') %} +{% endif %} + +{% if KRATOSMERGED.oidc.config.token_url is defined and not KRATOSMERGED.oidc.config.token_url.strip() | length %} +{% do KRATOSMERGED.oidc.config.pop('token_url') %} +{% endif %}