From 6728211ec862cd7c4865d4c87103abc7e2845a74 Mon Sep 17 00:00:00 2001 From: Patrick Date: Mon, 11 Nov 2024 15:29:40 +0100 Subject: [PATCH] nixos/kanidm: allow origin url ending without slash --- nixos/modules/services/security/kanidm.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/security/kanidm.nix b/nixos/modules/services/security/kanidm.nix index a368b6eee2a6..3f90ad99b770 100644 --- a/nixos/modules/services/security/kanidm.nix +++ b/nixos/modules/services/security/kanidm.nix @@ -502,13 +502,13 @@ in }; originUrl = mkOption { - description = "The origin URL of the service. OAuth2 redirects will only be allowed to sites under this origin. Must end with a slash."; + description = "The redirect URL of the service. These need to exactly match the OAuth2 redirect target"; type = let - originStrType = types.strMatching ".*://.*/$"; + originStrType = types.strMatching ".*://.*$"; in types.either originStrType (types.nonEmptyListOf originStrType); - example = "https://someservice.example.com/"; + example = "https://someservice.example.com/auth/login"; }; originLanding = mkOption {