From 8e2bc0be035c810b9e73137872cc0c87eaf4e161 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Mon, 23 Sep 2024 10:29:05 +0200 Subject: [PATCH] fix(HMS-3152): remove pattern matching from location name Location name should be a DNS label and could be matched by a regex. Correct one could be "^[a-zA-Z0-9]([a-zA-Z0-9\\-]*[a-zA-Z0-9])*$". PR https://github.com/podengo-project/idmsvc-api/pull/21 has a discussion about it. But users can defined more values in IPA location in the FreeIPA server than what the RFCs allow. From this PoV, it is more important for idmsvc to pass registration even with slightly invalid DNS label than being valid but failing. Idmsvc doesn't use the value for DNS operations. Signed-off-by: Petr Vobornik --- public.openapi.json | 1 - public.openapi.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/public.openapi.json b/public.openapi.json index f603eb0..2dcba0f 100644 --- a/public.openapi.json +++ b/public.openapi.json @@ -1427,7 +1427,6 @@ "type": "string", "maxLength": 63, "minLength": 1, - "pattern": "^[a-z][a-z0-9\\-]*$", "x-rh-ipa-hcc": { "type": "defs" }, diff --git a/public.openapi.yaml b/public.openapi.yaml index ee0379e..1364429 100644 --- a/public.openapi.yaml +++ b/public.openapi.yaml @@ -1010,12 +1010,12 @@ components: type: defs x-rh-rdn-value: name LocationName: + # validation pattern was removed to not be more restrictive than IPA server title: Location identifier (IPA location, AD site) description: A location identifier (lower-case DNS label) type: string maxLength: 63 minLength: 1 - pattern: ^[a-z][a-z0-9\-]*$ x-rh-ipa-hcc: type: defs example: alpha