diff --git a/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataSourcesUiDefinitionController.groovy b/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataSourcesUiDefinitionController.groovy index 9d54e5ac0..aeedd07e7 100644 --- a/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataSourcesUiDefinitionController.groovy +++ b/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataSourcesUiDefinitionController.groovy @@ -38,15 +38,10 @@ class MetadataSourcesUiDefinitionController { ResponseEntity> getUiDefinitionJsonSchema() { try { def parsedJson = jacksonObjectMapper.readValue(this.jsonSchemaLocation.url, Map) - def widget = parsedJson["properties"]["attributeRelease"]["widget"] - def data = [] - customAttributesConfiguration.getAttributes().each { - def attribute = [:] - attribute["key"] = it["name"] - attribute["label"] = it["displayName"] - data << attribute + parsedJson['properties']['attributeRelease']['widget']['data'] = + customAttributesConfiguration.getAttributes().collect { + [key: it['name'], label: it['displayName']] } - widget["data"] = data return ResponseEntity.ok(parsedJson) } catch (Exception e) { diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/JsonSchemaValidationComponentsConfiguration.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/JsonSchemaValidationComponentsConfiguration.java index 7e983edeb..48fb33ede 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/JsonSchemaValidationComponentsConfiguration.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/JsonSchemaValidationComponentsConfiguration.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import edu.internet2.tier.shibboleth.admin.ui.jsonschema.MetadataSourcesJsonSchemaResourceLocation; +import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.ResourceLoader; @@ -10,10 +11,20 @@ * @author Dmitriy Kopylenko */ @Configuration +@ConfigurationProperties("shibui") public class JsonSchemaValidationComponentsConfiguration { + //Configured via @ConfigurationProperties (using setter method) with 'shibui.metadata-sources-ui-schema-location' property and default + //value set here if that property is not explicitly set in application.properties + private String metadataSourcesUiSchemaLocation ="classpath:metadata-sources-ui-schema.json"; + + //This setter is used by Boot's @ConfiguratonProperties binding machinery + public void setMetadataSourcesUiSchemaLocation(String metadataSourcesUiSchemaLocation) { + this.metadataSourcesUiSchemaLocation = metadataSourcesUiSchemaLocation; + } + @Bean public MetadataSourcesJsonSchemaResourceLocation metadataSourcesJsonSchemaResourceLocation(ResourceLoader resourceLoader, ObjectMapper jacksonMapper) { - return new MetadataSourcesJsonSchemaResourceLocation(resourceLoader, jacksonMapper); + return new MetadataSourcesJsonSchemaResourceLocation(metadataSourcesUiSchemaLocation, resourceLoader, jacksonMapper); } } diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/jsonschema/MetadataSourcesJsonSchemaResourceLocation.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/jsonschema/MetadataSourcesJsonSchemaResourceLocation.java index d02b09ff0..98d53cd39 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/jsonschema/MetadataSourcesJsonSchemaResourceLocation.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/jsonschema/MetadataSourcesJsonSchemaResourceLocation.java @@ -1,16 +1,10 @@ package edu.internet2.tier.shibboleth.admin.ui.jsonschema; import com.fasterxml.jackson.databind.ObjectMapper; -import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanInitializationException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.core.io.ResourceLoader; -import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; -import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; @@ -21,28 +15,33 @@ * * @author Dmitriy Kopylenko */ -@ConfigurationProperties("shibui") public class MetadataSourcesJsonSchemaResourceLocation { - //Configured via @ConfigurationProperties with 'shibui.metadata-sources-ui-schema-location' property and default - //value set here if that property is not explicitly set in application.properties - private String metadataSourcesUiSchemaLocation = "classpath:metadata-sources-ui-schema.json"; + private final String metadataSourcesUiSchemaLocation; private URL jsonSchemaUrl; - private ResourceLoader resourceLoader; + private final ResourceLoader resourceLoader; - private ObjectMapper jacksonMapper; + private final ObjectMapper jacksonMapper; + private boolean detectMalformedJsonDuringInit = true; - - public MetadataSourcesJsonSchemaResourceLocation(ResourceLoader resourceLoader, ObjectMapper jacksonMapper) { + public MetadataSourcesJsonSchemaResourceLocation(String metadataSourcesUiSchemaLocation, ResourceLoader resourceLoader, ObjectMapper jacksonMapper) { + this.metadataSourcesUiSchemaLocation = metadataSourcesUiSchemaLocation; this.resourceLoader = resourceLoader; this.jacksonMapper = jacksonMapper; } - public void setMetadataSourcesUiSchemaLocation(String metadataSourcesUiSchemaLocation) { + //This constructor is used in tests + public MetadataSourcesJsonSchemaResourceLocation(String metadataSourcesUiSchemaLocation, + ResourceLoader resourceLoader, + ObjectMapper jacksonMapper, + boolean detectMalformedJsonDuringInit) { this.metadataSourcesUiSchemaLocation = metadataSourcesUiSchemaLocation; + this.resourceLoader = resourceLoader; + this.jacksonMapper = jacksonMapper; + this.detectMalformedJsonDuringInit = detectMalformedJsonDuringInit; } public URL getUrl() { @@ -62,8 +61,10 @@ public URI getUri() { public void init() { try { this.jsonSchemaUrl = this.resourceLoader.getResource(this.metadataSourcesUiSchemaLocation).getURL(); - //Detect malformed JSON schema early, during application start up and fail fast with useful exception message - this.jacksonMapper.readValue(this.jsonSchemaUrl, Map.class); + if(this.detectMalformedJsonDuringInit) { + //Detect malformed JSON schema early, during application start up and fail fast with useful exception message + this.jacksonMapper.readValue(this.jsonSchemaUrl, Map.class); + } } catch (Exception ex) { StringBuilder msg = diff --git a/backend/src/main/resources/i18n/messages.properties b/backend/src/main/resources/i18n/messages.properties index 2661b1fae..83b644910 100644 --- a/backend/src/main/resources/i18n/messages.properties +++ b/backend/src/main/resources/i18n/messages.properties @@ -89,10 +89,6 @@ brand.footer.links-label-4=Mailing List brand.footer.links-desc-4=Shibboleth.net open-source community mailing list brand.footer.copyright=Copyright \u00A9 Internet2 -brand.unicon=Unicon -brand.unicon-logo=Unicon Logo -brand.i2=Internet 2 -brand.i2-logo=Internet 2 Logo brand.in-partnership-with=In partnership with brand.and=and diff --git a/backend/src/main/resources/i18n/messages_en.properties b/backend/src/main/resources/i18n/messages_en.properties index 2661b1fae..83b644910 100644 --- a/backend/src/main/resources/i18n/messages_en.properties +++ b/backend/src/main/resources/i18n/messages_en.properties @@ -89,10 +89,6 @@ brand.footer.links-label-4=Mailing List brand.footer.links-desc-4=Shibboleth.net open-source community mailing list brand.footer.copyright=Copyright \u00A9 Internet2 -brand.unicon=Unicon -brand.unicon-logo=Unicon Logo -brand.i2=Internet 2 -brand.i2-logo=Internet 2 Logo brand.in-partnership-with=In partnership with brand.and=and diff --git a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/BadJSONMetadataSourcesUiDefinitionControllerIntegrationTests.groovy b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/BadJSONMetadataSourcesUiDefinitionControllerIntegrationTests.groovy new file mode 100644 index 000000000..f8619f012 --- /dev/null +++ b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/BadJSONMetadataSourcesUiDefinitionControllerIntegrationTests.groovy @@ -0,0 +1,49 @@ +package edu.internet2.tier.shibboleth.admin.ui.controller + +import com.fasterxml.jackson.databind.ObjectMapper +import edu.internet2.tier.shibboleth.admin.ui.jsonschema.MetadataSourcesJsonSchemaResourceLocation +import org.springframework.beans.factory.annotation.Autowired +import org.springframework.boot.test.context.SpringBootTest +import org.springframework.boot.test.context.TestConfiguration +import org.springframework.boot.test.web.client.TestRestTemplate +import org.springframework.context.annotation.Bean +import org.springframework.core.io.ResourceLoader +import org.springframework.test.context.ActiveProfiles +import spock.lang.Specification + +/** + * @author Dmitriy Kopylenko + */ +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles("no-auth") +class BadJSONMetadataSourcesUiDefinitionControllerIntegrationTests extends Specification { + + @Autowired + private TestRestTemplate restTemplate + + @Autowired + MetadataSourcesJsonSchemaResourceLocation schemaLocation + + static RESOURCE_URI = '/api/ui/MetadataSources' + + def "GET Malformed Metadata Sources UI definition schema"() { + when: 'GET request is made for malformed metadata source UI definition schema' + def result = this.restTemplate.getForEntity(RESOURCE_URI, Object) + + then: "Request results in HTTP 500" + result.statusCodeValue == 500 + result.body.jsonParseError + result.body.sourceUiSchemaDefinitionFile + } + + @TestConfiguration + static class Config { + @Bean + MetadataSourcesJsonSchemaResourceLocation metadataSourcesJsonSchemaResourceLocation(ResourceLoader resourceLoader, + ObjectMapper jacksonMapper) { + + new MetadataSourcesJsonSchemaResourceLocation('classpath:metadata-sources-ui-schema_MALFORMED.json', + resourceLoader, jacksonMapper, false) + } + } +} \ No newline at end of file diff --git a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/GoodJSONMetadataSourcesUiDefinitionControllerIntegrationTests.groovy b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/GoodJSONMetadataSourcesUiDefinitionControllerIntegrationTests.groovy new file mode 100644 index 000000000..c673956fe --- /dev/null +++ b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/GoodJSONMetadataSourcesUiDefinitionControllerIntegrationTests.groovy @@ -0,0 +1,29 @@ +package edu.internet2.tier.shibboleth.admin.ui.controller + +import org.springframework.beans.factory.annotation.Autowired +import org.springframework.boot.test.context.SpringBootTest +import org.springframework.boot.test.web.client.TestRestTemplate +import org.springframework.test.context.ActiveProfiles +import spock.lang.Specification + +/** + * @author Dmitriy Kopylenko + */ +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles("no-auth") +class GoodJSONMetadataSourcesUiDefinitionControllerIntegrationTests extends Specification { + + @Autowired + private TestRestTemplate restTemplate + + static RESOURCE_URI = '/api/ui/MetadataSources' + + def "GET Metadata Sources UI definition schema"() { + when: 'GET request is made for metadata source UI definition schema' + def result = this.restTemplate.getForEntity(RESOURCE_URI, Object) + + then: "Request completed successfully" + result.statusCodeValue == 200 + result.body.properties.entityId.title == 'label.entity-id' + } +} \ No newline at end of file diff --git a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataSourcesUiDefinitionControllerIntegrationTests.groovy b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataSourcesUiDefinitionControllerIntegrationTests.groovy deleted file mode 100644 index 240a08b77..000000000 --- a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataSourcesUiDefinitionControllerIntegrationTests.groovy +++ /dev/null @@ -1,74 +0,0 @@ -package edu.internet2.tier.shibboleth.admin.ui.controller - -import edu.internet2.tier.shibboleth.admin.ui.jsonschema.MetadataSourcesJsonSchemaResourceLocation -import org.springframework.beans.factory.BeanInitializationException -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.web.client.TestRestTemplate -import org.springframework.test.context.ActiveProfiles -import spock.lang.Specification - -/** - * @author Dmitriy Kopylenko - */ -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -@ActiveProfiles("no-auth") -class MetadataSourcesUiDefinitionControllerIntegrationTests extends Specification { - - @Autowired - private TestRestTemplate restTemplate - - @Autowired - MetadataSourcesJsonSchemaResourceLocation schemaLocation - - static RESOURCE_URI = '/api/ui/MetadataSources' - - def "GET Metadata Sources UI definition schema"() { - when: 'GET request is made for metadata source UI definition schema' - def result = this.restTemplate.getForEntity(RESOURCE_URI, Object) - - then: "Request completed successfully" - result.statusCodeValue == 200 - result.body.properties.entityId.title == 'label.entity-id' - } - - def "GET Malformed Metadata Sources UI definition schema"() { - when: 'GET request is made for malformed metadata source UI definition schema' - configureMalformedJsonInput(simulateApplicationStartup { false }) - def result = this.restTemplate.getForEntity(RESOURCE_URI, Object) - - then: "Request results in HTTP 500" - result.statusCodeValue == 500 - result.body.jsonParseError - result.body.sourceUiSchemaDefinitionFile - } - - def "Malformed Metadata Sources UI definition schema is detected during application start up"() { - when: 'Application is starting up and malformed JSON schema is detected' - configureMalformedJsonInput(simulateApplicationStartup { true }) - - then: - def ex = thrown(BeanInitializationException) - ex.message.contains('An error is detected during JSON parsing =>') - ex.message.contains('Offending resource =>') - - } - - private configureMalformedJsonInput(boolean simulateApplicationStartup) { - schemaLocation.metadataSourcesUiSchemaLocation = 'classpath:metadata-sources-ui-schema_MALFORMED.json' - try { - schemaLocation.init() - } - catch (Exception e) { - if (simulateApplicationStartup) { - throw e - } - } - - } - - //Just for the nicer, readable, DSL-like - private static boolean simulateApplicationStartup(Closure booleanFlagSupplier) { - booleanFlagSupplier() - } -} \ No newline at end of file diff --git a/backend/src/test/resources/metadata-sources-ui-schema_MALFORMED.json b/backend/src/test/resources/metadata-sources-ui-schema_MALFORMED.json index 7ca5220f0..cef1eb4d9 100644 --- a/backend/src/test/resources/metadata-sources-ui-schema_MALFORMED.json +++ b/backend/src/test/resources/metadata-sources-ui-schema_MALFORMED.json @@ -1,442 +1 @@ -{ - "type": "object" - "properties": { - "entityId": { - "title": "label.entity-id", - "description": "tooltip.entity-id", - "type": "string" - }, - "serviceProviderName": { - "title": "label.service-provider-name", - "description": "tooltip.service-provider-name", - "type": "string" - }, - "serviceEnabled": { - "title": "label.enable-this-service-opon-saving", - "description": "tooltip.enable-this-service-upon-saving", - "type": "boolean" - }, - "organization": { - "type": "object", - "properties": { - "name": { - "title": "label.organization-name", - "description": "tooltip.organization-name", - "type": "string" - }, - "displayName": { - "title": "label.organization-display-name", - "description": "tooltip.organization-display-name", - "type": "string" - }, - "url": { - "title": "label.organization-display-name", - "description": "tooltip.organization-display-name", - "type": "string" - } - }, - "dependencies": { - "name": [ - "displayName", - "url" - ], - "displayName": [ - "name", - "url" - ], - "url": [ - "name", - "displayName" - ] - } - }, - "contacts": { - "title": "label.contact-information", - "description": "tooltip.contact-information", - "type": "array", - "items": { - "$ref": "#/definitions/Contact" - } - }, - "mdui": { - "type": "object", - "properties": { - "displayName": { - "title": "label.display-name", - "description": "tooltip.mdui-display-name", - "type": "string" - }, - "informationUrl": { - "title": "label.information-url", - "description": "tooltip.mdui-information-url", - "type": "string" - }, - "privacyStatementUrl": { - "title": "label.privacy-statement-url", - "description": "tooltip.mdui-privacy-statement-url", - "type": "string" - }, - "description": { - "title": "label.description", - "description": "tooltip.mdui-description", - "type": "string" - }, - "logoUrl": { - "title": "label.logo-url", - "description": "tooltip.mdui-logo-url", - "type": "string" - }, - "logoHeight": { - "title": "label.logo-height", - "description": "tooltip.mdui-logo-height", - "min": 0, - "type": "integer" - }, - "logoWidth": { - "title": "label.logo-width", - "description": "tooltip.mdui-logo-width", - "min": 0, - "type": "integer" - } - } - }, - "securityInfo": { - "type": "object", - "properties": { - "x509CertificateAvailable": { - "title": "label.is-there-a-x509-certificate", - "description": "tooltip.is-there-a-x509-certificate", - "type": "boolean", - "default": false - }, - "authenticationRequestsSigned": { - "title": "label.authentication-requests-signed", - "description": "tooltip.authentication-requests-signed", - "type": "boolean", - "default": false - }, - "wantAssertionsSigned": { - "title": "label.want-assertions-signed", - "description": "tooltip.want-assertions-signed", - "type": "boolean", - "default": false - }, - "x509Certificates": { - "title": "label.x509-certificates", - "type": "array", - "items": { - "$ref": "#/definitions/Certificate" - } - } - } - }, - "assertionConsumerServices": { - "title": "label.assertion-consumer-service-endpoints", - "description": "", - "type": "array", - "items": { - "$ref": "#/definitions/AssertionConsumerService" - } - }, - "serviceProviderSsoDescriptor": { - "type": "object", - "properties": { - "protocolSupportEnum": { - "title": "label.protocol-support-enumeration", - "description": "tooltip.protocol-support-enumeration", - "type": "string", - "placeholder": "label.select-protocol", - "oneOf": [ - { - "enum": [ - "SAML 2" - ], - "description": "SAML 2" - }, - { - "enum": [ - "SAML 1.1" - ], - "description": "SAML 1.1" - } - ] - } - }, - "nameIdFormats": { - "$ref": "#/definitions/NameIdFormatList" - } - }, - "logoutEndpoints": { - "title": "label.logout-endpoints", - "description": "tooltip.logout-endpoints", - "type": "array", - "items": { - "$ref": "#/definitions/LogoutEndpoint" - } - }, - "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": { - "$ref": "#/definitions/NameIdFormatList" - }, - "authenticationMethods": { - "$ref": "#/definitions/AuthenticationMethodList" - } - } - }, - "attributeRelease": { - "type": "array", - "description": "Attribute release table - select the attributes you want to release (default unchecked)", - "widget": { - "id": "checklist", - "dataUrl": "/customAttributes" - }, - "items": { - "type": "string" - } - } - }, - "definitions": { - "Contact": { - "type": "object", - "properties": { - "name": { - "title": "label.contact-name", - "description": "tooltip.contact-name", - "type": "string" - }, - "type": { - "title": "label.contact-type", - "description": "tooltip.contact-type", - "type": "string", - "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": "^(?=.{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])?)*$" - } - } - }, - "Certificate": { - "name": { - "title": "label.certificate-name-display-only", - "description": "tooltip.certificate-name", - "type": "string" - }, - "type": { - "title": "label.type", - "description": "tooltip.certificate-type", - "type": "string", - "oneOf": [ - { - "enum": [ - "signing" - ], - "description": "value.signing" - }, - { - "enum": [ - "encryption" - ], - "description": "value.encryption" - }, - { - "enum": [ - "both" - ], - "description": "value.both" - } - ], - "default": "both" - }, - "value": { - "title": "label.certificate", - "description": "tooltip.certificate", - "type": "string" - } - }, - "AssertionConsumerService": { - "type": "object", - "properties": { - "locationUrl": { - "title": "label.assertion-consumer-services-location", - "description": "tooltip.assertion-consumer-service-location", - "type": "string", - "widget": { - "id": "string", - "help": "message.valid-url" - } - }, - "binding": { - "title": "label.assertion-consumer-service-location-binding", - "description": "tooltip.assertion-consumer-service-location-binding", - "type": "string", - "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:1.0:profiles:browser-post" - ], - "description": "urn:oasis:names:tc:SAML:1.0:profiles:browser-post" - } - ] - }, - "makeDefault": { - "title": "label.mark-as-default", - "description": "tooltip.mark-as-default", - "type": "boolean" - } - } - }, - "NameIdFormatList": { - "title": "label.nameid-format-to-send", - "placeholder": "label.nameid-format", - "description": "tooltip.nameid-format", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string", - "widget": "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 - }, - "AuthenticationMethodList": { - "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 - }, - "LogoutEndpoint": { - "title": "label.new-endpoint", - "description": "tooltip.new-endpoint", - "type": "object", - "properties": { - "url": { - "title": "label.url", - "description": "tooltip.url", - "type": "string" - }, - "bindingType": { - "title": "label.binding-type", - "description": "tooltip.binding-type", - "type": "string", - "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" - } - ] - - } - } - } - } -} +This is invalid JSON \ No newline at end of file diff --git a/ui/src/app/app.component.html b/ui/src/app/app.component.html index cd56856e3..f09ae298a 100644 --- a/ui/src/app/app.component.html +++ b/ui/src/app/app.component.html @@ -85,12 +85,12 @@