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/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 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..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 @@ -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") @@ -29,8 +31,9 @@ public class ShibConfigurationProperty { @Convert(converter = EmptyStringToNullConverter.class) String defaultValue; - @Column(name = "description") - @Convert(converter = EmptyStringToNullConverter.class) + @Lob + @Type(type = "org.hibernate.type.TextType") + @Convert(converter = EmptyStringToNullConverter.class, disableConversion = true) String description; @Column(name = "idp_version", nullable = false) diff --git a/backend/src/main/resources/db/changelog/changelog.sql b/backend/src/main/resources/db/changelog/changelog.sql index 9cbf7e5ef..c01ba0e03 100644 --- a/backend/src/main/resources/db/changelog/changelog.sql +++ b/backend/src/main/resources/db/changelog/changelog.sql @@ -204,12 +204,56 @@ GO 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'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; +GO +ALTER TABLE shib_configuration_prop_aud MODIFY COLUMN description LONGTEXT; +GO --- changeset liquibase:1.13.0.3 dbms:mssql +-- 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'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; +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'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; +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 diff --git a/backend/src/main/resources/metadata-sources-ui-schema.json b/backend/src/main/resources/metadata-sources-ui-schema.json index 877f2cada..818304bfb 100644 --- a/backend/src/main/resources/metadata-sources-ui-schema.json +++ b/backend/src/main/resources/metadata-sources-ui-schema.json @@ -7,17 +7,17 @@ ], "properties": { "protocol": { - "title": "label.metadata-source-protocol", - "description": "tooltip.metadata-source-protocol", - "type": "string", - "enum": [ - "OIDC", - "SAML" - ], - "enumNames": [ - "value.oidc", - "value.saml" - ] + "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",