From 8bacd897c21295186c8d15862d75edcd9979ce40 Mon Sep 17 00:00:00 2001 From: Bill Smith Date: Tue, 23 Oct 2018 11:53:46 -0700 Subject: [PATCH] [SHIBUI-906] Reverted ui's eneity-attributes.schema back to master's. Copied it for use in the backend so we can serve up a dynamic version. --- .../resources/entity-attributes.schema.json | 226 ++++++++++++++++++ .../filter/entity-attributes.schema.json | 94 +++++++- 2 files changed, 318 insertions(+), 2 deletions(-) create mode 100644 backend/src/main/resources/entity-attributes.schema.json diff --git a/backend/src/main/resources/entity-attributes.schema.json b/backend/src/main/resources/entity-attributes.schema.json new file mode 100644 index 000000000..2350a345c --- /dev/null +++ b/backend/src/main/resources/entity-attributes.schema.json @@ -0,0 +1,226 @@ +{ + "title": "EntityAttributes Filter", + "type": "object", + "widget": { + "id": "fieldset" + }, + "properties": { + "name": { + "title": "label.filter-name", + "description": "tooltip.filter-name", + "type": "string", + "widget": { + "id": "string", + "help": "message.must-be-unique" + } + }, + "@type": { + "type": "string", + "widget": { + "id": "hidden" + }, + "default": "EntityAttributes" + }, + "resourceId": { + "type": "string", + "widget": { + "id": "hidden" + } + }, + "version": { + "type": "integer", + "widget": { + "id": "hidden" + } + }, + "filterEnabled": { + "title": "label.enable-filter", + "description": "tooltip.enable-filter", + "type": "boolean", + "default": false + }, + "entityAttributesFilterTarget": { + "title": "label.search-criteria", + "description": "tooltip.search-criteria", + "type": "object", + "widget": { + "id": "filter-target" + }, + "properties": { + "entityAttributesFilterTargetType": { + "title": "", + "type": "string", + "default": "ENTITY", + "oneOf": [ + { + "enum": [ + "ENTITY" + ], + "description": "value.entity-id" + }, + { + "enum": [ + "REGEX" + ], + "description": "value.regex" + }, + { + "enum": [ + "CONDITION_SCRIPT" + ], + "description": "value.script" + } + ] + }, + "value": { + "type": "array", + "buttons": [ + { + "id": "preview", + "label": "action.preview", + "widget": "icon-button" + } + ], + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": ["value", "entityAttributesFilterTargetType"] + }, + "relyingPartyOverrides": { + "type": "object", + "properties": { + "signAssertion": { + "title": "label.sign-the-assertion", + "description": "tooltip.sign-assertion", + "type": "boolean", + "default": false + }, + "dontSignResponse": { + "title": "label.dont-sign-the-response", + "description": "tooltip.dont-sign-response", + "type": "boolean", + "default": false + }, + "turnOffEncryption": { + "title": "label.turn-off-encryption-of-response", + "description": "tooltip.turn-off-encryption", + "type": "boolean", + "default": false + }, + "useSha": { + "title": "label.use-sha1-signing-algorithm", + "description": "tooltip.usa-sha-algorithm", + "type": "boolean", + "default": false + }, + "ignoreAuthenticationMethod": { + "title": "label.ignore-any-sp-requested-authentication-method", + "description": "tooltip.ignore-auth-method", + "type": "boolean", + "default": false + }, + "forceAuthn": { + "title": "label.force-authn", + "description": "tooltip.force-authn", + "type": "boolean", + "default": false + }, + "omitNotBefore": { + "title": "label.omit-not-before-condition", + "type": "boolean", + "description": "tooltip.omit-not-before-condition", + "default": false + }, + "responderId": { + "title": "label.responder-id", + "description": "tooltip.responder-id", + "type": "string" + }, + "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" + ] + } + }, + "default": null + }, + "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" + ] + } + }, + "default": null + } + } + }, + "attributeRelease": { + "type": "array", + "description": "Attribute release table - select the attributes you want to release (default unchecked)", + "widget": { + "id": "checklist", + "dataUrl": "/customAttributes" + }, + "items": { + "type": "string" + } + } + }, + "required": [ + "name" + ], + "fieldsets": [ + { + "type": "group-lg", + "fields": [ + "name", + "@type", + "resourceId", + "version", + "entityAttributesFilterTarget" + ] + }, + { + "type": "group", + "fields": [ + "filterEnabled", + "relyingPartyOverrides" + ] + }, + { + "type": "group", + "fields": [ + "attributeRelease" + ] + } + ] +} \ No newline at end of file diff --git a/ui/src/assets/schema/filter/entity-attributes.schema.json b/ui/src/assets/schema/filter/entity-attributes.schema.json index 00060d62c..2350a345c 100644 --- a/ui/src/assets/schema/filter/entity-attributes.schema.json +++ b/ui/src/assets/schema/filter/entity-attributes.schema.json @@ -91,7 +91,97 @@ "required": ["value", "entityAttributesFilterTargetType"] }, "relyingPartyOverrides": { - "type": "object" + "type": "object", + "properties": { + "signAssertion": { + "title": "label.sign-the-assertion", + "description": "tooltip.sign-assertion", + "type": "boolean", + "default": false + }, + "dontSignResponse": { + "title": "label.dont-sign-the-response", + "description": "tooltip.dont-sign-response", + "type": "boolean", + "default": false + }, + "turnOffEncryption": { + "title": "label.turn-off-encryption-of-response", + "description": "tooltip.turn-off-encryption", + "type": "boolean", + "default": false + }, + "useSha": { + "title": "label.use-sha1-signing-algorithm", + "description": "tooltip.usa-sha-algorithm", + "type": "boolean", + "default": false + }, + "ignoreAuthenticationMethod": { + "title": "label.ignore-any-sp-requested-authentication-method", + "description": "tooltip.ignore-auth-method", + "type": "boolean", + "default": false + }, + "forceAuthn": { + "title": "label.force-authn", + "description": "tooltip.force-authn", + "type": "boolean", + "default": false + }, + "omitNotBefore": { + "title": "label.omit-not-before-condition", + "type": "boolean", + "description": "tooltip.omit-not-before-condition", + "default": false + }, + "responderId": { + "title": "label.responder-id", + "description": "tooltip.responder-id", + "type": "string" + }, + "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" + ] + } + }, + "default": null + }, + "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" + ] + } + }, + "default": null + } + } }, "attributeRelease": { "type": "array", @@ -133,4 +223,4 @@ ] } ] -} +} \ No newline at end of file