From 0a8052020b1155ddf862615a8c33e48faf00d351 Mon Sep 17 00:00:00 2001 From: chasegawa Date: Mon, 19 Sep 2022 11:57:47 -0700 Subject: [PATCH 01/12] [Gradle Release Plugin] - pre tag commit: '1.13.1'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 8287440e0..46c68393d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ name=shibui group=edu.internet2.tier.shibboleth.admin.ui -version=1.14.0-SNAPSHOT +version=1.13.1 ### library versions ### commonsCollections4Version=4.4 From db9fcbd699548589d017d6121e636d62ffe47e6c Mon Sep 17 00:00:00 2001 From: chasegawa Date: Mon, 19 Sep 2022 11:59:41 -0700 Subject: [PATCH 02/12] [Gradle Release Plugin] - new version commit: '1.14.0-SNAPSHOT'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 46c68393d..8287440e0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ name=shibui group=edu.internet2.tier.shibboleth.admin.ui -version=1.13.1 +version=1.14.0-SNAPSHOT ### library versions ### commonsCollections4Version=4.4 From b4c9da50b59b7d89c6ebb2920e6eba28711f17a0 Mon Sep 17 00:00:00 2001 From: chasegawa Date: Tue, 20 Sep 2022 12:44:08 -0700 Subject: [PATCH 03/12] SHIBUI-2397 Change to shib config table - making description a lob --- .../properties/ShibConfigurationProperty.java | 4 +++ .../main/resources/db/changelog/changelog.sql | 30 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/shib/properties/ShibConfigurationProperty.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/shib/properties/ShibConfigurationProperty.java index 69e860302..39a964e86 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/shib/properties/ShibConfigurationProperty.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/shib/properties/ShibConfigurationProperty.java @@ -3,12 +3,14 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import edu.internet2.tier.shibboleth.admin.util.EmptyStringToNullConverter; import lombok.Data; +import org.hibernate.annotations.Type; import org.hibernate.envers.Audited; import javax.persistence.Column; import javax.persistence.Convert; import javax.persistence.Entity; import javax.persistence.Id; +import javax.persistence.Lob; import java.util.UUID; @Entity(name = "shib_configuration_prop") @@ -30,6 +32,8 @@ public class ShibConfigurationProperty { String defaultValue; @Column(name = "description") + @Lob + @Type(type = "org.hibernate.type.TextType") @Convert(converter = EmptyStringToNullConverter.class) String description; diff --git a/backend/src/main/resources/db/changelog/changelog.sql b/backend/src/main/resources/db/changelog/changelog.sql index c213f3952..c98abe7f4 100644 --- a/backend/src/main/resources/db/changelog/changelog.sql +++ b/backend/src/main/resources/db/changelog/changelog.sql @@ -206,3 +206,33 @@ ALTER TABLE description ALTER COLUMN description_value TEXT; GO ALTER TABLE description_aud ALTER COLUMN description_value TEXT; GO + +-- changeset liquibase:1.13.2.1 dbms:mariadb,mysql +-- preconditions onFail:MARK_RAN +-- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'users' +-- comment: /* we don't need to run this if the system is new */ + +ALTER TABLE shib_configuration_prop MODIFY COLUMN description LONGTEXT; +GO +ALTER TABLE shib_configuration_prop_aud MODIFY COLUMN description LONGTEXT; +GO + +-- changeset liquibase:1.13.2.1 dbms:postgresql +-- preconditions onFail:MARK_RAN +-- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'users' +-- comment: /* we don't need to run this if the system is new */ + +ALTER TABLE shib_configuration_prop ALTER COLUMN description TYPE TEXT; +GO +ALTER TABLE shib_configuration_prop_aud ALTER COLUMN description TYPE TEXT; +GO + +-- changeset liquibase:1.13.2.1 dbms:mssql +-- preconditions onFail:MARK_RAN +-- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'users' +-- comment: /* we don't need to run this if the system is new */ + +ALTER TABLE shib_configuration_prop ALTER COLUMN description TEXT; +GO +ALTER TABLE shib_configuration_prop_aud ALTER COLUMN description TEXT; +GO \ No newline at end of file From fab1a8801eff07f3cbb4953c329dc1baf9ed34b3 Mon Sep 17 00:00:00 2001 From: chasegawa Date: Tue, 20 Sep 2022 13:01:55 -0700 Subject: [PATCH 04/12] SHIBUI-2397 Fixing entity --- .../ui/domain/shib/properties/ShibConfigurationProperty.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/shib/properties/ShibConfigurationProperty.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/shib/properties/ShibConfigurationProperty.java index 39a964e86..0c02facbf 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/shib/properties/ShibConfigurationProperty.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/shib/properties/ShibConfigurationProperty.java @@ -31,10 +31,9 @@ public class ShibConfigurationProperty { @Convert(converter = EmptyStringToNullConverter.class) String defaultValue; - @Column(name = "description") @Lob @Type(type = "org.hibernate.type.TextType") - @Convert(converter = EmptyStringToNullConverter.class) + @Convert(converter = EmptyStringToNullConverter.class, disableConversion = true) String description; @Column(name = "idp_version", nullable = false) From 966fa7928727987a1fd81aeee5fb78e14b509544 Mon Sep 17 00:00:00 2001 From: chasegawa Date: Tue, 20 Sep 2022 13:26:11 -0700 Subject: [PATCH 05/12] [Gradle Release Plugin] - pre tag commit: '1.13.2'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 8287440e0..bd69ccabe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ name=shibui group=edu.internet2.tier.shibboleth.admin.ui -version=1.14.0-SNAPSHOT +version=1.13.2 ### library versions ### commonsCollections4Version=4.4 From d4589af2d79c5da82e78316eeed03e27cb23bb99 Mon Sep 17 00:00:00 2001 From: chasegawa Date: Tue, 20 Sep 2022 13:26:54 -0700 Subject: [PATCH 06/12] [Gradle Release Plugin] - new version commit: '1.14.0-SNAPSHOT'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index bd69ccabe..8287440e0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ name=shibui group=edu.internet2.tier.shibboleth.admin.ui -version=1.13.2 +version=1.14.0-SNAPSHOT ### library versions ### commonsCollections4Version=4.4 From 4da7f5544f00b7dde4c6ccaaa8b04b8970e48427 Mon Sep 17 00:00:00 2001 From: Sean Porth Date: Mon, 26 Sep 2022 09:28:36 -0400 Subject: [PATCH 07/12] updated pre-condition table --- backend/src/main/resources/db/changelog/changelog.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/main/resources/db/changelog/changelog.sql b/backend/src/main/resources/db/changelog/changelog.sql index c98abe7f4..4ba7e8e2e 100644 --- a/backend/src/main/resources/db/changelog/changelog.sql +++ b/backend/src/main/resources/db/changelog/changelog.sql @@ -209,7 +209,7 @@ GO -- changeset liquibase:1.13.2.1 dbms:mariadb,mysql -- preconditions onFail:MARK_RAN --- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'users' +-- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'shib_configuration_prop' -- comment: /* we don't need to run this if the system is new */ ALTER TABLE shib_configuration_prop MODIFY COLUMN description LONGTEXT; @@ -219,7 +219,7 @@ GO -- changeset liquibase:1.13.2.1 dbms:postgresql -- preconditions onFail:MARK_RAN --- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'users' +-- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'shib_configuration_prop' -- comment: /* we don't need to run this if the system is new */ ALTER TABLE shib_configuration_prop ALTER COLUMN description TYPE TEXT; @@ -229,7 +229,7 @@ GO -- changeset liquibase:1.13.2.1 dbms:mssql -- preconditions onFail:MARK_RAN --- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'users' +-- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'shib_configuration_prop' -- comment: /* we don't need to run this if the system is new */ ALTER TABLE shib_configuration_prop ALTER COLUMN description TEXT; From 8c45ee751809789b82a0b98b5e1b88441a87c53a Mon Sep 17 00:00:00 2001 From: chasegawa Date: Mon, 26 Sep 2022 13:25:54 -0700 Subject: [PATCH 08/12] SHIBUI-2404 Update to db + fix to Description class for TEXT field --- .../admin/ui/domain/Description.java | 2 ++ .../main/resources/db/changelog/changelog.sql | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/Description.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/Description.java index b86c86b1d..133c81ff5 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/Description.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/Description.java @@ -1,6 +1,7 @@ package edu.internet2.tier.shibboleth.admin.ui.domain; import lombok.EqualsAndHashCode; +import org.hibernate.annotations.Type; import org.hibernate.envers.Audited; import javax.annotation.Nullable; @@ -18,6 +19,7 @@ public class Description extends AbstractXMLObject implements org.opensaml.saml. @Column(name = "descriptionValue") @Lob + @Type(type = "org.hibernate.type.TextType") private String value; @Nullable diff --git a/backend/src/main/resources/db/changelog/changelog.sql b/backend/src/main/resources/db/changelog/changelog.sql index 4ba7e8e2e..d206d4bcb 100644 --- a/backend/src/main/resources/db/changelog/changelog.sql +++ b/backend/src/main/resources/db/changelog/changelog.sql @@ -235,4 +235,24 @@ GO ALTER TABLE shib_configuration_prop ALTER COLUMN description TEXT; GO ALTER TABLE shib_configuration_prop_aud ALTER COLUMN description TEXT; +GO + +-- changeset liquibase:1.13.3.1 dbms:postgresql +-- preconditions onFail:MARK_RAN +-- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'users' +-- comment: /* we don't need to run this if the system is new */ + +ALTER TABLE description ALTER COLUMN description_value TYPE TEXT; +GO +ALTER TABLE description_aud ALTER COLUMN description_value TYPE TEXT; +GO + +-- changeset liquibase:1.13.3.1 dbms:mssql +-- preconditions onFail:MARK_RAN +-- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'users' +-- comment: /* we don't need to run this if the system is new */ + +ALTER TABLE description ALTER COLUMN description_value TEXT; +GO +ALTER TABLE description_aud ALTER COLUMN description_value TEXT; GO \ No newline at end of file From 5c1fd76eb207a5cc1dc2a72057e8acfa2b99e942 Mon Sep 17 00:00:00 2001 From: chasegawa Date: Thu, 29 Sep 2022 14:30:50 -0700 Subject: [PATCH 09/12] SHIBUI-2380 minor cleanup --- backend/build.gradle | 6 - .../resources/metadata-sources-ui-schema.json | 546 ------------------ 2 files changed, 552 deletions(-) delete mode 100644 backend/src/main/resources/metadata-sources-ui-schema.json diff --git a/backend/build.gradle b/backend/build.gradle index a4ca532b1..b0c823d47 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -135,12 +135,6 @@ dependencies { compile "net.shibboleth.idp:${it}:${project.'shibbolethVersion'}" } -// // Shib OIDC -// ['metadata', 'profile', 'crypto'].each { -// testCompile "net.shibboleth.oidc:oidc-common-${it}-api:${project.'shibOIDCVersion'}" -// testCompile "net.shibboleth.oidc:oidc-common-${it}-impl:${project.'shibOIDCVersion'}" -// } - implementation "net.shibboleth.oidc:oidc-common-saml-api:${project.'shibOIDCVersion'}" // hibernate deps diff --git a/backend/src/main/resources/metadata-sources-ui-schema.json b/backend/src/main/resources/metadata-sources-ui-schema.json deleted file mode 100644 index 877f2cada..000000000 --- a/backend/src/main/resources/metadata-sources-ui-schema.json +++ /dev/null @@ -1,546 +0,0 @@ -{ - "type": "object", - "required": [ - "protocol", - "serviceProviderName", - "entityId" - ], - "properties": { - "protocol": { - "title": "label.metadata-source-protocol", - "description": "tooltip.metadata-source-protocol", - "type": "string", - "enum": [ - "OIDC", - "SAML" - ], - "enumNames": [ - "value.oidc", - "value.saml" - ] - }, - "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", - "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" - }, - { - "enum": [ - "http://openid.net/specs/openid-connect-core-1_0.html" - ], - "description": "OIDC" - } - ] - }, - "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" - }, - { - "enum": [ - "https://tools.ietf.org/html/rfc6749#section-3.1.2" - ], - "description": "OIDC / OAUTH Binding" - } - ] - }, - "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 From 45a5c3163514e7b6130cea5942bbce5fbdf5ba7c Mon Sep 17 00:00:00 2001 From: chasegawa Date: Thu, 29 Sep 2022 14:47:50 -0700 Subject: [PATCH 10/12] SHIBUI-2380 unit test (envers) fix --- .../EntityDescriptorEnversVersioningTests.groovy | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/backend/src/enversTest/groovy/edu/internet2/tier/shibboleth/admin/ui/repository/envers/EntityDescriptorEnversVersioningTests.groovy b/backend/src/enversTest/groovy/edu/internet2/tier/shibboleth/admin/ui/repository/envers/EntityDescriptorEnversVersioningTests.groovy index 071cd130f..79a00d44d 100644 --- a/backend/src/enversTest/groovy/edu/internet2/tier/shibboleth/admin/ui/repository/envers/EntityDescriptorEnversVersioningTests.groovy +++ b/backend/src/enversTest/groovy/edu/internet2/tier/shibboleth/admin/ui/repository/envers/EntityDescriptorEnversVersioningTests.groovy @@ -34,6 +34,7 @@ import edu.internet2.tier.shibboleth.admin.ui.domain.XSString import edu.internet2.tier.shibboleth.admin.ui.domain.frontend.AssertionConsumerServiceRepresentation import edu.internet2.tier.shibboleth.admin.ui.domain.frontend.ContactRepresentation import edu.internet2.tier.shibboleth.admin.ui.domain.frontend.EntityDescriptorRepresentation +import edu.internet2.tier.shibboleth.admin.ui.domain.frontend.KeyDescriptorRepresentation import edu.internet2.tier.shibboleth.admin.ui.domain.frontend.LogoutEndpointRepresentation import edu.internet2.tier.shibboleth.admin.ui.domain.frontend.MduiRepresentation import edu.internet2.tier.shibboleth.admin.ui.domain.frontend.OrganizationRepresentation @@ -380,8 +381,7 @@ class EntityDescriptorEnversVersioningTests extends Specification { def representation = new EntityDescriptorRepresentation().with { it.securityInfo = new SecurityInfoRepresentation().with { it.authenticationRequestsSigned = true - it.x509CertificateAvailable = true - it.x509Certificates = [new SecurityInfoRepresentation.X509CertificateRepresentation(name: 'sign', type: 'signing', value: 'signingValue')] + it.keyDescriptors = [new KeyDescriptorRepresentation(name: 'sign', type: 'signing', value: 'signingValue', elementType: 'X509Data')] it } it @@ -411,9 +411,8 @@ class EntityDescriptorEnversVersioningTests extends Specification { representation = new EntityDescriptorRepresentation().with { it.securityInfo = new SecurityInfoRepresentation().with { it.authenticationRequestsSigned = false - it.x509CertificateAvailable = true - it.x509Certificates = [new SecurityInfoRepresentation.X509CertificateRepresentation(name: 'sign', type: 'signing', value: 'signingValue'), - new SecurityInfoRepresentation.X509CertificateRepresentation(name: 'encrypt', type: 'encryption', value: 'encryptionValue')] + it.keyDescriptors = [new KeyDescriptorRepresentation(name: 'sign', type: 'signing', value: 'signingValue', elementType: 'X509Data'), + new KeyDescriptorRepresentation(name: 'encrypt', type: 'encryption', value: 'encryptionValue', elementType: 'X509Data')] it } it @@ -655,4 +654,4 @@ class EntityDescriptorEnversVersioningTests extends Specification { attrs.attributes[1].attributeValues[0].xsStringvalue == 'attr1' attrs.attributes[1].attributeValues[1] == null } -} +} \ No newline at end of file From b498edcdade303e96f60b42aed24f5f98531155b Mon Sep 17 00:00:00 2001 From: chasegawa Date: Thu, 29 Sep 2022 15:05:21 -0700 Subject: [PATCH 11/12] 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 From 56b588240843ca622eb9927a9b51c418f920ec5c Mon Sep 17 00:00:00 2001 From: chasegawa Date: Thu, 29 Sep 2022 15:34:49 -0700 Subject: [PATCH 12/12] SHIBUI-2380 restored file that was removed --- .../resources/metadata-sources-ui-schema.json | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/backend/src/main/resources/metadata-sources-ui-schema.json b/backend/src/main/resources/metadata-sources-ui-schema.json index 93ad3ec81..818304bfb 100644 --- a/backend/src/main/resources/metadata-sources-ui-schema.json +++ b/backend/src/main/resources/metadata-sources-ui-schema.json @@ -1,10 +1,24 @@ { "type": "object", "required": [ + "protocol", "serviceProviderName", "entityId" ], "properties": { + "protocol": { + "title": "label.metadata-source-protocol", + "description": "tooltip.metadata-source-protocol", + "type": "string", + "enum": [ + "OIDC", + "SAML" + ], + "enumNames": [ + "value.oidc", + "value.saml" + ] + }, "serviceProviderName": { "title": "label.service-provider-name", "description": "tooltip.service-provider-name", @@ -40,9 +54,6 @@ }, "securityInfo": { "type": "object", - "widget": { - "id": "fieldset" - }, "dependencies": { "authenticationRequestsSigned": { "oneOf": [ @@ -131,6 +142,12 @@ "SAML 1.1" ], "description": "SAML 1.1" + }, + { + "enum": [ + "http://openid.net/specs/openid-connect-core-1_0.html" + ], + "description": "OIDC" } ] }, @@ -329,6 +346,12 @@ "urn:oasis:names:tc:SAML:1.0:profiles:artifact-01" ], "description": "urn:oasis:names:tc:SAML:1.0:profiles:artifact-01" + }, + { + "enum": [ + "https://tools.ietf.org/html/rfc6749#section-3.1.2" + ], + "description": "OIDC / OAUTH Binding" } ] },