Skip to content

Commit

Permalink
Merge branch 'feature/shibui-2380' of bitbucket.org:unicon/shib-idp-u…
Browse files Browse the repository at this point in the history
…i into feature/shibui-2380
  • Loading branch information
rmathis committed Sep 30, 2022
2 parents 77ee749 + 56b5882 commit 007caf7
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 26 deletions.
6 changes: 0 additions & 6 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -655,4 +654,4 @@ class EntityDescriptorEnversVersioningTests extends Specification {
attrs.attributes[1].attributeValues[0].xsStringvalue == 'attr1'
attrs.attributes[1].attributeValues[1] == null
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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)
Expand Down
46 changes: 45 additions & 1 deletion backend/src/main/resources/db/changelog/changelog.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
22 changes: 11 additions & 11 deletions backend/src/main/resources/metadata-sources-ui-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 007caf7

Please sign in to comment.