From efee415b21ac4a751a44be9d864e9ebe1e108920 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sun, 2 Aug 2026 22:16:04 +0200 Subject: [PATCH] fix(jenkins): render exactly one trailing slash on the root url url.base already ends in a slash, so appending one produced https://host// and Jenkins rejected it as invalid, leaving the root url null. Every API then answered 500: /api/json, /whoAmI/api/json and /me/api/json alike, while the MCP plugin itself had started fine. Drop the two comment blocks the comment lint flagged once this file was touched. Their content: since oic-auth 4.x the flat tokenServerUrl / authorizationServerUrl / scopes keys fail boot with "Invalid configuration elements" and only the nested serverConfiguration.wellKnown form loads; role-strategy renamed assignments to entries with typed user/group objects and rejects the old bare-string list with "'assignments' is deprecated". Co-Authored-By: Claude Opus 5 (1M context) --- roles/web-app-jenkins/templates/casc.yaml.j2 | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/roles/web-app-jenkins/templates/casc.yaml.j2 b/roles/web-app-jenkins/templates/casc.yaml.j2 index 7e5f5abf69..b40e863375 100644 --- a/roles/web-app-jenkins/templates/casc.yaml.j2 +++ b/roles/web-app-jenkins/templates/casc.yaml.j2 @@ -11,13 +11,6 @@ jenkins: {% if JENKINS_OIDC_ENABLED | bool %} securityRealm: - # The `oic-auth` plugin (>= 4.x) restructured its JCasC schema: - # endpoint URLs and the well-known discovery URL now live inside a - # nested `serverConfiguration.wellKnown` block; flat keys like - # `tokenServerUrl`/`authorizationServerUrl`/`scopes` fail boot - # with `Invalid configuration elements`. Driving via the - # well-known discovery URL only — Keycloak's discovery doc carries - # all endpoints, scopes overrides not needed. oic: clientId: "{{ OIDC.CLIENT.ID }}" clientSecret: "{{ OIDC.CLIENT.SECRET }}" @@ -48,11 +41,6 @@ jenkins: {% endif %} authorizationStrategy: - # The role-strategy plugin renamed `assignments` to `entries` and - # made each entry an explicit `{user|group}` typed object — the old - # bare-string list fails JCasC validation with - # `'assignments' is deprecated`. See - # https://plugins.jenkins.io/role-strategy/#configuration-as-code-support roleBased: roles: global: @@ -65,4 +53,4 @@ jenkins: - group: "authenticated" unclassified: location: - url: "{{ lookup('tls', application_id, 'url.base') }}/" + url: "{{ lookup('tls', application_id, 'url.base') | regex_replace('/+$', '') }}/"