diff --git a/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/EntityAttributesFiltersUiDefinitionController.groovy b/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/EntityAttributesFiltersUiDefinitionController.groovy index ffd3ee3ab..556adb962 100644 --- a/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/EntityAttributesFiltersUiDefinitionController.groovy +++ b/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/EntityAttributesFiltersUiDefinitionController.groovy @@ -41,7 +41,7 @@ class EntityAttributesFiltersUiDefinitionController { ResponseEntity getUiDefinitionJsonSchema() { try { def parsedJson = jacksonObjectMapper.readValue(this.jsonSchemaLocation.url, Map) - jsonSchemaBuilderService.addReleaseAttributesToJson(parsedJson['properties']['attributeRelease']['widget']) + jsonSchemaBuilderService.addReleaseAttributesToJson(parsedJson['properties']['attributeRelease']['items']) jsonSchemaBuilderService.addRelyingPartyOverridesToJson(parsedJson['properties']['relyingPartyOverrides']) jsonSchemaBuilderService.addRelyingPartyOverridesCollectionDefinitionsToJson(parsedJson["definitions"]) return ResponseEntity.ok(parsedJson) diff --git a/backend/src/main/resources/entity-attributes-filters-ui-schema.json b/backend/src/main/resources/entity-attributes-filters-ui-schema.json index d5968834e..d34412613 100644 --- a/backend/src/main/resources/entity-attributes-filters-ui-schema.json +++ b/backend/src/main/resources/entity-attributes-filters-ui-schema.json @@ -1,34 +1,20 @@ { - "title": "EntityAttributes Filter", "type": "object", "properties": { "name": { "title": "label.filter-name", "description": "tooltip.filter-name", - "type": "string", - "widget": { - "id": "string", - "help": "message.must-be-unique" - } + "type": "string" }, "@type": { "type": "string", - "widget": { - "id": "hidden" - }, "default": "EntityAttributes" }, "resourceId": { - "type": "string", - "widget": { - "id": "hidden" - } + "type": "string" }, "version": { - "type": "integer", - "widget": { - "id": "hidden" - } + "type": "integer" }, "filterEnabled": { "title": "label.enable-filter", @@ -40,34 +26,20 @@ "title": "label.search-criteria", "description": "tooltip.search-criteria", "type": "object", - "widget": { - "id": "filter-target", - "target": "entityAttributesFilterTargetType" - }, "properties": { "entityAttributesFilterTargetType": { "title": "label.filter-target-type", "type": "string", "default": "ENTITY", - "oneOf": [ - { - "enum": [ - "ENTITY" - ], - "description": "value.entity-id" - }, - { - "enum": [ - "REGEX" - ], - "description": "value.regex" - }, - { - "enum": [ - "CONDITION_SCRIPT" - ], - "description": "value.script" - } + "enum": [ + "ENTITY", + "REGEX", + "CONDITION_SCRIPT" + ], + "enumNames": [ + "value.entity-id", + "value.regex", + "value.script" ] }, "value": { @@ -87,7 +59,10 @@ } } }, - "required": ["value", "entityAttributesFilterTargetType"] + "required": [ + "value", + "entityAttributesFilterTargetType" + ] }, "relyingPartyOverrides": { "type": "object", @@ -134,41 +109,35 @@ }, "nameIdFormats": { "title": "label.nameid-format-to-send", - "placeholder": "label.nameid-format", "description": "tooltip.nameid-format", "type": "array", "uniqueItems": true, "items": { - "title": "label.nameid-format", "type": "string", - "widget": { - "id": "datalist", - "data": [ - "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", - "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", - "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", - "urn:oasis:names:tc:SAML:2.0:nameid-format:transient" - ] - } + "minLength": 1, + "maxLength": 255, + "examples": [ + "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", + "urn:oasis:names:tc:SAML:2.0:nameid-format:transient" + ] } }, "authenticationMethods": { "title": "label.authentication-methods-to-use", "description": "tooltip.authentication-methods-to-use", "type": "array", - "placeholder": "label.authentication-method", "uniqueItems": true, "items": { "type": "string", - "title": "label.authentication-method", - "widget": { - "id": "datalist", - "data": [ - "https://refeds.org/profile/mfa", - "urn:oasis:names:tc:SAML:2.0:ac:classes:TimeSyncToken", - "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport" - ] - } + "minLength": 1, + "maxLength": 255, + "examples": [ + "https://refeds.org/profile/mfa", + "urn:oasis:names:tc:SAML:2.0:ac:classes:TimeSyncToken", + "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport" + ] } } } @@ -177,10 +146,7 @@ "title": "label.attribute-release", "type": "array", "description": "Attribute release table - select the attributes you want to release (default unchecked)", - "widget": { - "id": "checklist", - "dataUrl": "/customAttributes" - }, + "uniqueItems": true, "items": { "type": "string" } @@ -189,31 +155,6 @@ "required": [ "name" ], - "fieldsets": [ - { - "type": "group-lg", - "fields": [ - "name", - "@type", - "resourceId", - "version", - "entityAttributesFilterTarget" - ] - }, - { - "type": "group", - "fields": [ - "filterEnabled", - "relyingPartyOverrides" - ] - }, - { - "type": "group", - "fields": [ - "attributeRelease" - ] - } - ], "definitions": { } } \ No newline at end of file diff --git a/backend/src/main/resources/nameid-filter.schema.json b/backend/src/main/resources/nameid-filter.schema.json index b033a13b9..3ed9ee68d 100644 --- a/backend/src/main/resources/nameid-filter.schema.json +++ b/backend/src/main/resources/nameid-filter.schema.json @@ -1,25 +1,5 @@ { "type": "object", - "fieldsets": [ - { - "type": "group-lg", - "fields": [ - "name", - "nameIdFormatFilterTarget", - "filterEnabled", - "@type", - "resourceId", - "version", - "removeExistingFormats" - ] - }, - { - "type": "group", - "fields": [ - "formats" - ] - } - ], "required": [ "name" ], @@ -27,11 +7,7 @@ "name": { "title": "label.filter-name", "description": "tooltip.filter-name", - "type": "string", - "widget": { - "id": "string", - "help": "message.must-be-unique" - } + "type": "string" }, "filterEnabled": { "title": "label.enable-filter", @@ -43,34 +19,20 @@ "title": "label.search-criteria", "description": "tooltip.search-criteria", "type": "object", - "widget": { - "id": "filter-target", - "target": "nameIdFormatFilterTargetType" - }, "properties": { "nameIdFormatFilterTargetType": { - "title": "label.filter-target-type", + "title": "", "type": "string", "default": "ENTITY", - "oneOf": [ - { - "enum": [ - "ENTITY" - ], - "description": "value.entity-id" - }, - { - "enum": [ - "REGEX" - ], - "description": "value.regex" - }, - { - "enum": [ - "CONDITION_SCRIPT" - ], - "description": "value.script" - } + "enum": [ + "ENTITY", + "REGEX", + "CONDITION_SCRIPT" + ], + "enumNames": [ + "value.entity-id", + "value.regex", + "value.script" ] }, "value": { @@ -97,22 +59,13 @@ }, "@type": { "type": "string", - "widget": { - "id": "hidden" - }, "default": "NameIDFormat" }, "version": { - "type": "integer", - "widget": { - "id": "hidden" - } + "type": "integer" }, "resourceId": { - "type": "string", - "widget": { - "id": "hidden" - } + "type": "string" }, "removeExistingFormats": { "type": "boolean",