From b498edcdade303e96f60b42aed24f5f98531155b Mon Sep 17 00:00:00 2001 From: chasegawa Date: Thu, 29 Sep 2022 15:05:21 -0700 Subject: [PATCH] SHIBUI-2380 restored file that was removed --- .../resources/metadata-sources-ui-schema.json | 523 ++++++++++++++++++ 1 file changed, 523 insertions(+) create mode 100644 backend/src/main/resources/metadata-sources-ui-schema.json diff --git a/backend/src/main/resources/metadata-sources-ui-schema.json b/backend/src/main/resources/metadata-sources-ui-schema.json new file mode 100644 index 000000000..93ad3ec81 --- /dev/null +++ b/backend/src/main/resources/metadata-sources-ui-schema.json @@ -0,0 +1,523 @@ +{ + "type": "object", + "required": [ + "serviceProviderName", + "entityId" + ], + "properties": { + "serviceProviderName": { + "title": "label.service-provider-name", + "description": "tooltip.service-provider-name", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "entityId": { + "title": "label.entity-id", + "description": "tooltip.entity-id", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "serviceEnabled": { + "title": "label.enable-this-service", + "description": "tooltip.enable-this-service-upon-saving", + "type": "boolean" + }, + "organization": { + "$ref": "#/definitions/Organization" + }, + "contacts": { + "title": "label.contact-information", + "description": "tooltip.contact-information", + "type": "array", + "items": { + "$ref": "#/definitions/Contact" + } + }, + "mdui": { + "$ref": "#/definitions/MDUI" + }, + "securityInfo": { + "type": "object", + "widget": { + "id": "fieldset" + }, + "dependencies": { + "authenticationRequestsSigned": { + "oneOf": [ + { + "properties": { + "authenticationRequestsSigned": { + "enum": [true] + }, + "x509Certificates": { + "minItems": 1 + } + } + }, + { + "properties": { + "authenticationRequestsSigned": { + "enum": [false] + }, + "x509Certificates": { + "minItems": 0 + } + } + } + ] + } + }, + "properties": { + "x509CertificateAvailable": { + "type": "boolean" + }, + "authenticationRequestsSigned": { + "title": "label.authentication-requests-signed", + "description": "tooltip.authentication-requests-signed", + "type": "boolean", + "enumNames": [ + "value.true", + "value.false" + ] + }, + "wantAssertionsSigned": { + "title": "label.want-assertions-signed", + "description": "tooltip.want-assertions-signed", + "type": "boolean", + "enumNames": [ + "value.true", + "value.false" + ] + }, + "x509Certificates": { + "title": "label.x509-certificates", + "description": "tooltip.x509-certificates", + "type": "array", + "items": { + "$ref": "#/definitions/Certificate" + } + } + } + }, + "assertionConsumerServices": { + "title": "label.assertion-consumer-service-endpoints", + "description": "tooltip.assertion-consumer-service-endpoints", + "type": "array", + "items": { + "$ref": "#/definitions/AssertionConsumerService" + } + }, + "serviceProviderSsoDescriptor": { + "type": "object", + "properties": { + "protocolSupportEnum": { + "title": "label.protocol-support-enumeration", + "description": "tooltip.protocol-support-enumeration", + "type": "string", + "widget": { + "id": "select" + }, + "oneOf": [ + { + "enum": [ + "SAML 2" + ], + "description": "SAML 2" + }, + { + "enum": [ + "SAML 1.1" + ], + "description": "SAML 1.1" + } + ] + }, + "nameIdFormats": { + "$ref": "#/definitions/nameIdFormats" + } + } + }, + "logoutEndpoints": { + "title": "label.logout-endpoints", + "description": "tooltip.logout-endpoints", + "type": "array", + "items": { + "$ref": "#/definitions/LogoutEndpoint" + } + }, + "relyingPartyOverrides": { + "type": "object", + "properties": {} + }, + "attributeRelease": { + "type": "array", + "title": "label.attribute-release", + "description": "Attribute release table - select the attributes you want to release (default unchecked)", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "definitions": { + "Contact": { + "type": "object", + "required": [ + "name", + "type", + "emailAddress" + ], + "properties": { + "name": { + "title": "label.contact-name", + "description": "tooltip.contact-name", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "type": { + "title": "label.contact-type", + "description": "tooltip.contact-type", + "type": "string", + "widget": "select", + "minLength": 1, + "oneOf": [ + { + "enum": [ + "support" + ], + "description": "value.support" + }, + { + "enum": [ + "technical" + ], + "description": "value.technical" + }, + { + "enum": [ + "administrative" + ], + "description": "value.administrative" + }, + { + "enum": [ + "other" + ], + "description": "value.other" + } + ] + }, + "emailAddress": { + "title": "label.contact-email-address", + "description": "tooltip.contact-email", + "type": "string", + "pattern": "^(mailto:)?(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$", + "minLength": 1, + "maxLength": 255 + } + } + }, + "Certificate": { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "name": { + "title": "label.certificate-name-display-only", + "description": "tooltip.certificate-name", + "type": "string", + "maxLength": 255 + }, + "type": { + "title": "label.certificate-type", + "type": "string", + "widget": { + "id": "radio", + "class": "form-check-inline" + }, + "oneOf": [ + { + "enum": [ + "signing" + ], + "description": "value.signing" + }, + { + "enum": [ + "encryption" + ], + "description": "value.encryption" + }, + { + "enum": [ + "both" + ], + "description": "value.both" + } + ] + }, + "value": { + "title": "label.certificate", + "description": "tooltip.certificate", + "type": "string", + "widget": "textarea", + "minLength": 1 + } + } + }, + "AssertionConsumerService": { + "type": "object", + "required": [ + "locationUrl", + "binding" + ], + "properties": { + "locationUrl": { + "title": "label.assertion-consumer-service-location", + "description": "tooltip.assertion-consumer-service-location", + "type": "string", + "widget": { + "id": "string", + "help": "message.valid-url" + }, + "minLength": 1, + "maxLength": 255 + }, + "binding": { + "title": "label.assertion-consumer-service-location-binding", + "description": "tooltip.assertion-consumer-service-location-binding", + "type": "string", + "widget": "select", + "oneOf": [ + { + "enum": [ + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" + ], + "description": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" + }, + { + "enum": [ + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign" + ], + "description": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign" + }, + { + "enum": [ + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" + ], + "description": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" + }, + { + "enum": [ + "urn:oasis:names:tc:SAML:2.0:bindings:PAOS" + ], + "description": "urn:oasis:names:tc:SAML:2.0:bindings:PAOS" + }, + { + "enum": [ + "urn:oasis:names:tc:SAML:1.0:profiles:browser-post" + ], + "description": "urn:oasis:names:tc:SAML:1.0:profiles:browser-post" + }, + { + "enum": [ + "urn:oasis:names:tc:SAML:1.0:profiles:artifact-01" + ], + "description": "urn:oasis:names:tc:SAML:1.0:profiles:artifact-01" + } + ] + }, + "makeDefault": { + "title": "label.mark-as-default", + "description": "tooltip.mark-as-default", + "type": "boolean" + } + } + }, + "LogoutEndpoint": { + "description": "tooltip.new-endpoint", + "type": "object", + "fieldsets": [ + { + "fields": [ + "url", + "bindingType" + ] + } + ], + "required": [ + "url", + "bindingType" + ], + "properties": { + "url": { + "title": "label.url", + "description": "tooltip.url", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "bindingType": { + "title": "label.binding-type", + "description": "tooltip.binding-type", + "type": "string", + "widget": "select", + "oneOf": [ + { + "enum": [ + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" + ], + "description": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" + }, + { + "enum": [ + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" + ], + "description": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" + }, + { + "enum": [ + "urn:oasis:names:tc:SAML:2.0:bindings:SOAP" + ], + "description": "urn:oasis:names:tc:SAML:2.0:bindings:SOAP" + }, + { + "enum": [ + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" + ], + "description": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" + } + ] + } + } + }, + "MDUI": { + "type": "object", + "widget": { + "id": "fieldset" + }, + "fieldsets": [ + { + "type": "group", + "fields": [ + "displayName", + "informationUrl", + "description" + ] + }, + { + "type": "group", + "fields": [ + "privacyStatementUrl", + "logoUrl", + "logoWidth", + "logoHeight" + ] + } + ], + "properties": { + "displayName": { + "title": "label.display-name", + "description": "tooltip.mdui-display-name", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "informationUrl": { + "title": "label.information-url", + "description": "tooltip.mdui-information-url", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "privacyStatementUrl": { + "title": "label.privacy-statement-url", + "description": "tooltip.mdui-privacy-statement-url", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "description": { + "title": "label.description", + "description": "tooltip.mdui-description", + "type": "string", + "widget": { + "id": "textarea" + }, + "minLength": 1, + "maxLength": 255 + }, + "logoUrl": { + "title": "label.logo-url", + "description": "tooltip.mdui-logo-url", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "logoHeight": { + "title": "label.logo-height", + "description": "tooltip.mdui-logo-height", + "minimum": 0, + "type": "integer" + }, + "logoWidth": { + "title": "label.logo-width", + "description": "tooltip.mdui-logo-width", + "minimum": 0, + "type": "integer" + } + } + }, + "Organization": { + "type": "object", + "properties": { + "name": { + "title": "label.organization-name", + "description": "tooltip.organization-name", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "displayName": { + "title": "label.organization-display-name", + "description": "tooltip.organization-display-name", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "url": { + "title": "label.organization-url", + "description": "tooltip.organization-url", + "type": "string", + "minLength": 1, + "maxLength": 255 + } + }, + "dependencies": { + "name": { + "required": [ + "displayName", + "url" + ] + }, + "displayName": { + "required": [ + "name", + "url" + ] + }, + "url": { + "required": [ + "name", + "displayName" + ] + } + } + } + } +} \ No newline at end of file