diff --git a/.gitignore b/.gitignore index 0848cc3ed..b298de799 100644 --- a/.gitignore +++ b/.gitignore @@ -412,3 +412,6 @@ beacon/spring/out # macOS jenv .java-version +/a.xml +/application.yml +/backend/src/test/resources/conf/deletem.xml diff --git a/Jenkinsfile b/Jenkinsfile index 3ae5f4595..60f82aca1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,32 +16,6 @@ pipeline { } } } - - stage('Build Docker images') { - when { - expression { - return GIT_BRANCH in ['master'] - } - } - steps { - sh '''./gradlew docker -x test - ''' - } - } - - stage('Deploy') { - when { - expression { - return GIT_BRANCH in ['master'] - } - } - steps { - sh ''' - docker stop shibui || true && docker rm shibui || true - docker run -d --restart always --name shibui -p 8080:8080 -v /etc/shibui:/conf -v /etc/shibui/application.yml:/application.yml -m 2GB --memory-swap=4GB --entrypoint /usr/bin/java unicon/shibui:latest -Xmx1G -jar app.war - ''' - } - } } post { failure { @@ -54,4 +28,4 @@ pipeline { cleanWs() } } -} +} \ No newline at end of file diff --git a/backend/build.gradle b/backend/build.gradle index 7f933965d..71ab2c763 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -171,9 +171,10 @@ dependencies { runtimeOnly 'org.glassfish.jaxb:jaxb-runtime:2.3.0' compile "com.h2database:h2" - runtimeOnly 'org.postgresql:postgresql:42.3.4' - runtimeOnly 'org.mariadb.jdbc:mariadb-java-client:3.0.4' - runtimeOnly 'mysql:mysql-connector-java:8.0.29' + runtimeOnly "org.postgresql:postgresql:${project.'postgresVersion'}" + runtimeOnly "org.mariadb.jdbc:mariadb-java-client:${project.'mariadbVersion'}" + runtimeOnly "mysql:mysql-connector-java:${project.'mysqlVersion'}" + runtimeOnly "com.microsoft.sqlserver:mssql-jdbc:${project.'sqlserverVersion'}" //Swagger 3 implementation 'org.springdoc:springdoc-openapi-ui:1.6.8' diff --git a/backend/src/enversTest/groovy/edu/internet2/tier/shibboleth/admin/ui/repository/envers/MetadataResolverEnversVersioningTests.groovy b/backend/src/enversTest/groovy/edu/internet2/tier/shibboleth/admin/ui/repository/envers/MetadataResolverEnversVersioningTests.groovy index b468a2ffa..6d976a033 100644 --- a/backend/src/enversTest/groovy/edu/internet2/tier/shibboleth/admin/ui/repository/envers/MetadataResolverEnversVersioningTests.groovy +++ b/backend/src/enversTest/groovy/edu/internet2/tier/shibboleth/admin/ui/repository/envers/MetadataResolverEnversVersioningTests.groovy @@ -14,7 +14,6 @@ import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.LocalDynamicMetad import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.ReloadableMetadataResolverAttributes import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.ResourceBackedMetadataResolver import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.TemplateScheme -import edu.internet2.tier.shibboleth.admin.ui.opensaml.OpenSamlObjects import edu.internet2.tier.shibboleth.admin.ui.repository.MetadataResolverRepository import org.springframework.beans.factory.annotation.Autowired import org.springframework.boot.autoconfigure.domain.EntityScan @@ -269,7 +268,7 @@ class MetadataResolverEnversVersioningTests extends Specification { when: ResourceBackedMetadataResolver resolver = new ResourceBackedMetadataResolver(name: 'rbmr').with { it.reloadableMetadataResolverAttributes = new ReloadableMetadataResolverAttributes(taskTimerRef: 'taskTimerRef') - it.classpathMetadataResource = new ClasspathMetadataResource(file: 'metadata.xml') + it.classpathMetadataResource = new ClasspathMetadataResource(fileResource: 'metadata.xml') it } @@ -283,7 +282,7 @@ class MetadataResolverEnversVersioningTests extends Specification { resolverHistory.size() == 1 getTargetEntityForRevisionIndex(resolverHistory, 0).name == 'rbmr' getTargetEntityForRevisionIndex(resolverHistory, 0).reloadableMetadataResolverAttributes.taskTimerRef == 'taskTimerRef' - getTargetEntityForRevisionIndex(resolverHistory, 0).classpathMetadataResource.file == 'metadata.xml' + getTargetEntityForRevisionIndex(resolverHistory, 0).classpathMetadataResource.fileResource == 'metadata.xml' getRevisionEntityForRevisionIndex(resolverHistory, 0).principalUserName == 'anonymousUser' getRevisionEntityForRevisionIndex(resolverHistory, 0).timestamp > 0L getModifiedEntityNames(resolverHistory, 0).sort() == expectedModifiedPersistentEntities.sort() @@ -291,7 +290,7 @@ class MetadataResolverEnversVersioningTests extends Specification { when: resolver.name = 'rbmrUPDATED' resolver.reloadableMetadataResolverAttributes.taskTimerRef = 'taskTimerRefUPDATED' - resolver.classpathMetadataResource.file = 'metadataUPDATED.xml' + resolver.classpathMetadataResource.fileResource = 'metadataUPDATED.xml' resolverHistory = updateAndGetRevisionHistoryOfMetadataResolver(resolver, metadataResolverRepository, @@ -303,7 +302,7 @@ class MetadataResolverEnversVersioningTests extends Specification { resolverHistory.size() == 2 getTargetEntityForRevisionIndex(resolverHistory, 1).name == 'rbmrUPDATED' getTargetEntityForRevisionIndex(resolverHistory, 1).reloadableMetadataResolverAttributes.taskTimerRef == 'taskTimerRefUPDATED' - getTargetEntityForRevisionIndex(resolverHistory, 1).classpathMetadataResource.file == 'metadataUPDATED.xml' + getTargetEntityForRevisionIndex(resolverHistory, 1).classpathMetadataResource.fileResource == 'metadataUPDATED.xml' getRevisionEntityForRevisionIndex(resolverHistory, 1).principalUserName == 'anonymousUser' getRevisionEntityForRevisionIndex(resolverHistory, 1).timestamp > 0L getModifiedEntityNames(resolverHistory, 1).sort() == expectedModifiedPersistentEntities.sort() @@ -311,8 +310,8 @@ class MetadataResolverEnversVersioningTests extends Specification { //Check the original revision is intact getTargetEntityForRevisionIndex(resolverHistory, 0).name == 'rbmr' getTargetEntityForRevisionIndex(resolverHistory, 0).reloadableMetadataResolverAttributes.taskTimerRef == 'taskTimerRef' - getTargetEntityForRevisionIndex(resolverHistory, 0).classpathMetadataResource.file == 'metadata.xml' + getTargetEntityForRevisionIndex(resolverHistory, 0).classpathMetadataResource.fileResource == 'metadata.xml' getRevisionEntityForRevisionIndex(resolverHistory, 0).principalUserName == 'anonymousUser' getRevisionEntityForRevisionIndex(resolverHistory, 0).timestamp > 0L } -} +} \ No newline at end of file diff --git a/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy b/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy index 3c73bfbbf..14a65b52b 100644 --- a/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy +++ b/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy @@ -153,6 +153,6 @@ class SeleniumSIDETest extends Specification { 'SHIBUI-1744: Verify attribute bundles in entity attribute filters' | '/SHIBUI-1744-3.side' 'SHIBUI-2052: Logged in user & role appear on dashboard' | '/SHIBUI-2052.side' 'SHIBUI-2116: Verify entity attribute bundle highlights' | '/SHIBUI-2116.side' // Note that this script WILL NOT PASS in the Selenium IDE due to ${driver} not being set (it is provided by this groovy script). - + 'SHIBUI-2269: Verify XML generation of external filters' | '/SHIBUI-2269.side' } } diff --git a/backend/src/integration/resources/SHIBUI-1281.side b/backend/src/integration/resources/SHIBUI-1281.side index 1116328fc..06e730ecd 100644 --- a/backend/src/integration/resources/SHIBUI-1281.side +++ b/backend/src/integration/resources/SHIBUI-1281.side @@ -1974,7 +1974,7 @@ ["xpath=//metadata-configuration[@id='configuration']/div/section[9]/div/div[2]/object-property/array-property/div/div[5]/div/span", "xpath:idRelative"], ["xpath=//div/div[5]/div/span", "xpath:position"] ], - "value": "True" + "value": "true" }, { "id": "1406d7e4-907d-4359-8de8-a40206f0993e", "comment": "", diff --git a/backend/src/integration/resources/SHIBUI-1311.side b/backend/src/integration/resources/SHIBUI-1311.side index 8cf611c2d..1004e1bb6 100644 --- a/backend/src/integration/resources/SHIBUI-1311.side +++ b/backend/src/integration/resources/SHIBUI-1311.side @@ -461,42 +461,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "232da257-962f-4a4b-8213-038ef90c96c3", - "comment": "", - "command": "click", - "target": "css=.btn-outline-secondary", - "targets": [ - ["css=.btn-outline-secondary", "css:finder"], - ["xpath=(//button[@type='button'])[2]", "xpath:attributes"], - ["xpath=//div[@id='/metadataFilters/RequiredValidUntil/maxValidityInterval-container']/div/div/button", "xpath:idRelative"], - ["xpath=//div/button", "xpath:position"], - ["xpath=//button[contains(.,'Toggle Dropdown')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "236d7114-a227-4087-8aa0-2851acfe19ac", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "b8d999f1-0c59-4a9a-9991-91d222f52b8e", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", + "command": "type", + "target": "id=root_metadataFilters_0_maxValidityInterval", "targets": [ - ["id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] + ["id=root_metadataFilters_0_maxValidityInterval", "id"], + ["css=#root_metadataFilters_0_maxValidityInterval", "css:finder"], + ["xpath=//input[@id='root_metadataFilters_0_maxValidityInterval']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] ], - "value": "" + "value": "PT1H" }, { "id": "8af1abb5-2c7a-4a4c-a8f7-0eb287100dde", "comment": "", @@ -1032,17 +1009,19 @@ "id": "b799fede-c85b-4bd3-8e03-347f8a7d188a", "comment": "", "command": "click", - "target": "css=tr:nth-child(2) .fa-chevron-circle-up", + "target": "css=tr:nth-child(2) .px-1:nth-child(3)", "targets": [ - ["css=tr:nth-child(2) .fa-chevron-circle-up", "css:finder"], - ["xpath=//tr[2]/td/div/button[2]/i", "xpath:position"] + ["css=tr:nth-child(2) .px-1:nth-child(3)", "css:finder"], + ["xpath=(//button[@type='button'])[9]", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div/div[2]/div/div/div/table/tbody/tr[2]/td/div/button[2]", "xpath:idRelative"], + ["xpath=//tr[2]/td/div/button[2]", "xpath:position"] ], "value": "" }, { "id": "dc866249-3245-4baa-af0e-55af28d270cf", "comment": "", "command": "pause", - "target": "5000", + "target": "7000", "targets": [], "value": "" }, { @@ -1061,10 +1040,12 @@ "id": "664aafa3-9f6f-4eab-9eb6-a4d1a8344c5c", "comment": "", "command": "click", - "target": "css=tr:nth-child(2) .fa-chevron-circle-up", + "target": "css=tr:nth-child(2) .px-1:nth-child(3)", "targets": [ - ["css=tr:nth-child(2) .fa-chevron-circle-up", "css:finder"], - ["xpath=//tr[2]/td/div/button[2]/i", "xpath:position"] + ["css=tr:nth-child(2) .px-1:nth-child(3)", "css:finder"], + ["xpath=(//button[@type='button'])[9]", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div/div[2]/div/div/div/table/tbody/tr[2]/td/div/button[2]", "xpath:idRelative"], + ["xpath=//tr[2]/td/div/button[2]", "xpath:position"] ], "value": "" }, { @@ -1079,21 +1060,21 @@ ["xpath=//td[contains(.,'Disabled')]", "xpath:innerText"] ], "value": "" - },{ - "id": "4ec2c493-85e4-403b-9b09-031c5728f498", - "comment": "", - "command": "open", - "target": "/api/heheheheheheheWipeout", - "targets": [], - "value": "" - }, { - "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", - "comment": "", - "command": "assertText", - "target": "css=body", - "targets": [], - "value": "yes, you did it" - }] + }, { + "id": "4ec2c493-85e4-403b-9b09-031c5728f498", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }] }], "suites": [{ "id": "894bbaf7-9978-4d30-b4e3-3c4263e084aa", diff --git a/backend/src/integration/resources/SHIBUI-1333.side b/backend/src/integration/resources/SHIBUI-1333.side index d1a582063..4a61515ff 100644 --- a/backend/src/integration/resources/SHIBUI-1333.side +++ b/backend/src/integration/resources/SHIBUI-1333.side @@ -1956,7 +1956,7 @@ ["xpath=//metadata-configuration[@id='configuration']/div/section[9]/div/div[2]/object-property/array-property/div/div[5]/div/span", "xpath:idRelative"], ["xpath=//div/div[5]/div/span", "xpath:position"] ], - "value": "True" + "value": "true" }, { "id": "1406d7e4-907d-4359-8de8-a40206f0993e", "comment": "", @@ -2253,7 +2253,7 @@ ["xpath=//metadata-configuration[@id='configuration']/div/section[8]/div/div[2]/object-property/array-property/div/div/div[3]/div/span", "xpath:idRelative"], ["xpath=//section[8]/div/div[2]/object-property/array-property/div/div/div[3]/div/span", "xpath:position"] ], - "value": "True" + "value": "true" },{ "id": "4ec2c493-85e4-403b-9b09-031c5728f498", "comment": "", diff --git a/backend/src/integration/resources/SHIBUI-1334-1.side b/backend/src/integration/resources/SHIBUI-1334-1.side index f213dcae5..f0491037d 100644 --- a/backend/src/integration/resources/SHIBUI-1334-1.side +++ b/backend/src/integration/resources/SHIBUI-1334-1.side @@ -1966,7 +1966,7 @@ ["xpath=//metadata-configuration[@id='configuration']/div/section[9]/div/div[2]/object-property/array-property/div/div[5]/div/span", "xpath:idRelative"], ["xpath=//div/div[5]/div/span", "xpath:position"] ], - "value": "True" + "value": "true" }, { "id": "a1050ebe-55c5-4eac-8d12-615f3ff1cd72", "comment": "", @@ -2281,7 +2281,7 @@ ["xpath=//metadata-configuration[@id='configuration']/div/section[8]/div/div[2]/object-property/array-property/div/div/div[3]/div/span", "xpath:idRelative"], ["xpath=//section[8]/div/div[2]/object-property/array-property/div/div/div[3]/div/span", "xpath:position"] ], - "value": "True" + "value": "true" }, { "id": "2c46cdcd-d5a5-47fe-aa7b-0120fd2fcfc9", "comment": "", diff --git a/backend/src/integration/resources/SHIBUI-1334-2.side b/backend/src/integration/resources/SHIBUI-1334-2.side index a0be85400..325fd6166 100644 --- a/backend/src/integration/resources/SHIBUI-1334-2.side +++ b/backend/src/integration/resources/SHIBUI-1334-2.side @@ -448,41 +448,13 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "232da257-962f-4a4b-8213-038ef90c96c3", - "comment": "", - "command": "click", - "target": "css=.toggle-button", - "targets": [ - ["css=.toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[7]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "d30605a0-013c-403d-86ab-780f471fe159", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "b8d999f1-0c59-4a9a-9991-91d222f52b8e", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", - "targets": [ - ["id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] - ], - "value": "" + "command": "type", + "target": "id=root_metadataFilters_0_maxValidityInterval", + "targets": [], + "value": "PT1H" }, { "id": "8af1abb5-2c7a-4a4c-a8f7-0eb287100dde", "comment": "", @@ -966,61 +938,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "78967fb5-8f61-46ce-9c14-9b6ceb12b03a", - "comment": "", - "command": "click", - "target": "css=.mb-3:nth-child(2) .toggle-button", - "targets": [ - ["css=.mb-3:nth-child(2) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[14]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[2]/div/div/div/div/button", "xpath:position"], - ["xpath=//button[contains(.,'Options')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "5febc53d-9179-4a5e-81a2-6d00495e0953", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "8ba62572-354d-47f4-bb72-f9309c1cb201", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout-item-1", - "targets": [ - ["id=option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "753d2e1d-54cd-4edd-9718-3f875e617bc1", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" - }, { - "id": "d7406190-0bb0-4df8-9c0b-7e393952b6a2", - "comment": "", - "command": "click", - "target": "css=.mb-3:nth-child(3) .toggle-button", + "command": "type", + "target": "id=root_httpMetadataResolverAttributes_connectionRequestTimeout", "targets": [ - ["css=.form-group:nth-child(3) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[15]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[6]/div/div/div/div/div[2]/div[2]/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[2]/div[2]/div/div/div/button", "xpath:position"] + ["id=root_httpMetadataResolverAttributes_connectionRequestTimeout", "id"], + ["css=#root_httpMetadataResolverAttributes_connectionRequestTimeout", "css:finder"], + ["xpath=//input[@id='root_httpMetadataResolverAttributes_connectionRequestTimeout']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[2]/div/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT30S" }, { "id": "0fd359bb-a5d0-47f8-aa99-2cf2f32eae3d", "comment": "", @@ -1031,38 +961,16 @@ }, { "id": "337ac160-7990-425f-83da-2788d8a0985e", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout-item-2", - "targets": [ - ["id=option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout-item-2", "id"], - ["linkText=PT1M", "linkText"], - ["css=#option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout-item-2", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout-item-2']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout']/a[3]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[3]", "xpath:href"], - ["xpath=//a[3]", "xpath:position"], - ["xpath=//a[contains(.,'PT1M')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "bebea55c-1ac2-4556-ac7f-7e666731e569", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" - }, { - "id": "19182110-0f86-4601-ae12-0b90967ef68a", - "comment": "", - "command": "click", - "target": "css=.mb-3:nth-child(4) .toggle-button", + "command": "type", + "target": "id=root_httpMetadataResolverAttributes_connectionTimeout", "targets": [ - ["css=.mb-3:nth-child(4) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[18]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div[3]/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[3]/div/div/div/button", "xpath:position"] + ["id=root_httpMetadataResolverAttributes_connectionTimeout", "id"], + ["css=#root_httpMetadataResolverAttributes_connectionTimeout", "css:finder"], + ["xpath=//input[@id='root_httpMetadataResolverAttributes_connectionTimeout']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div[2]/div/div/input", "xpath:idRelative"], + ["xpath=//div[2]/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT1M" }, { "id": "c38b8d8d-e108-4895-bf2e-4cfc1fc28e5e", "comment": "", @@ -1073,19 +981,16 @@ }, { "id": "34693225-4754-4b27-92ee-3e37304a8cd7", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_httpMetadataResolverAttributes_socketTimeout-item-3", + "command": "type", + "target": "id=root_httpMetadataResolverAttributes_socketTimeout", "targets": [ - ["id=option-selector-items-root_httpMetadataResolverAttributes_socketTimeout-item-3", "id"], - ["linkText=PT10M", "linkText"], - ["css=#option-selector-items-root_httpMetadataResolverAttributes_socketTimeout-item-3", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_httpMetadataResolverAttributes_socketTimeout-item-3']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_httpMetadataResolverAttributes_socketTimeout']/a[4]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[4]", "xpath:href"], - ["xpath=//a[4]", "xpath:position"], - ["xpath=//a[contains(.,'PT10M')]", "xpath:innerText"] + ["id=root_httpMetadataResolverAttributes_socketTimeout", "id"], + ["css=#root_httpMetadataResolverAttributes_socketTimeout", "css:finder"], + ["xpath=//input[@id='root_httpMetadataResolverAttributes_socketTimeout']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div[3]/div/div/input", "xpath:idRelative"], + ["xpath=//div[3]/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT10M" }, { "id": "d9a9dcb4-bac1-4f5a-a822-047bd2941df0", "comment": "", @@ -1210,21 +1115,21 @@ ["xpath=//div[2]/div[2]/div/div[5]/div/span[2]", "xpath:position"] ], "value": "PT10M" - },{ - "id": "4ec2c493-85e4-403b-9b09-031c5728f498", - "comment": "", - "command": "open", - "target": "/api/heheheheheheheWipeout", - "targets": [], - "value": "" - }, { - "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", - "comment": "", - "command": "assertText", - "target": "css=body", - "targets": [], - "value": "yes, you did it" - }] + }, { + "id": "4ec2c493-85e4-403b-9b09-031c5728f498", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }] }], "suites": [{ "id": "894bbaf7-9978-4d30-b4e3-3c4263e084aa", diff --git a/backend/src/integration/resources/SHIBUI-1335-1.side b/backend/src/integration/resources/SHIBUI-1335-1.side index 0fe5e3d85..da5bd33c5 100644 --- a/backend/src/integration/resources/SHIBUI-1335-1.side +++ b/backend/src/integration/resources/SHIBUI-1335-1.side @@ -442,41 +442,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "363af92e-0327-47b9-918c-1560adab40cc", - "comment": "", - "command": "click", - "target": "css=.toggle-button", - "targets": [ - ["css=.toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[7]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "a14576bb-2d15-4e51-89c6-b8289311e58a", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "a4470d6f-04a7-4c4b-8c1e-70cff2f35e8a", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", + "command": "type", + "target": "id=root_metadataFilters_0_maxValidityInterval", "targets": [ - ["id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] + ["id=root_metadataFilters_0_maxValidityInterval", "id"], + ["css=#root_metadataFilters_0_maxValidityInterval", "css:finder"], + ["xpath=//input[@id='root_metadataFilters_0_maxValidityInterval']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] ], - "value": "" + "value": "PT15M" }, { "id": "4530c1b4-8f27-4272-9633-c792a3a54f90", "comment": "", @@ -1794,21 +1772,21 @@ ["xpath=//button[contains(.,'Entity Attributes Filter')]", "xpath:innerText"] ], "value": "Entity Attributes Filter" - },{ - "id": "4ec2c493-85e4-403b-9b09-031c5728f498", - "comment": "", - "command": "open", - "target": "/api/heheheheheheheWipeout", - "targets": [], - "value": "" - }, { - "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", - "comment": "", - "command": "assertText", - "target": "css=body", - "targets": [], - "value": "yes, you did it" - }] + }, { + "id": "4ec2c493-85e4-403b-9b09-031c5728f498", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }] }], "suites": [{ "id": "248ba015-77cd-430f-b973-d14fd4f39a27", diff --git a/backend/src/integration/resources/SHIBUI-1335-3.side b/backend/src/integration/resources/SHIBUI-1335-3.side index 6bacf58f8..562653b3f 100644 --- a/backend/src/integration/resources/SHIBUI-1335-3.side +++ b/backend/src/integration/resources/SHIBUI-1335-3.side @@ -233,60 +233,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "1a8a9dcf-9c6b-4802-8483-981d14131346", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(2) .toggle-button", - "targets": [ - ["css=.row:nth-child(2) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[8]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[2]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "2d40e408-16c8-4eba-ae11-bc836c534c58", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "443a9cfc-17c8-49da-9d87-bfabda8fd0b6", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-0", - "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-0", "id"], - ["linkText=PT0S", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-0", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-0']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration']/a", "xpath:idRelative"], - ["xpath=//a[contains(@href, '#')]", "xpath:href"], - ["xpath=//div[2]/a", "xpath:position"], - ["xpath=//a[contains(.,'PT0S')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "0b259df7-d713-4d4a-b9c3-ffe0b1c0ecf5", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" - }, { - "id": "84f35d35-ea9c-4a06-aaec-bee1c1922aec", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(3) > .col-12 > .mb-3 .toggle-button", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_minCacheDuration", "targets": [ - ["css=.row:nth-child(3) > .col-12 > .mb-3 .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[11]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[3]/div/div/div/div[3]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[3]/div/div/div/div/div/button", "xpath:position"] + ["id=root_dynamicMetadataResolverAttributes_minCacheDuration", "id"], + ["css=#root_dynamicMetadataResolverAttributes_minCacheDuration", "css:finder"], + ["xpath=//input[@id='root_dynamicMetadataResolverAttributes_minCacheDuration']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[3]/div/div/div/div[2]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[2]/div/div/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT30S" }, { "id": "032f1b9b-640c-4f77-a61a-3bc2127b447e", "comment": "", @@ -297,40 +256,12 @@ }, { "id": "c03be15d-ee34-4cd1-bac9-c52e3baa70a3", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-2", - "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-2", "id"], - ["linkText=PT1M", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-2", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-2']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration']/a[3]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[3]", "xpath:href"], - ["xpath=//a[3]", "xpath:position"], - ["xpath=//a[contains(.,'PT1M')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "508576b2-18ca-4360-ab90-fc0bf4b83cab", - "comment": "", - "command": "pause", - "target": "500", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_maxCacheDuration", "targets": [], - "value": "" - }, { - "id": "f0cdfbcf-46e2-4013-b085-0730b0127842", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(4) .toggle-button", - "targets": [ - ["css=.row:nth-child(4) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[12]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[4]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[4]/div/div/div/div/div/button", "xpath:position"] - ], - "value": "" + "value": "PT5M" }, { - "id": "6ac213ff-c86b-4724-9f80-a50989f00369", + "id": "508576b2-18ca-4360-ab90-fc0bf4b83cab", "comment": "", "command": "pause", "target": "500", @@ -339,19 +270,10 @@ }, { "id": "dd663319-7eef-4301-a0d4-24d9583eab7f", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-1", - "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] - ], - "value": "" + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_maxIdleEntityData", + "targets": [], + "value": "PT10M" }, { "id": "25ed1d75-be93-4e20-88ba-57d8ae7bf053", "comment": "", @@ -372,41 +294,13 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "54df6d88-1a85-407f-935a-a016f5952a93", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(6) .toggle-button", - "targets": [ - ["css=.row:nth-child(6) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[15]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[6]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[6]/div/div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "9a756ef8-7633-43c2-ac27-48f2bd41ad15", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "e7f2439a-e9a1-4b23-b0b9-d992f5b477d4", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3", - "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3", "id"], - ["linkText=PT10M", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval']/a[4]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[4]", "xpath:href"], - ["xpath=//a[4]", "xpath:position"], - ["xpath=//a[contains(.,'PT10M')]", "xpath:innerText"] - ], - "value": "" + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_cleanupTaskInterval", + "targets": [], + "value": "PT5M" }, { "id": "64af203b-565c-4e35-b7da-4646423a3279", "comment": "", @@ -486,20 +380,20 @@ ], "value": "LocalDynamicMetadataResolver" }, { - "id": "4ec2c493-85e4-403b-9b09-031c5728f498", - "comment": "", - "command": "open", - "target": "/api/heheheheheheheWipeout", - "targets": [], - "value": "" - }, { - "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", - "comment": "", - "command": "assertText", - "target": "css=body", - "targets": [], - "value": "yes, you did it" - }] + "id": "4ec2c493-85e4-403b-9b09-031c5728f498", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }] }], "suites": [{ "id": "248ba015-77cd-430f-b973-d14fd4f39a27", diff --git a/backend/src/integration/resources/SHIBUI-1335-4.side b/backend/src/integration/resources/SHIBUI-1335-4.side index be3350514..93b6bfcfd 100644 --- a/backend/src/integration/resources/SHIBUI-1335-4.side +++ b/backend/src/integration/resources/SHIBUI-1335-4.side @@ -298,60 +298,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "a51172e3-792f-4881-8083-efcb34c63e56", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(2) .toggle-button", - "targets": [ - ["css=.row:nth-child(2) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[8]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[2]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "07e1ade9-022c-4458-ba65-b7eecb4f8c0b", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "b1ec3405-0d75-45d6-8986-51c2f09c4dc4", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-1", - "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "c64e2180-1b40-4bb9-8910-25a51438f27c", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" - }, { - "id": "2793bf1b-177b-461f-b06c-0a584ab6eaf0", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(3) > .col-12 > .mb-3 .toggle-button", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_minCacheDuration", "targets": [ - ["css=.row:nth-child(3) > .col-12 > .mb-3 .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[11]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[3]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[3]/div/div/div/div/div/button", "xpath:position"] + ["id=root_dynamicMetadataResolverAttributes_minCacheDuration", "id"], + ["css=#root_dynamicMetadataResolverAttributes_minCacheDuration", "css:finder"], + ["xpath=//input[@id='root_dynamicMetadataResolverAttributes_minCacheDuration']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[2]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[2]/div/div/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT30S" }, { "id": "dc45395b-a584-4b7d-8c12-b6d0e669031a", "comment": "", @@ -362,40 +321,12 @@ }, { "id": "87084a6a-8e89-4c00-a3d9-c104107a3ba2", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-3", - "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-3", "id"], - ["linkText=PT10M", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-3", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-3']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration']/a[4]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[4]", "xpath:href"], - ["xpath=//a[4]", "xpath:position"], - ["xpath=//a[contains(.,'PT10M')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "239001d8-35ff-41d0-95cf-7e81917a9e19", - "comment": "", - "command": "pause", - "target": "500", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_maxCacheDuration", "targets": [], - "value": "" - }, { - "id": "4c017bde-e242-4d2f-838e-a2a026e4292b", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(4) .toggle-button", - "targets": [ - ["css=.row:nth-child(4) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[12]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[4]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[4]/div/div/div/div/div/button", "xpath:position"] - ], - "value": "" + "value": "PT5M" }, { - "id": "57ea5bd7-1ee0-41d9-b39e-56aeddeec7a0", + "id": "239001d8-35ff-41d0-95cf-7e81917a9e19", "comment": "", "command": "pause", "target": "500", @@ -404,40 +335,12 @@ }, { "id": "d477fd6a-2c15-4fb6-a199-d49aa495ef94", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-2", - "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-2", "id"], - ["linkText=PT1M", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-2", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-2']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData']/a[3]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[3]", "xpath:href"], - ["xpath=//a[3]", "xpath:position"], - ["xpath=//a[contains(.,'PT1M')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "0783a0de-0a8d-4cc2-adc4-6ed94f277298", - "comment": "", - "command": "pause", - "target": "500", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_maxIdleEntityData", "targets": [], - "value": "" - }, { - "id": "62f7ce3c-5cff-43c6-8ce6-a0e6bf2b2257", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(6) .toggle-button", - "targets": [ - ["css=.row:nth-child(6) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[15]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[6]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[6]/div/div/div/div/div/button", "xpath:position"] - ], - "value": "" + "value": "PT10M" }, { - "id": "a155f0af-2dd4-4906-a783-19a99d23a6a8", + "id": "0783a0de-0a8d-4cc2-adc4-6ed94f277298", "comment": "", "command": "pause", "target": "500", @@ -446,19 +349,16 @@ }, { "id": "bf855df4-326e-484e-9022-d2c84e09e6f3", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_cleanupTaskInterval", "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3", "id"], - ["linkText=PT10M", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval']/a[4]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[4]", "xpath:href"], - ["xpath=//a[4]", "xpath:position"], - ["xpath=//a[contains(.,'PT10M')]", "xpath:innerText"] + ["id=root_dynamicMetadataResolverAttributes_cleanupTaskInterval", "id"], + ["css=#root_dynamicMetadataResolverAttributes_cleanupTaskInterval", "css:finder"], + ["xpath=//input[@id='root_dynamicMetadataResolverAttributes_cleanupTaskInterval']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[6]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[6]/div/div/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT15M" }, { "id": "44e50478-4b65-420f-8f29-7ecb6c70c856", "comment": "", @@ -530,41 +430,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "b777b343-71a0-4056-a85e-d8d548b993b2", - "comment": "", - "command": "click", - "target": "css=.toggle-button", - "targets": [ - ["css=.toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[7]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "7a7f2f9c-0f95-4a5c-89c3-299a212f2fb9", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "22f7bf37-718c-4126-867b-67a383eefff5", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-2", + "command": "type", + "target": "id=root_metadataFilters_0_maxValidityInterval", "targets": [ - ["id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-2", "id"], - ["linkText=PT1M", "linkText"], - ["css=#option-selector-items-root_metadataFilters_0_maxValidityInterval-item-2", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval-item-2']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval']/a[3]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[3]", "xpath:href"], - ["xpath=//a[3]", "xpath:position"], - ["xpath=//a[contains(.,'PT1M')]", "xpath:innerText"] + ["id=root_metadataFilters_0_maxValidityInterval", "id"], + ["css=#root_metadataFilters_0_maxValidityInterval", "css:finder"], + ["xpath=//input[@id='root_metadataFilters_0_maxValidityInterval']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] ], - "value": "" + "value": "PT15M" }, { "id": "5320f384-0881-4e7a-b89f-33a57efb22ba", "comment": "", @@ -1203,21 +1081,21 @@ ["xpath=//td[contains(.,'EntityAttributes')]", "xpath:innerText"] ], "value": "EntityAttributes" - },{ - "id": "4ec2c493-85e4-403b-9b09-031c5728f498", - "comment": "", - "command": "open", - "target": "/api/heheheheheheheWipeout", - "targets": [], - "value": "" - }, { - "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", - "comment": "", - "command": "assertText", - "target": "css=body", - "targets": [], - "value": "yes, you did it" - }] + }, { + "id": "4ec2c493-85e4-403b-9b09-031c5728f498", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }] }], "suites": [{ "id": "248ba015-77cd-430f-b973-d14fd4f39a27", diff --git a/backend/src/integration/resources/SHIBUI-1352-1.side b/backend/src/integration/resources/SHIBUI-1352-1.side index 7640259c7..3b4f07eff 100644 --- a/backend/src/integration/resources/SHIBUI-1352-1.side +++ b/backend/src/integration/resources/SHIBUI-1352-1.side @@ -259,41 +259,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "59ca3a2c-b9da-4ac6-9b44-d44271355659", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(2) .toggle-button", - "targets": [ - ["css=.row:nth-child(2) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[8]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[2]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "bf63096b-b796-4a70-bc98-96a18dc0531e", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "8db04a8f-565a-4fa9-b5c0-8ce4b200b11c", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-1", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_minCacheDuration", "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] + ["id=root_dynamicMetadataResolverAttributes_minCacheDuration", "id"], + ["css=#root_dynamicMetadataResolverAttributes_minCacheDuration", "css:finder"], + ["xpath=//input[@id='root_dynamicMetadataResolverAttributes_minCacheDuration']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[3]/div/div/div/div[2]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[2]/div/div/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT30S" }, { "id": "33586d4c-c18b-4081-add7-43ef4d6d8ef8", "comment": "", @@ -301,60 +279,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "a5274853-084e-438f-8cea-9a74e55fd0b9", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(3) > .col-12 > .mb-3 .toggle-button", - "targets": [ - ["css=.row:nth-child(3) > .col-12 > .mb-3 .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[11]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[3]/div/div/div/div[3]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[3]/div/div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "e5c5f95e-79df-4782-82d1-11c96bec4651", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "bf7f5914-5aad-485a-8af0-aa510605e1dc", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-3", - "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-3", "id"], - ["linkText=PT10M", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-3", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-3']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration']/a[4]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[4]", "xpath:href"], - ["xpath=//a[4]", "xpath:position"], - ["xpath=//a[contains(.,'PT10M')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "3e4b2db4-f2b8-4d4e-ae6b-17741831dc84", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" - }, { - "id": "b2bd8d25-4f3c-47b2-a070-53a364840916", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(4) .toggle-button", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_maxCacheDuration", "targets": [ - ["css=.row:nth-child(4) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[12]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[4]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[4]/div/div/div/div/div/button", "xpath:position"] + ["id=root_dynamicMetadataResolverAttributes_maxCacheDuration", "id"], + ["css=#root_dynamicMetadataResolverAttributes_maxCacheDuration", "css:finder"], + ["xpath=//input[@id='root_dynamicMetadataResolverAttributes_maxCacheDuration']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[3]/div/div/div/div[3]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[3]/div/div/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT5M" }, { "id": "2f6feb3c-fc51-410b-abe0-97a4c1a5aa6a", "comment": "", @@ -365,19 +302,16 @@ }, { "id": "9a411cfc-479d-4951-aab2-e8d09ba64b4e", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-5", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_maxIdleEntityData", "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-5", "id"], - ["linkText=PT1H", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-5", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-5']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData']/a[6]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[6]", "xpath:href"], - ["xpath=//a[6]", "xpath:position"], - ["xpath=//a[contains(.,'PT1H')]", "xpath:innerText"] + ["id=root_dynamicMetadataResolverAttributes_maxIdleEntityData", "id"], + ["css=#root_dynamicMetadataResolverAttributes_maxIdleEntityData", "css:finder"], + ["xpath=//input[@id='root_dynamicMetadataResolverAttributes_maxIdleEntityData']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[3]/div/div/div/div[4]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[4]/div/div/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT10M" }, { "id": "1176d384-4b0c-4a67-8e43-6cc3cbbcff73", "comment": "", @@ -398,41 +332,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "ae32fb25-67b1-469b-9f23-3cbca895b956", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(6) .toggle-button", - "targets": [ - ["css=.row:nth-child(6) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[15]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[6]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[6]/div/div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "b874867f-a32d-43f8-998b-e99488257fe6", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "c30bf781-4d5d-46ad-9bbc-4a5165788870", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-1", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_cleanupTaskInterval", "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] + ["id=root_dynamicMetadataResolverAttributes_cleanupTaskInterval", "id"], + ["css=#root_dynamicMetadataResolverAttributes_cleanupTaskInterval", "css:finder"], + ["xpath=//input[@id='root_dynamicMetadataResolverAttributes_cleanupTaskInterval']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[3]/div/div/div/div[6]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[6]/div/div/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT5M" }, { "id": "1202602e-9311-4c3c-b836-9a433cbbcd8c", "comment": "", @@ -495,21 +407,21 @@ ["xpath=//td[contains(.,'LocalDynamicMetadataResolver')]", "xpath:innerText"] ], "value": "LocalDynamicMetadataResolver" - },{ - "id": "4ec2c493-85e4-403b-9b09-031c5728f498", - "comment": "", - "command": "open", - "target": "/api/heheheheheheheWipeout", - "targets": [], - "value": "" - }, { - "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", - "comment": "", - "command": "assertText", - "target": "css=body", - "targets": [], - "value": "yes, you did it" - }] + }, { + "id": "4ec2c493-85e4-403b-9b09-031c5728f498", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }] }], "suites": [{ "id": "537e85aa-f94d-4fef-bc13-2ecdf5132fa2", diff --git a/backend/src/integration/resources/SHIBUI-1361.side b/backend/src/integration/resources/SHIBUI-1361.side index 98197ddf4..7e05b232e 100644 --- a/backend/src/integration/resources/SHIBUI-1361.side +++ b/backend/src/integration/resources/SHIBUI-1361.side @@ -462,41 +462,13 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "bb542739-db7f-4386-8d46-3438f7afd4e1", - "comment": "", - "command": "click", - "target": "css=.toggle-button", - "targets": [ - ["css=.toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[7]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "763ce787-9ee8-4c78-bff0-d4ad94dff963", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "b8d999f1-0c59-4a9a-9991-91d222f52b8e", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", - "targets": [ - ["id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] - ], - "value": "" + "command": "type", + "target": "id=root_metadataFilters_0_maxValidityInterval", + "targets": [], + "value": "PT15M" }, { "id": "8af1abb5-2c7a-4a4c-a8f7-0eb287100dde", "comment": "", @@ -1026,63 +998,15 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "d00ecf98-7425-467c-acbb-3b39918e3462", - "comment": "", - "command": "click", - "target": "css=.mb-3:nth-child(2) .toggle-button", - "targets": [ - ["css=.mb-3:nth-child(2) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[14]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[2]/div/div/div/div/button", "xpath:position"], - ["xpath=//button[contains(.,'Options')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "7379d277-790e-47ca-b74c-fc73cc2d8a42", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "8ba62572-354d-47f4-bb72-f9309c1cb201", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout-item-1", - "targets": [ - ["id=option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "8497a440-4e0c-4589-aaf8-f530dbefb3c7", - "comment": "", - "command": "pause", - "target": "500", + "command": "type", + "target": "id=root_httpMetadataResolverAttributes_connectionRequestTimeout", "targets": [], - "value": "" - }, { - "id": "d7406190-0bb0-4df8-9c0b-7e393952b6a2", - "comment": "", - "command": "click", - "target": "css=.mb-3:nth-child(3) .toggle-button", - "targets": [ - ["css=.mb-3:nth-child(3) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[16]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div[2]/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[2]/div[2]/div/div/div/button", "xpath:position"] - ], - "value": "" + "value": "PT30S" }, { - "id": "655375ab-b3e4-449e-acfa-577b0ab4957e", + "id": "8497a440-4e0c-4589-aaf8-f530dbefb3c7", "comment": "", "command": "pause", "target": "500", @@ -1091,38 +1015,10 @@ }, { "id": "337ac160-7990-425f-83da-2788d8a0985e", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout-item-2", - "targets": [ - ["id=option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout-item-2", "id"], - ["linkText=PT1M", "linkText"], - ["css=#option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout-item-2", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout-item-2']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout']/a[3]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[3]", "xpath:href"], - ["xpath=//a[3]", "xpath:position"], - ["xpath=//a[contains(.,'PT1M')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "855e85a8-d8c3-4b72-ae8a-763f2d86869a", - "comment": "", - "command": "pause", - "target": "500", + "command": "type", + "target": "id=root_httpMetadataResolverAttributes_connectionTimeout", "targets": [], - "value": "" - }, { - "id": "19182110-0f86-4601-ae12-0b90967ef68a", - "comment": "", - "command": "click", - "target": "css=.mb-3:nth-child(4) .toggle-button", - "targets": [ - ["css=.mb-3:nth-child(4) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[18]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div[3]/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[3]/div/div/div/button", "xpath:position"] - ], - "value": "" + "value": "PT1M" }, { "id": "d0befeb0-e5e2-4233-803e-8c417ca570a0", "comment": "", @@ -1133,19 +1029,16 @@ }, { "id": "34693225-4754-4b27-92ee-3e37304a8cd7", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_httpMetadataResolverAttributes_socketTimeout-item-3", + "command": "type", + "target": "id=root_httpMetadataResolverAttributes_socketTimeout", "targets": [ - ["id=option-selector-items-root_httpMetadataResolverAttributes_socketTimeout-item-3", "id"], - ["linkText=PT10M", "linkText"], - ["css=#option-selector-items-root_httpMetadataResolverAttributes_socketTimeout-item-3", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_httpMetadataResolverAttributes_socketTimeout-item-3']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_httpMetadataResolverAttributes_socketTimeout']/a[4]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[4]", "xpath:href"], - ["xpath=//a[4]", "xpath:position"], - ["xpath=//a[contains(.,'PT10M')]", "xpath:innerText"] + ["id=root_httpMetadataResolverAttributes_socketTimeout", "id"], + ["css=#root_httpMetadataResolverAttributes_socketTimeout", "css:finder"], + ["xpath=//input[@id='root_httpMetadataResolverAttributes_socketTimeout']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div[3]/div/div/input", "xpath:idRelative"], + ["xpath=//div[3]/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT10M" }, { "id": "d9a9dcb4-bac1-4f5a-a822-047bd2941df0", "comment": "", @@ -1411,21 +1304,21 @@ "target": "rightDateIsDate", "targets": [], "value": "true" - },{ - "id": "4ec2c493-85e4-403b-9b09-031c5728f498", - "comment": "", - "command": "open", - "target": "/api/heheheheheheheWipeout", - "targets": [], - "value": "" - }, { - "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", - "comment": "", - "command": "assertText", - "target": "css=body", - "targets": [], - "value": "yes, you did it" - }] + }, { + "id": "4ec2c493-85e4-403b-9b09-031c5728f498", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }] }], "suites": [{ "id": "894bbaf7-9978-4d30-b4e3-3c4263e084aa", diff --git a/backend/src/integration/resources/SHIBUI-1364-1.side b/backend/src/integration/resources/SHIBUI-1364-1.side index df47a6250..8fe9da05e 100644 --- a/backend/src/integration/resources/SHIBUI-1364-1.side +++ b/backend/src/integration/resources/SHIBUI-1364-1.side @@ -464,34 +464,13 @@ "target": "1500", "targets": [], "value": "" - }, { - "id": "a4ff078a-48ec-47c6-a67f-f562f7a2b02c", - "comment": "", - "command": "click", - "target": "css=.toggle-button", - "targets": [ - ["css=.toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[7]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div/div/div/div/button", "xpath:position"] - ], - "value": "" }, { "id": "a4470d6f-04a7-4c4b-8c1e-70cff2f35e8a", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", - "targets": [ - ["id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] - ], - "value": "" + "command": "type", + "target": "id=root_metadataFilters_0_maxValidityInterval", + "targets": [], + "value": "PT30M" }, { "id": "4530c1b4-8f27-4272-9633-c792a3a54f90", "comment": "", @@ -2055,7 +2034,7 @@ ["xpath=//div[8]/div/span[2]", "xpath:position"], ["xpath=//span[contains(.,'PT1M')]", "xpath:innerText"] ], - "value": "PT1M" + "value": "PT30S" }, { "id": "1f3e3d25-ea44-4110-913c-c6dc9a7ec215", "comment": "", @@ -2099,7 +2078,7 @@ ["xpath=//div[2]/div/span[2]", "xpath:position"], ["xpath=//span[contains(.,'PT1M')]", "xpath:innerText"] ], - "value": "PT1M" + "value": "PT30S" }, { "id": "0b097967-1b4e-40cc-b8d7-bd0529fd46d2", "comment": "", @@ -2351,13 +2330,22 @@ ["xpath=//button[contains(.,'Compare Selected(2)')]", "xpath:innerText"] ], "value": "" + }, { + "id": "9ddfc4d9-0fbd-44f2-8584-4d7fcb6d0c6b", + "comment": "", + "command": "waitForElementEditable", + "target": "css=#filters > div:nth-child(3) > div:nth-child(2) > div > button", + "targets": [ + ["css=.d-flex:nth-child(3) > .border-primary:nth-child(2) .svg-inline--fa", "css:finder"] + ], + "value": "30000" }, { "id": "2ff5a597-9fe0-46b4-9ca5-63123ddb3cef", "comment": "", "command": "click", - "target": "xpath=//section/div/div/div[4]/div[2]/div/button", + "target": "css=#filters > div:nth-child(3) > div:nth-child(2) > div > button", "targets": [ - ["css=.border-primary:nth-child(2) .fa-square", "css:finder"] + ["css=.d-flex:nth-child(3) > .border-primary:nth-child(2) .svg-inline--fa", "css:finder"] ], "value": "" }, { @@ -2377,40 +2365,40 @@ "id": "d7b5550d-1db8-4fa5-800f-fde753413c13", "comment": "", "command": "assertText", - "target": "css=.mb-4:nth-child(8) .p-2 > div > div:nth-child(1) .d-block:nth-child(2)", + "target": "css=.bg-diff > .d-block:nth-child(2)", "targets": [ - ["css=.mb-4:nth-child(8) .p-2 > div > div:nth-child(1) .d-block:nth-child(2)", "css:finder"], - ["xpath=//div[@id='root']/div/main/div/section/div/div/section[5]/div/div[2]/div[2]/div/div/span[2]", "xpath:idRelative"], - ["xpath=//section[5]/div/div[2]/div[2]/div/div/span[2]", "xpath:position"], - ["xpath=//span[contains(.,'Entity Attributes Filter')]", "xpath:innerText"] + ["css=.bg-diff > .d-block:nth-child(2)", "css:finder"], + ["xpath=//div[@id='filters']/section/div/div[2]/div[2]/div/div/span[2]", "xpath:idRelative"], + ["xpath=//div[2]/section/div/div[2]/div[2]/div/div/span[2]", "xpath:position"], + ["xpath=//span[contains(.,'Entity Attributes Filter Version 2')]", "xpath:innerText"] ], "value": "Entity Attributes Filter Version 2" }, { "id": "ad797f09-746e-4778-954e-6f92ac5934ea", "comment": "", "command": "assertText", - "target": "css=.mb-4:nth-child(8) .p-2 > div > div:nth-child(1) .d-block:nth-child(3)", + "target": "css=.bg-diff > .d-block:nth-child(3)", "targets": [ - ["css=.mb-4:nth-child(8) .p-2 > div > div:nth-child(1) .d-block:nth-child(3)", "css:finder"], - ["xpath=//div[@id='root']/div/main/div/section/div/div/section[5]/div/div[2]/div[2]/div/div/span[3]", "xpath:idRelative"], - ["xpath=//section[5]/div/div[2]/div[2]/div/div/span[3]", "xpath:position"] + ["css=.bg-diff > .d-block:nth-child(3)", "css:finder"], + ["xpath=//div[@id='filters']/section/div/div[2]/div[2]/div/div/span[3]", "xpath:idRelative"], + ["xpath=//div[2]/section/div/div[2]/div[2]/div/div/span[3]", "xpath:position"] ], "value": "Entity Attributes Filter" - },{ - "id": "4ec2c493-85e4-403b-9b09-031c5728f498", - "comment": "", - "command": "open", - "target": "/api/heheheheheheheWipeout", - "targets": [], - "value": "" - }, { - "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", - "comment": "", - "command": "assertText", - "target": "css=body", - "targets": [], - "value": "yes, you did it" - }] + }, { + "id": "4ec2c493-85e4-403b-9b09-031c5728f498", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }] }], "suites": [{ "id": "248ba015-77cd-430f-b973-d14fd4f39a27", diff --git a/backend/src/integration/resources/SHIBUI-1364-3.side b/backend/src/integration/resources/SHIBUI-1364-3.side index f9dbee088..48116451c 100644 --- a/backend/src/integration/resources/SHIBUI-1364-3.side +++ b/backend/src/integration/resources/SHIBUI-1364-3.side @@ -226,60 +226,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "1a8a9dcf-9c6b-4802-8483-981d14131346", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(2) .toggle-button", - "targets": [ - ["css=.row:nth-child(2) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[8]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[2]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "2d40e408-16c8-4eba-ae11-bc836c534c58", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "443a9cfc-17c8-49da-9d87-bfabda8fd0b6", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-0", - "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-0", "id"], - ["linkText=PT0S", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-0", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-0']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration']/a", "xpath:idRelative"], - ["xpath=//a[contains(@href, '#')]", "xpath:href"], - ["xpath=//div[2]/a", "xpath:position"], - ["xpath=//a[contains(.,'PT0S')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "0b259df7-d713-4d4a-b9c3-ffe0b1c0ecf5", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" - }, { - "id": "84f35d35-ea9c-4a06-aaec-bee1c1922aec", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(3) > .col-12 > .mb-3 .toggle-button", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_minCacheDuration", "targets": [ - ["css=.row:nth-child(3) > .col-12 > .mb-3 .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[11]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[3]/div/div/div/div[3]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[3]/div/div/div/div/div/button", "xpath:position"] + ["id=root_dynamicMetadataResolverAttributes_minCacheDuration", "id"], + ["css=#root_dynamicMetadataResolverAttributes_minCacheDuration", "css:finder"], + ["xpath=//input[@id='root_dynamicMetadataResolverAttributes_minCacheDuration']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[3]/div/div/div/div[2]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[2]/div/div/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT30S" }, { "id": "032f1b9b-640c-4f77-a61a-3bc2127b447e", "comment": "", @@ -290,19 +249,16 @@ }, { "id": "c03be15d-ee34-4cd1-bac9-c52e3baa70a3", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-2", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_maxCacheDuration", "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-2", "id"], - ["linkText=PT1M", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-2", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-2']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration']/a[3]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[3]", "xpath:href"], - ["xpath=//a[3]", "xpath:position"], - ["xpath=//a[contains(.,'PT1M')]", "xpath:innerText"] + ["id=root_dynamicMetadataResolverAttributes_maxCacheDuration", "id"], + ["css=#root_dynamicMetadataResolverAttributes_maxCacheDuration", "css:finder"], + ["xpath=//input[@id='root_dynamicMetadataResolverAttributes_maxCacheDuration']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[3]/div/div/div/div[3]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[3]/div/div/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT1M" }, { "id": "508576b2-18ca-4360-ab90-fc0bf4b83cab", "comment": "", @@ -310,41 +266,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "f0cdfbcf-46e2-4013-b085-0730b0127842", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(4) .toggle-button", - "targets": [ - ["css=.row:nth-child(4) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[12]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[4]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[4]/div/div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "6ac213ff-c86b-4724-9f80-a50989f00369", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "dd663319-7eef-4301-a0d4-24d9583eab7f", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-1", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_maxIdleEntityData", "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] + ["id=root_dynamicMetadataResolverAttributes_maxIdleEntityData", "id"], + ["css=#root_dynamicMetadataResolverAttributes_maxIdleEntityData", "css:finder"], + ["xpath=//input[@id='root_dynamicMetadataResolverAttributes_maxIdleEntityData']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[3]/div/div/div/div[4]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[4]/div/div/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT5M" }, { "id": "25ed1d75-be93-4e20-88ba-57d8ae7bf053", "comment": "", @@ -365,41 +299,13 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "54df6d88-1a85-407f-935a-a016f5952a93", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(6) .toggle-button", - "targets": [ - ["css=.row:nth-child(6) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[15]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[6]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[6]/div/div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "9a756ef8-7633-43c2-ac27-48f2bd41ad15", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "e7f2439a-e9a1-4b23-b0b9-d992f5b477d4", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3", - "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3", "id"], - ["linkText=PT10M", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval']/a[4]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[4]", "xpath:href"], - ["xpath=//a[4]", "xpath:position"], - ["xpath=//a[contains(.,'PT10M')]", "xpath:innerText"] - ], - "value": "" + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_cleanupTaskInterval", + "targets": [], + "value": "PT15M" }, { "id": "64af203b-565c-4e35-b7da-4646423a3279", "comment": "", @@ -694,21 +600,21 @@ ["xpath=//div[3]/div/span[3]", "xpath:position"] ], "value": "12345" - },{ - "id": "4ec2c493-85e4-403b-9b09-031c5728f498", - "comment": "", - "command": "open", - "target": "/api/heheheheheheheWipeout", - "targets": [], - "value": "" - }, { - "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", - "comment": "", - "command": "assertText", - "target": "css=body", - "targets": [], - "value": "yes, you did it" - }] + }, { + "id": "4ec2c493-85e4-403b-9b09-031c5728f498", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }] }], "suites": [{ "id": "248ba015-77cd-430f-b973-d14fd4f39a27", diff --git a/backend/src/integration/resources/SHIBUI-1364-4.side b/backend/src/integration/resources/SHIBUI-1364-4.side index c74e2182a..3384d27ea 100644 --- a/backend/src/integration/resources/SHIBUI-1364-4.side +++ b/backend/src/integration/resources/SHIBUI-1364-4.side @@ -282,60 +282,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "a51172e3-792f-4881-8083-efcb34c63e56", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(2) .toggle-button", - "targets": [ - ["css=.row:nth-child(2) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[8]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[2]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "07e1ade9-022c-4458-ba65-b7eecb4f8c0b", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "b1ec3405-0d75-45d6-8986-51c2f09c4dc4", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-1", - "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_minCacheDuration']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "c64e2180-1b40-4bb9-8910-25a51438f27c", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" - }, { - "id": "2793bf1b-177b-461f-b06c-0a584ab6eaf0", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(3) > .col-12 > .mb-3 .toggle-button", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_minCacheDuration", "targets": [ - ["css=.row:nth-child(3) > .col-12 > .mb-3 .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[11]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[3]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[3]/div/div/div/div/div/button", "xpath:position"] + ["id=root_dynamicMetadataResolverAttributes_minCacheDuration", "id"], + ["css=#root_dynamicMetadataResolverAttributes_minCacheDuration", "css:finder"], + ["xpath=//input[@id='root_dynamicMetadataResolverAttributes_minCacheDuration']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[2]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[2]/div/div/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT30S" }, { "id": "dc45395b-a584-4b7d-8c12-b6d0e669031a", "comment": "", @@ -346,38 +305,16 @@ }, { "id": "87084a6a-8e89-4c00-a3d9-c104107a3ba2", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-3", - "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-3", "id"], - ["linkText=PT10M", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-3", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration-item-3']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxCacheDuration']/a[4]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[4]", "xpath:href"], - ["xpath=//a[4]", "xpath:position"], - ["xpath=//a[contains(.,'PT10M')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "239001d8-35ff-41d0-95cf-7e81917a9e19", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" - }, { - "id": "4c017bde-e242-4d2f-838e-a2a026e4292b", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(4) .toggle-button", + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_maxCacheDuration", "targets": [ - ["css=.row:nth-child(4) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[12]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[4]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[4]/div/div/div/div/div/button", "xpath:position"] + ["id=root_dynamicMetadataResolverAttributes_maxCacheDuration", "id"], + ["css=#root_dynamicMetadataResolverAttributes_maxCacheDuration", "css:finder"], + ["xpath=//input[@id='root_dynamicMetadataResolverAttributes_maxCacheDuration']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[3]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[3]/div/div/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT5M" }, { "id": "57ea5bd7-1ee0-41d9-b39e-56aeddeec7a0", "comment": "", @@ -388,19 +325,10 @@ }, { "id": "d477fd6a-2c15-4fb6-a199-d49aa495ef94", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-2", - "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-2", "id"], - ["linkText=PT1M", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-2", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData-item-2']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_maxIdleEntityData']/a[3]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[3]", "xpath:href"], - ["xpath=//a[3]", "xpath:position"], - ["xpath=//a[contains(.,'PT1M')]", "xpath:innerText"] - ], - "value": "" + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_maxIdleEntityData", + "targets": [], + "value": "PT15M" }, { "id": "0783a0de-0a8d-4cc2-adc4-6ed94f277298", "comment": "", @@ -421,41 +349,13 @@ ["xpath=//div[2]/input", "xpath:position"] ], "value": "" - }, { - "id": "62f7ce3c-5cff-43c6-8ce6-a0e6bf2b2257", - "comment": "", - "command": "click", - "target": "css=.row:nth-child(6) .toggle-button", - "targets": [ - ["css=.row:nth-child(6) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[15]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div[6]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[6]/div/div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "a155f0af-2dd4-4906-a783-19a99d23a6a8", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "bf855df4-326e-484e-9022-d2c84e09e6f3", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3", - "targets": [ - ["id=option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3", "id"], - ["linkText=PT10M", "linkText"], - ["css=#option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval-item-3']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_dynamicMetadataResolverAttributes_cleanupTaskInterval']/a[4]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[4]", "xpath:href"], - ["xpath=//a[4]", "xpath:position"], - ["xpath=//a[contains(.,'PT10M')]", "xpath:innerText"] - ], - "value": "" + "command": "type", + "target": "id=root_dynamicMetadataResolverAttributes_cleanupTaskInterval", + "targets": [], + "value": "PT30M" }, { "id": "df2a3e70-d7d3-487b-a205-218e9987b060", "comment": "", @@ -512,42 +412,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "b777b343-71a0-4056-a85e-d8d548b993b2", - "comment": "", - "command": "click", - "target": "css=.btn-outline-secondary", - "targets": [ - ["css=.btn-outline-secondary", "css:finder"], - ["xpath=(//button[@type='button'])[2]", "xpath:attributes"], - ["xpath=//div[@id='/metadataFilters/RequiredValidUntil/maxValidityInterval-container']/div/div/button", "xpath:idRelative"], - ["xpath=//div/button", "xpath:position"], - ["xpath=//button[contains(.,'Toggle Dropdown')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "7a7f2f9c-0f95-4a5c-89c3-299a212f2fb9", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "22f7bf37-718c-4126-867b-67a383eefff5", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-2", + "command": "type", + "target": "id=root_metadataFilters_0_maxValidityInterval", "targets": [ - ["id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-2", "id"], - ["linkText=PT1M", "linkText"], - ["css=#option-selector-items-root_metadataFilters_0_maxValidityInterval-item-2", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval-item-2']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval']/a[3]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[3]", "xpath:href"], - ["xpath=//a[3]", "xpath:position"], - ["xpath=//a[contains(.,'PT1M')]", "xpath:innerText"] + ["id=root_metadataFilters_0_maxValidityInterval", "id"], + ["css=#root_metadataFilters_0_maxValidityInterval", "css:finder"], + ["xpath=//input[@id='root_metadataFilters_0_maxValidityInterval']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] ], - "value": "" + "value": "PT20M" }, { "id": "5320f384-0881-4e7a-b89f-33a57efb22ba", "comment": "", @@ -1540,23 +1417,14 @@ ["xpath=//input", "xpath:position"] ], "value": "" - }, { - "id": "e83dc2da-ad95-4e50-b969-57721eb8f1dc", - "comment": "", - "command": "click", - "target": "css=.d-flex:nth-child(5) > .border-primary:nth-child(2) .svg-inline--fa", - "targets": [ - ["css=.d-flex:nth-child(5) > .border-primary:nth-child(2) .svg-inline--fa", "css:finder"] - ], - "value": "" }, { "id": "c2102a31-6e18-4d6c-8146-e23459403b65", "comment": "", "command": "assertText", - "target": "css=.border-primary:nth-child(2) > .bg-primary-light .mb-0:nth-child(1)", + "target": "css=.d-flex:nth-child(3) > .border-primary:nth-child(2) .mb-0:nth-child(1)", "targets": [ - ["css=.border-primary:nth-child(2) > .bg-primary-light .mb-0:nth-child(1)", "css:finder"], - ["xpath=//div[@id='root']/div/main/div/section/div/div/div[4]/div[2]/div/div/p", "xpath:idRelative"], + ["css=.d-flex:nth-child(3) > .border-primary:nth-child(2) .mb-0:nth-child(1)", "css:finder"], + ["xpath=//div[@id='filters']/div[3]/div[2]/div/div/p", "xpath:idRelative"], ["xpath=//p", "xpath:position"], ["xpath=//p[contains(.,'Entity Attributes Filter V2')]", "xpath:innerText"] ], @@ -1565,28 +1433,28 @@ "id": "cac6c125-c81b-40af-ae21-2b717df9511e", "comment": "", "command": "assertText", - "target": "css=.border-primary:nth-child(3) > .bg-primary-light .mb-0:nth-child(1)", + "target": "css=.d-flex:nth-child(3) .bg-lighter .mb-0:nth-child(1)", "targets": [ - ["css=.border-primary:nth-child(3) > .bg-primary-light .mb-0:nth-child(1)", "css:finder"], - ["xpath=//div[@id='root']/div/main/div/section/div/div/div[4]/div[3]/div/div/p", "xpath:idRelative"], + ["css=.d-flex:nth-child(3) .bg-lighter .mb-0:nth-child(1)", "css:finder"], + ["xpath=//div[@id='filters']/div[3]/div[3]/div/div/p", "xpath:idRelative"], ["xpath=//div[3]/div/div/p", "xpath:position"] ], "value": "Entity Attributes Filter" - },{ - "id": "4ec2c493-85e4-403b-9b09-031c5728f498", - "comment": "", - "command": "open", - "target": "/api/heheheheheheheWipeout", - "targets": [], - "value": "" - }, { - "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", - "comment": "", - "command": "assertText", - "target": "css=body", - "targets": [], - "value": "yes, you did it" - }] + }, { + "id": "4ec2c493-85e4-403b-9b09-031c5728f498", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }] }], "suites": [{ "id": "248ba015-77cd-430f-b973-d14fd4f39a27", diff --git a/backend/src/integration/resources/SHIBUI-1385-1.side b/backend/src/integration/resources/SHIBUI-1385-1.side index 6a11270a6..801580133 100644 --- a/backend/src/integration/resources/SHIBUI-1385-1.side +++ b/backend/src/integration/resources/SHIBUI-1385-1.side @@ -1995,9 +1995,9 @@ ["css=.d-flex:nth-child(1) > .py-2 > span", "css:finder"], ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[3]/div/section[9]/div/div[2]/div[2]/div/div/span", "xpath:idRelative"], ["xpath=//section[9]/div/div[2]/div[2]/div/div/span", "xpath:position"], - ["xpath=//span[contains(.,'True')]", "xpath:innerText"] + ["xpath=//span[contains(.,'true')]", "xpath:innerText"] ], - "value": "True" + "value": "true" }, { "id": "1406d7e4-907d-4359-8de8-a40206f0993e", "comment": "", @@ -2291,9 +2291,9 @@ ["css=.d-flex:nth-child(1) > .py-2 > span", "css:finder"], ["xpath=//div[@id='root']/div/main/div/section/div/div/section[8]/div/div[2]/div[2]/div/div/span", "xpath:idRelative"], ["xpath=//section[8]/div/div[2]/div[2]/div/div/span", "xpath:position"], - ["xpath=//span[contains(.,'True')]", "xpath:innerText"] + ["xpath=//span[contains(.,'true')]", "xpath:innerText"] ], - "value": "True" + "value": "true" }, { "id": "2c46cdcd-d5a5-47fe-aa7b-0120fd2fcfc9", "comment": "", diff --git a/backend/src/integration/resources/SHIBUI-1385-2.side b/backend/src/integration/resources/SHIBUI-1385-2.side index d8d8cbb4b..2381964f9 100644 --- a/backend/src/integration/resources/SHIBUI-1385-2.side +++ b/backend/src/integration/resources/SHIBUI-1385-2.side @@ -461,41 +461,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "232da257-962f-4a4b-8213-038ef90c96c3", - "comment": "", - "command": "click", - "target": "css=.toggle-button", - "targets": [ - ["css=.toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[7]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "293cf806-cec0-4b31-a7be-c77e938ac435", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "b8d999f1-0c59-4a9a-9991-91d222f52b8e", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", + "command": "type", + "target": "id=root_metadataFilters_0_maxValidityInterval", "targets": [ - ["id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] + ["id=root_metadataFilters_0_maxValidityInterval", "id"], + ["css=#root_metadataFilters_0_maxValidityInterval", "css:finder"], + ["xpath=//input[@id='root_metadataFilters_0_maxValidityInterval']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] ], - "value": "" + "value": "PT5M" }, { "id": "8af1abb5-2c7a-4a4c-a8f7-0eb287100dde", "comment": "", @@ -999,61 +977,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "78967fb5-8f61-46ce-9c14-9b6ceb12b03a", - "comment": "", - "command": "click", - "target": "css=.mb-3:nth-child(2) .toggle-button", - "targets": [ - ["css=.mb-3:nth-child(2) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[14]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[2]/div/div/div/div/button", "xpath:position"], - ["xpath=//button[contains(.,'Options')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "aa3ed5b0-cd6e-4e8d-9c35-57524db80ca7", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "8ba62572-354d-47f4-bb72-f9309c1cb201", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout-item-1", - "targets": [ - ["id=option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_httpMetadataResolverAttributes_connectionRequestTimeout']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "31d15a76-ef02-42ed-87a0-56543de45b0d", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" - }, { - "id": "d7406190-0bb0-4df8-9c0b-7e393952b6a2", - "comment": "", - "command": "click", - "target": "css=.mb-3:nth-child(3) .toggle-button", + "command": "type", + "target": "id=root_httpMetadataResolverAttributes_connectionRequestTimeout", "targets": [ - ["css=.mb-3:nth-child(3) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[16]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div[2]/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[2]/div[2]/div/div/div/button", "xpath:position"] + ["id=root_httpMetadataResolverAttributes_connectionRequestTimeout", "id"], + ["css=#root_httpMetadataResolverAttributes_connectionRequestTimeout", "css:finder"], + ["xpath=//input[@id='root_httpMetadataResolverAttributes_connectionRequestTimeout']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[2]/div/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT30S" }, { "id": "bf37da0d-3a16-4944-b7ae-f116c898040b", "comment": "", @@ -1064,38 +1000,16 @@ }, { "id": "337ac160-7990-425f-83da-2788d8a0985e", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout-item-2", - "targets": [ - ["id=option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout-item-2", "id"], - ["linkText=PT1M", "linkText"], - ["css=#option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout-item-2", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout-item-2']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_httpMetadataResolverAttributes_connectionTimeout']/a[3]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[3]", "xpath:href"], - ["xpath=//a[3]", "xpath:position"], - ["xpath=//a[contains(.,'PT1M')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "603e9774-e7cb-4c31-9e53-43c4262ba58d", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" - }, { - "id": "19182110-0f86-4601-ae12-0b90967ef68a", - "comment": "", - "command": "click", - "target": "css=.mb-3:nth-child(4) .toggle-button", + "command": "type", + "target": "id=root_httpMetadataResolverAttributes_connectionTimeout", "targets": [ - ["css=.mb-3:nth-child(4) .toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[18]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div[3]/div/div/div/button", "xpath:idRelative"], - ["xpath=//div[3]/div/div/div/button", "xpath:position"] + ["id=root_httpMetadataResolverAttributes_connectionTimeout", "id"], + ["css=#root_httpMetadataResolverAttributes_connectionTimeout", "css:finder"], + ["xpath=//input[@id='root_httpMetadataResolverAttributes_connectionTimeout']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div[2]/div[2]/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div[2]/div/div/input", "xpath:idRelative"], + ["xpath=//div[2]/div/div/input", "xpath:position"] ], - "value": "" + "value": "PT1M" }, { "id": "70ca5b38-22a6-4c61-b645-9b67b2e88178", "comment": "", @@ -1106,19 +1020,10 @@ }, { "id": "34693225-4754-4b27-92ee-3e37304a8cd7", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_httpMetadataResolverAttributes_socketTimeout-item-3", - "targets": [ - ["id=option-selector-items-root_httpMetadataResolverAttributes_socketTimeout-item-3", "id"], - ["linkText=PT10M", "linkText"], - ["css=#option-selector-items-root_httpMetadataResolverAttributes_socketTimeout-item-3", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_httpMetadataResolverAttributes_socketTimeout-item-3']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_httpMetadataResolverAttributes_socketTimeout']/a[4]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[4]", "xpath:href"], - ["xpath=//a[4]", "xpath:position"], - ["xpath=//a[contains(.,'PT10M')]", "xpath:innerText"] - ], - "value": "" + "command": "type", + "target": "id=root_httpMetadataResolverAttributes_socketTimeout", + "targets": [], + "value": "PT10M" }, { "id": "d9a9dcb4-bac1-4f5a-a822-047bd2941df0", "comment": "", @@ -1481,21 +1386,21 @@ ["xpath=//span[3]", "xpath:position"] ], "value": "Test Metadata Provider" - },{ - "id": "4ec2c493-85e4-403b-9b09-031c5728f498", - "comment": "", - "command": "open", - "target": "/api/heheheheheheheWipeout", - "targets": [], - "value": "" - }, { - "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", - "comment": "", - "command": "assertText", - "target": "css=body", - "targets": [], - "value": "yes, you did it" - }] + }, { + "id": "4ec2c493-85e4-403b-9b09-031c5728f498", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }] }], "suites": [{ "id": "894bbaf7-9978-4d30-b4e3-3c4263e084aa", diff --git a/backend/src/integration/resources/SHIBUI-1391.side b/backend/src/integration/resources/SHIBUI-1391.side index b95a7cd1d..67267b429 100644 --- a/backend/src/integration/resources/SHIBUI-1391.side +++ b/backend/src/integration/resources/SHIBUI-1391.side @@ -421,34 +421,13 @@ ["xpath=//li[3]/button", "xpath:position"] ], "value": "" - }, { - "id": "363af92e-0327-47b9-918c-1560adab40cc", - "comment": "", - "command": "click", - "target": "css=.toggle-button", - "targets": [ - ["css=.toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[7]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div/div/div/div/button", "xpath:position"] - ], - "value": "" }, { "id": "a4470d6f-04a7-4c4b-8c1e-70cff2f35e8a", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", - "targets": [ - ["id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] - ], - "value": "" + "command": "type", + "target": "id=root_metadataFilters_0_maxValidityInterval", + "targets": [], + "value": "PT15M" }, { "id": "4530c1b4-8f27-4272-9633-c792a3a54f90", "comment": "", @@ -728,7 +707,7 @@ ["xpath=//div/small", "xpath:position"], ["xpath=//small[contains(.,'Invalid Regular Expression')]", "xpath:innerText"] ], - "value": "Invalid Regular Expression" + "value": "Invalid regular expression" }, { "id": "0280c7b8-5714-43b8-89cc-f1260037bd44", "comment": "", @@ -743,21 +722,21 @@ ["xpath=//div[2]/div/div/input", "xpath:position"] ], "value": ".*" - },{ - "id": "4ec2c493-85e4-403b-9b09-031c5728f498", - "comment": "", - "command": "open", - "target": "/api/heheheheheheheWipeout", - "targets": [], - "value": "" - }, { - "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", - "comment": "", - "command": "assertText", - "target": "css=body", - "targets": [], - "value": "yes, you did it" - }] + }, { + "id": "4ec2c493-85e4-403b-9b09-031c5728f498", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }] }], "suites": [{ "id": "248ba015-77cd-430f-b973-d14fd4f39a27", diff --git a/backend/src/integration/resources/SHIBUI-1407-1.side b/backend/src/integration/resources/SHIBUI-1407-1.side index 89087d646..2a6525167 100644 --- a/backend/src/integration/resources/SHIBUI-1407-1.side +++ b/backend/src/integration/resources/SHIBUI-1407-1.side @@ -2013,7 +2013,7 @@ ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[3]/div/section[9]/div/div[2]/div[2]/div[2]/div", "xpath:idRelative"], ["xpath=//section[9]/div/div[2]/div[2]/div[2]/div", "xpath:position"] ], - "value": "True" + "value": "true" }, { "id": "1406d7e4-907d-4359-8de8-a40206f0993e", "comment": "", @@ -2289,7 +2289,7 @@ ["xpath=//div[@id='root']/div/main/div/section/div/div/section[8]/div/div[2]/div[2]/div[3]/div", "xpath:idRelative"], ["xpath=//section[8]/div/div[2]/div[2]/div[3]/div", "xpath:position"] ], - "value": "True" + "value": "true" }, { "id": "2c46cdcd-d5a5-47fe-aa7b-0120fd2fcfc9", "comment": "", diff --git a/backend/src/integration/resources/SHIBUI-1407-2.side b/backend/src/integration/resources/SHIBUI-1407-2.side index 1458fad41..73381ad90 100644 --- a/backend/src/integration/resources/SHIBUI-1407-2.side +++ b/backend/src/integration/resources/SHIBUI-1407-2.side @@ -468,41 +468,19 @@ "target": "500", "targets": [], "value": "" - }, { - "id": "232da257-962f-4a4b-8213-038ef90c96c3", - "comment": "", - "command": "click", - "target": "css=.toggle-button", - "targets": [ - ["css=.toggle-button", "css:finder"], - ["xpath=(//button[@type='button'])[7]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[5]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/div/button", "xpath:idRelative"], - ["xpath=//div/div/div/div/button", "xpath:position"] - ], - "value": "" - }, { - "id": "293cf806-cec0-4b31-a7be-c77e938ac435", - "comment": "", - "command": "pause", - "target": "500", - "targets": [], - "value": "" }, { "id": "b8d999f1-0c59-4a9a-9991-91d222f52b8e", "comment": "", - "command": "click", - "target": "id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", + "command": "type", + "target": "id=root_metadataFilters_0_maxValidityInterval", "targets": [ - ["id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "id"], - ["linkText=PT30S", "linkText"], - ["css=#option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "css:finder"], - ["xpath=//a[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1']", "xpath:attributes"], - ["xpath=//div[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval']/a[2]", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"], - ["xpath=//div[2]/a[2]", "xpath:position"], - ["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"] + ["id=root_metadataFilters_0_maxValidityInterval", "id"], + ["css=#root_metadataFilters_0_maxValidityInterval", "css:finder"], + ["xpath=//input[@id='root_metadataFilters_0_maxValidityInterval']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] ], - "value": "" + "value": "PT15M" }, { "id": "8af1abb5-2c7a-4a4c-a8f7-0eb287100dde", "comment": "", @@ -1032,21 +1010,21 @@ "target": "isDiff", "targets": [], "value": "true" - },{ - "id": "4ec2c493-85e4-403b-9b09-031c5728f498", - "comment": "", - "command": "open", - "target": "/api/heheheheheheheWipeout", - "targets": [], - "value": "" - }, { - "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", - "comment": "", - "command": "assertText", - "target": "css=body", - "targets": [], - "value": "yes, you did it" - }] + }, { + "id": "4ec2c493-85e4-403b-9b09-031c5728f498", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }] }], "suites": [{ "id": "894bbaf7-9978-4d30-b4e3-3c4263e084aa", diff --git a/backend/src/integration/resources/SHIBUI-1521.side b/backend/src/integration/resources/SHIBUI-1521.side index f49fef4c4..b1ec76f6d 100644 --- a/backend/src/integration/resources/SHIBUI-1521.side +++ b/backend/src/integration/resources/SHIBUI-1521.side @@ -1808,7 +1808,7 @@ ["xpath=//metadata-configuration[@id='configuration']/div/section[9]/div/div[2]/object-property/array-property/div/div[5]/div/span", "xpath:idRelative"], ["xpath=//div/div[5]/div/span", "xpath:position"] ], - "value": "True" + "value": "true" }, { "id": "1406d7e4-907d-4359-8de8-a40206f0993e", "comment": "", diff --git a/backend/src/integration/resources/SHIBUI-1732-3.side b/backend/src/integration/resources/SHIBUI-1732-3.side index c7d0f9fd4..54573d88b 100644 --- a/backend/src/integration/resources/SHIBUI-1732-3.side +++ b/backend/src/integration/resources/SHIBUI-1732-3.side @@ -1325,13 +1325,9 @@ "id": "2dd7992f-ee99-45a3-ad85-20488c4bd4b1", "comment": "", "command": "click", - "target": "xpath=//section/div/div/div[4]/div[2]/div/button", + "target": "css=#filters > div:nth-child(3) > div:nth-child(2) > div > button", "targets": [ - ["css=.border-primary:nth-child(2) .mx-auto", "css:finder"], - ["xpath=(//button[@type='button'])[5]", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div/div/div[4]/div[2]/div/button", "xpath:idRelative"], - ["xpath=//div[2]/div/button", "xpath:position"], - ["xpath=//button[contains(.,'Compare')]", "xpath:innerText"] + ["css=.border-primary:nth-child(2) .svg-inline--fa", "css:finder"] ], "value": "" }, { @@ -1553,21 +1549,21 @@ ["xpath=//ul[2]/li[2]/span", "xpath:position"] ], "value": "bar" - },{ - "id": "4ec2c493-85e4-403b-9b09-031c5728f498", - "comment": "", - "command": "open", - "target": "/api/heheheheheheheWipeout", - "targets": [], - "value": "" - }, { - "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", - "comment": "", - "command": "assertText", - "target": "css=body", - "targets": [], - "value": "yes, you did it" - }] + }, { + "id": "4ec2c493-85e4-403b-9b09-031c5728f498", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }] }], "suites": [{ "id": "575d414c-556d-45f7-b2f2-c9971ad51348", diff --git a/backend/src/integration/resources/SHIBUI-1744-2.side b/backend/src/integration/resources/SHIBUI-1744-2.side index 81b5c2d19..40e268775 100644 --- a/backend/src/integration/resources/SHIBUI-1744-2.side +++ b/backend/src/integration/resources/SHIBUI-1744-2.side @@ -547,9 +547,9 @@ ["css=.d-flex:nth-child(3) > .py-2 > span", "css:finder"], ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[3]/div/section[9]/div/div[2]/div[2]/div[3]/div/span", "xpath:idRelative"], ["xpath=//div[2]/div[3]/div/span", "xpath:position"], - ["xpath=//span[contains(.,'True')]", "xpath:innerText"] + ["xpath=//span[contains(.,'true')]", "xpath:innerText"] ], - "value": "True" + "value": "true" }, { "id": "bfc6ef5f-aaf7-4945-bbc1-d89e95b8d3ac", "comment": "", @@ -560,7 +560,7 @@ ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[3]/div/section[9]/div/div[2]/div[2]/div[4]/div/span", "xpath:idRelative"], ["xpath=//div[2]/div[4]/div/span", "xpath:position"] ], - "value": "True" + "value": "true" }, { "id": "5225f1db-7bdc-432e-a422-c6684b9e8416", "comment": "", @@ -571,7 +571,7 @@ ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[3]/div/section[9]/div/div[2]/div[2]/div[5]/div/span", "xpath:idRelative"], ["xpath=//div[2]/div[5]/div/span", "xpath:position"] ], - "value": "True" + "value": "true" }, { "id": "2a14e2d4-31f1-4ae8-b977-b6edd94de02c", "comment": "", @@ -614,9 +614,9 @@ ["css=.d-flex:nth-child(4) > .py-2 > span", "css:finder"], ["xpath=//div[@id='root']/div/main/div/section/div/div/section[8]/div/div[2]/div[2]/div[4]/div/span", "xpath:idRelative"], ["xpath=//div[2]/div[4]/div/span", "xpath:position"], - ["xpath=//span[contains(.,'True')]", "xpath:innerText"] + ["xpath=//span[contains(.,'true')]", "xpath:innerText"] ], - "value": "True" + "value": "true" }, { "id": "09fa0157-7e1a-4886-969e-fe9519974923", "comment": "", @@ -626,9 +626,9 @@ ["css=.d-flex:nth-child(4) > .py-2 > span", "css:finder"], ["xpath=//div[@id='root']/div/main/div/section/div/div/section[8]/div/div[2]/div[2]/div[4]/div/span", "xpath:idRelative"], ["xpath=//div[2]/div[4]/div/span", "xpath:position"], - ["xpath=//span[contains(.,'True')]", "xpath:innerText"] + ["xpath=//span[contains(.,'true')]", "xpath:innerText"] ], - "value": "True" + "value": "true" }, { "id": "95dd6769-d8b6-4c1e-a799-fb4c083a1b43", "comment": "", @@ -638,9 +638,9 @@ ["css=.d-flex:nth-child(4) > .py-2 > span", "css:finder"], ["xpath=//div[@id='root']/div/main/div/section/div/div/section[8]/div/div[2]/div[2]/div[4]/div/span", "xpath:idRelative"], ["xpath=//div[2]/div[4]/div/span", "xpath:position"], - ["xpath=//span[contains(.,'True')]", "xpath:innerText"] + ["xpath=//span[contains(.,'true')]", "xpath:innerText"] ], - "value": "True" + "value": "true" },{ "id": "4ec2c493-85e4-403b-9b09-031c5728f498", "comment": "", diff --git a/backend/src/integration/resources/SHIBUI-1744-3.side b/backend/src/integration/resources/SHIBUI-1744-3.side index 030f88927..67e45e747 100644 --- a/backend/src/integration/resources/SHIBUI-1744-3.side +++ b/backend/src/integration/resources/SHIBUI-1744-3.side @@ -652,9 +652,9 @@ ["css=.d-flex:nth-child(3) > .py-2 > span", "css:finder"], ["xpath=//div[@id='filters']/ul/li/div[2]/section[3]/div/div[2]/div[2]/div[3]/div/span", "xpath:idRelative"], ["xpath=//section[3]/div/div[2]/div[2]/div[3]/div/span", "xpath:position"], - ["xpath=//span[contains(.,'True')]", "xpath:innerText"] + ["xpath=//span[contains(.,'true')]", "xpath:innerText"] ], - "value": "True" + "value": "true" }, { "id": "64723648-aef5-4c50-8605-74c5992ac628", "comment": "", @@ -665,7 +665,7 @@ ["xpath=//div[@id='filters']/ul/li/div[2]/section[3]/div/div[2]/div[2]/div[4]/div/span", "xpath:idRelative"], ["xpath=//section[3]/div/div[2]/div[2]/div[4]/div/span", "xpath:position"] ], - "value": "True" + "value": "true" }, { "id": "509ee76e-7d39-453e-a5cc-cf7b3975b476", "comment": "", @@ -676,7 +676,7 @@ ["xpath=//div[@id='filters']/ul/li/div[2]/section[3]/div/div[2]/div[2]/div[5]/div/span", "xpath:idRelative"], ["xpath=//section[3]/div/div[2]/div[2]/div[5]/div/span", "xpath:position"] ], - "value": "True" + "value": "true" },{ "id": "4ec2c493-85e4-403b-9b09-031c5728f498", "comment": "", diff --git a/backend/src/integration/resources/SHIBUI-2269.side b/backend/src/integration/resources/SHIBUI-2269.side new file mode 100644 index 000000000..f2848dddb --- /dev/null +++ b/backend/src/integration/resources/SHIBUI-2269.side @@ -0,0 +1,545 @@ +{ + "id": "1b31a551-eb09-4bd4-8db9-694bf1539a46", + "version": "2.0", + "name": "SHIBUI-2269", + "url": "http://localhost:10101", + "tests": [{ + "id": "841ade0e-83bd-4a4b-94f2-de6bd5c536b2", + "name": "SHIBUI-2269", + "commands": [{ + "id": "d6b23986-6d14-4b10-be7b-a7e6f576e3b2", + "comment": "", + "command": "open", + "target": "/login", + "targets": [], + "value": "" + }, { + "id": "f77ecd77-01c2-4463-944e-1a69600f5297", + "comment": "", + "command": "type", + "target": "name=username", + "targets": [ + ["name=username", "name"], + ["css=tr:nth-child(1) input", "css:finder"], + ["xpath=//input[@name='username']", "xpath:attributes"], + ["xpath=//input", "xpath:position"] + ], + "value": "admin" + }, { + "id": "c9bf0a22-faa9-494c-b2ed-6c9653248551", + "comment": "", + "command": "type", + "target": "name=password", + "targets": [ + ["name=password", "name"], + ["css=tr:nth-child(2) input", "css:finder"], + ["xpath=//input[@name='password']", "xpath:attributes"], + ["xpath=//tr[2]/td[2]/input", "xpath:position"] + ], + "value": "adminpass" + }, { + "id": "7ab1d854-3582-4101-bd19-f94b8f438090", + "comment": "", + "command": "sendKeys", + "target": "name=password", + "targets": [ + ["name=password", "name"], + ["css=tr:nth-child(2) input", "css:finder"], + ["xpath=//input[@name='password']", "xpath:attributes"], + ["xpath=//tr[2]/td[2]/input", "xpath:position"] + ], + "value": "${KEY_ENTER}" + }, { + "id": "4059cae7-b9f9-49d0-a213-343bcaba66d1", + "comment": "", + "command": "waitForElementVisible", + "target": "id=metadata-nav-dropdown-toggle", + "targets": [], + "value": "30000" + }, { + "id": "f03af8d5-5875-4a2c-b93a-c3ddcbd4b16a", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "081f495b-4d84-4758-824c-1e85b6311e7f", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }, { + "id": "9e912dd5-6ace-45be-bafd-2d1655906575", + "comment": "", + "command": "open", + "target": "/", + "targets": [], + "value": "" + }, { + "id": "3bb52950-667c-4852-a98f-6a6fb5632ba5", + "comment": "", + "command": "waitForElementEditable", + "target": "id=metadata-nav-dropdown-toggle", + "targets": [], + "value": "30000" + }, { + "id": "6af18279-b5ed-47d0-932b-cba97881b9bb", + "comment": "", + "command": "click", + "target": "id=metadata-nav-dropdown-toggle", + "targets": [ + ["id=metadata-nav-dropdown-toggle", "id"], + ["css=#metadata-nav-dropdown-toggle", "css:finder"], + ["xpath=//button[@id='metadata-nav-dropdown-toggle']", "xpath:attributes"], + ["xpath=//div[@id='metadata-nav-dropdown']/button", "xpath:idRelative"], + ["xpath=//div[2]/button", "xpath:position"], + ["xpath=//button[contains(.,'Add New')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "b07230f3-c268-4680-943f-5f8f81414002", + "comment": "", + "command": "click", + "target": "id=metadata-nav-dropdown-provider", + "targets": [ + ["id=metadata-nav-dropdown-provider", "id"], + ["linkText=Add a new metadata provider", "linkText"], + ["css=#metadata-nav-dropdown-provider", "css:finder"], + ["xpath=//a[contains(text(),'Add a new metadata provider')]", "xpath:link"], + ["xpath=//a[@id='metadata-nav-dropdown-provider']", "xpath:attributes"], + ["xpath=//div[@id='metadata-nav-dropdown']/div/a[2]", "xpath:idRelative"], + ["xpath=//a[contains(@href, '/metadata/provider/new')]", "xpath:href"], + ["xpath=//a[2]", "xpath:position"], + ["xpath=//a[contains(.,'Add a new metadata provider')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "004dbab9-263e-4f90-9c5f-9d2948d80ab5", + "comment": "", + "command": "waitForElementEditable", + "target": "name=type", + "targets": [], + "value": "30000" + }, { + "id": "d77381c8-2164-499d-91fa-e762792644ec", + "comment": "", + "command": "select", + "target": "name=type", + "targets": [], + "value": "label=ExternalMetadataResolver" + }, { + "id": "8edf9e5e-188e-435d-acbd-a0ee770df39d", + "comment": "", + "command": "type", + "target": "name=name", + "targets": [ + ["name=name", "name"], + ["css=.form-control", "css:finder"], + ["xpath=//input[@name='name']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div/div/form/div/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] + ], + "value": "ExternalTest" + }, { + "id": "d652c1d5-44d2-448a-8dae-85d266b51638", + "comment": "", + "command": "click", + "target": "css=.direction", + "targets": [ + ["css=.direction", "css:finder"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/nav/ul/li[2]/button/span[2]", "xpath:idRelative"], + ["xpath=//span[2]", "xpath:position"], + ["xpath=//span[contains(.,'Next')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "d1294ac3-d91c-495a-ab0b-cc3183cc08d5", + "comment": "", + "command": "pause", + "target": "5000", + "targets": [], + "value": "" + }, { + "id": "b15dcd2a-9360-4831-a95c-8797eb235972", + "comment": "", + "command": "type", + "target": "id=root_xmlId", + "targets": [ + ["id=root_xmlId", "id"], + ["css=#root_xmlId", "css:finder"], + ["xpath=//input[@id='root_xmlId']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[2]/div/div/div/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] + ], + "value": "1" + }, { + "id": "657ee88c-4777-485b-b3de-a467657e6fe4", + "comment": "", + "command": "type", + "target": "id=root_description", + "targets": [ + ["id=root_description", "id"], + ["css=#root_description", "css:finder"], + ["xpath=//textarea[@id='root_description']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[2]/div[2]/div/div/textarea", "xpath:idRelative"], + ["xpath=//textarea", "xpath:position"] + ], + "value": "External Test" + }, { + "id": "5548997c-2f3a-4376-89a9-606b5b948ef1", + "comment": "", + "command": "click", + "target": "css=.label:nth-child(1)", + "targets": [ + ["css=.label:nth-child(1)", "css:finder"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div/nav/ul/li[3]/button/span", "xpath:idRelative"], + ["xpath=//li[3]/button/span", "xpath:position"], + ["xpath=//span[contains(.,'2. Finished!')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "826e7804-88f0-436e-9951-11e8065671ed", + "comment": "", + "command": "click", + "target": "css=.save", + "targets": [ + ["css=.save", "css:finder"], + ["xpath=(//button[@type='button'])[6]", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div/nav/ul/li[3]/button", "xpath:idRelative"], + ["xpath=//li[3]/button", "xpath:position"] + ], + "value": "" + }, { + "id": "ab15e915-02b9-4616-9f92-ffcb0386918c", + "comment": "", + "command": "click", + "target": "linkText=ExternalTest", + "targets": [ + ["linkText=ExternalTest", "linkText"], + ["css=.align-middle > a", "css:finder"], + ["xpath=//a[contains(text(),'ExternalTest')]", "xpath:link"], + ["xpath=//div[@id='root']/div/main/div/section/div/div[2]/div/div/div/table/tbody/tr/td[2]/a", "xpath:idRelative"], + ["xpath=//a[contains(@href, '/metadata/provider/0e237f9c-3ffe-49da-a60d-289733126d92/configuration/options')]", "xpath:href"], + ["xpath=//td[2]/a", "xpath:position"], + ["xpath=//a[contains(.,'ExternalTest')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "3ece6089-c462-437e-9384-62cede8afc7d", + "comment": "", + "command": "click", + "target": "linkText=Add Filter", + "targets": [ + ["linkText=Add Filter", "linkText"], + ["css=#filters .btn", "css:finder"], + ["xpath=//div[@id='filters']/div/div/a", "xpath:idRelative"], + ["xpath=//a[contains(@href, '/metadata/provider/0e237f9c-3ffe-49da-a60d-289733126d92/filter/new')]", "xpath:href"], + ["xpath=//div[3]/div/div/a", "xpath:position"], + ["xpath=//a[contains(.,' Add Filter')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "b409c3ea-3066-4d06-a660-4702cdace6ec", + "comment": "", + "command": "waitForElementEditable", + "target": "name=type", + "targets": [], + "value": "30000" + }, { + "id": "84111b1d-6927-4536-b883-0b057f13d898", + "comment": "", + "command": "select", + "target": "name=type", + "targets": [], + "value": "label=EntityAttributes" + }, { + "id": "ec27be24-7951-4d76-9457-4a5dbe5866ef", + "comment": "", + "command": "waitForElementEditable", + "target": "id=root_name", + "targets": [], + "value": "30000" + }, { + "id": "bea341ae-4cdf-432e-8032-c827e9c8a7b8", + "comment": "", + "command": "type", + "target": "id=root_name", + "targets": [ + ["id=root_name", "id"], + ["css=#root_name", "css:finder"], + ["xpath=//input[@id='root_name']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div[2]/div[2]/div/form/div/div/div/div/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] + ], + "value": "1" + }, { + "id": "79f5b0a9-57e9-4f6b-8980-4af6258a5aa4", + "comment": "", + "command": "click", + "target": "id=dropdown-label.filter-target-type", + "targets": [ + ["id=dropdown-label.filter-target-type", "id"], + ["css=#dropdown-label\\.filter-target-type", "css:finder"], + ["xpath=//button[@id='dropdown-label.filter-target-type']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div[2]/div[2]/div/form/div/div/div/div[6]/div/div/div/fieldset/div/div/div/div/button", "xpath:idRelative"], + ["xpath=//fieldset/div/div/div/div/button", "xpath:position"], + ["xpath=//button[contains(.,'Entity ID ')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "d01e44ab-802b-4d85-ac2e-e2e03a00c1c0", + "comment": "", + "command": "click", + "target": "css=.dropdown-item:nth-child(3)", + "targets": [ + ["css=.dropdown-item:nth-child(3)", "css:finder"], + ["xpath=(//button[@type='button'])[17]", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div[2]/div[2]/div/form/div/div/div/div[6]/div/div/div/fieldset/div/div/div/div/div/button[3]", "xpath:idRelative"], + ["xpath=//div/button[3]", "xpath:position"], + ["xpath=//button[contains(.,'Script')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "f401438a-0154-4610-be40-580829ba76a9", + "comment": "", + "command": "type", + "target": "css=.npm__react-simple-code-editor__textarea", + "targets": [ + ["css=.npm__react-simple-code-editor__textarea", "css:finder"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div[2]/div[2]/div/form/div/div/div/div[6]/div/div/div/fieldset/div/div/div[2]/div/div/div/div/textarea", "xpath:idRelative"], + ["xpath=//textarea", "xpath:position"] + ], + "value": "true;" + }, { + "id": "75563d4f-487d-4c08-81d9-26a8ef989711", + "comment": "", + "command": "click", + "target": "css=.btn-info", + "targets": [ + ["css=.btn-info", "css:finder"], + ["xpath=(//button[@type='button'])[7]", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div/div[2]/div/button", "xpath:idRelative"], + ["xpath=//div[2]/div/button", "xpath:position"], + ["xpath=//button[contains(.,' Save')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "21f5c73b-0aa2-41cd-a97c-35c05a892275", + "comment": "", + "command": "click", + "target": "linkText=Add Filter", + "targets": [ + ["linkText=Add Filter", "linkText"], + ["css=#filters > .numbered-header .btn", "css:finder"], + ["xpath=//div[@id='filters']/div/div/a", "xpath:idRelative"], + ["xpath=//a[contains(@href, '/metadata/provider/0e237f9c-3ffe-49da-a60d-289733126d92/filter/new')]", "xpath:href"], + ["xpath=//div[3]/div/div/a", "xpath:position"], + ["xpath=//a[contains(.,' Add Filter')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "6eb76a2f-370a-4547-b05e-f0dc8bdb60ba", + "comment": "", + "command": "select", + "target": "name=type", + "targets": [], + "value": "label=NameIDFormat" + }, { + "id": "fcacadd8-7b9e-4878-b1cc-3d5da56e6660", + "comment": "", + "command": "click", + "target": "css=.col-12 > .mb-3 > div > div", + "targets": [ + ["css=.col-12 > .mb-3 > div > div", "css:finder"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div[2]/div[2]/div/form/div/div/div/div/div/div/div/div", "xpath:idRelative"], + ["xpath=//div/div/div/div/div/div/div/div", "xpath:position"] + ], + "value": "" + }, { + "id": "4d206821-ace7-483e-876e-99c7a0490144", + "comment": "", + "command": "waitForElementEditable", + "target": "id=root_name", + "targets": [], + "value": "30000" + }, { + "id": "62afd5f1-e565-4bb8-a142-9eda83e98a1c", + "comment": "", + "command": "type", + "target": "id=root_name", + "targets": [ + ["id=root_name", "id"], + ["css=#root_name", "css:finder"], + ["xpath=//input[@id='root_name']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div[2]/div[2]/div/form/div/div/div/div/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] + ], + "value": "2" + }, { + "id": "da90db0c-c7e6-4dc5-b643-13a3c2029f05", + "comment": "", + "command": "click", + "target": "id=dropdown-label.filter-target-type", + "targets": [ + ["id=dropdown-label.filter-target-type", "id"], + ["css=#dropdown-label\\.filter-target-type", "css:finder"], + ["xpath=//button[@id='dropdown-label.filter-target-type']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div[2]/div[2]/div/form/div/div/div/div[3]/div/div/div/fieldset/div/div/div/div/button", "xpath:idRelative"], + ["xpath=//fieldset/div/div/div/div/button", "xpath:position"], + ["xpath=//button[contains(.,'Entity ID ')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "bce0cd29-246e-4f6e-a860-0eade5c73850", + "comment": "", + "command": "click", + "target": "css=.dropdown-item:nth-child(3)", + "targets": [ + ["css=.dropdown-item:nth-child(3)", "css:finder"], + ["xpath=(//button[@type='button'])[16]", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div[2]/div[2]/div/form/div/div/div/div[3]/div/div/div/fieldset/div/div/div/div/div/button[3]", "xpath:idRelative"], + ["xpath=//button[3]", "xpath:position"], + ["xpath=//button[contains(.,'Script')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "2923ab38-d8ff-4d3f-b247-1d977d06a0dd", + "comment": "", + "command": "click", + "target": "id=dropdown-label.filter-target-type", + "targets": [ + ["id=dropdown-label.filter-target-type", "id"], + ["css=#dropdown-label\\.filter-target-type", "css:finder"], + ["xpath=//button[@id='dropdown-label.filter-target-type']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div[2]/div[2]/div/form/div/div/div/div[3]/div/div/div/fieldset/div/div/div/div/button", "xpath:idRelative"], + ["xpath=//fieldset/div/div/div/div/button", "xpath:position"], + ["xpath=//button[contains(.,'Script ')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "7141ca97-429a-4d1f-9efb-68a23fc92748", + "comment": "", + "command": "click", + "target": "css=.show > .dropdown-item:nth-child(2)", + "targets": [ + ["css=.show > .dropdown-item:nth-child(2)", "css:finder"], + ["xpath=(//button[@type='button'])[15]", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div[2]/div[2]/div/form/div/div/div/div[3]/div/div/div/fieldset/div/div/div/div/div/button[2]", "xpath:idRelative"], + ["xpath=//fieldset/div/div/div/div/div/button[2]", "xpath:position"], + ["xpath=//button[contains(.,'Regex')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "e15eab26-07bd-45e9-ba8e-ee2a400baee9", + "comment": "", + "command": "type", + "target": "id=targetInput", + "targets": [ + ["id=targetInput", "id"], + ["name=script", "name"], + ["css=#targetInput", "css:finder"], + ["xpath=//input[@id='targetInput']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div[2]/div[2]/div/form/div/div/div/div[3]/div/div/div/fieldset/div/div/div[2]/div/div/input", "xpath:idRelative"], + ["xpath=//div[2]/div/div/input", "xpath:position"] + ], + "value": ".*unicon.*" + }, { + "id": "55cc5ef6-1b05-48a9-bc9d-58551b751feb", + "comment": "", + "command": "click", + "target": "css=.fa-floppy-disk > path", + "targets": [ + ["css=.fa-floppy-disk > path", "css:finder"] + ], + "value": "" + }, { + "id": "802be014-0d04-4bda-93d1-ca7a5d7f802d", + "comment": "", + "command": "waitForElementVisible", + "target": "css=.text:nth-child(2)", + "targets": [ + ["css=.text:nth-child(2)", "css:finder"], + ["xpath=//div[@id='root']/div/main/div/section/div/div/section/div/div/h2/span[2]", "xpath:idRelative"], + ["xpath=//h2/span[2]", "xpath:position"], + ["xpath=//span[contains(.,'Common Attributes')]", "xpath:innerText"] + ], + "value": "30000" + }, { + "id": "7e3e7d65-e0ff-4a2d-a0e9-5080bfefd4df", + "comment": "", + "command": "click", + "target": "css=.btn-outline-secondary", + "targets": [ + ["css=.btn-outline-secondary", "css:finder"], + ["xpath=(//button[@type='button'])[5]", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div/div/div/div/div/div/button", "xpath:idRelative"], + ["xpath=//div/div/div/div/button", "xpath:position"], + ["xpath=//button[contains(.,'Enable')]", "xpath:innerText"] + ], + "value": "" + }, { + "id": "42929ec9-7860-467a-a52b-946df9965de5", + "comment": "", + "command": "click", + "target": "xpath=//div[@id='filters']/ul/li/div/span[3]/div/input", + "targets": [ + ["id=customSwitch-df84f9b7-6cbe-4727-b71e-733eb9b46ca0", "id"], + ["css=#customSwitch-df84f9b7-6cbe-4727-b71e-733eb9b46ca0", "css:finder"], + ["xpath=//input[@id='customSwitch-df84f9b7-6cbe-4727-b71e-733eb9b46ca0']", "xpath:attributes"], + ["xpath=//div[@id='filters']/ul/li/div/span[3]/div/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] + ], + "value": "" + }, { + "id": "3bb95cdd-23aa-425d-af75-e4d69b819235", + "comment": "", + "command": "click", + "target": "xpath=//div[@id='filters']/ul/li[2]/div/span[3]/div/input", + "targets": [ + ["id=customSwitch-be9ce5a5-1242-4884-882a-7a977cd7bbd5", "id"], + ["css=#customSwitch-be9ce5a5-1242-4884-882a-7a977cd7bbd5", "css:finder"], + ["xpath=//input[@id='customSwitch-be9ce5a5-1242-4884-882a-7a977cd7bbd5']", "xpath:attributes"], + ["xpath=//div[@id='filters']/ul/li[2]/div/span[3]/div/input", "xpath:idRelative"], + ["xpath=//li[2]/div/span[3]/div/input", "xpath:position"] + ], + "value": "" + }, { + "id": "038ab74e-cab9-486e-bbfc-25a7c1cfad82", + "comment": "", + "command": "open", + "target": "/api/MetadataResolvers/External", + "targets": [], + "value": "" + }, { + "id": "9e6390c9-3122-4038-8dce-61ae0c157e4a", + "comment": "", + "command": "assertText", + "target": "css=#folder4 > .opened > .line > span", + "targets": [ + ["css=#folder4 > .opened > .line > span", "css:finder"] + ], + "value": "" + }, { + "id": "8c32b412-dc63-4be5-98fb-8c3cd67895af", + "comment": "", + "command": "assertText", + "target": "css=#folder7 > .opened > .line > span", + "targets": [ + ["css=#folder7 > .opened > .line > span", "css:finder"] + ], + "value": "" + }] + }], + "suites": [{ + "id": "d2caeac4-7520-4e3c-96b1-840610b6983c", + "name": "Default Suite", + "persistSession": false, + "parallel": false, + "timeout": 300, + "tests": ["841ade0e-83bd-4a4b-94f2-de6bd5c536b2"] + }], + "urls": ["http://localhost:10101/"], + "plugins": [] +} \ No newline at end of file diff --git a/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataResolverUiDefinitionController.groovy b/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataResolverUiDefinitionController.groovy index 35815d31e..fe4a54434 100644 --- a/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataResolverUiDefinitionController.groovy +++ b/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataResolverUiDefinitionController.groovy @@ -13,11 +13,11 @@ import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RestController import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaLocationLookup.dynamicHttpMetadataProviderSchema +import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaLocationLookup.externalMetadataProviderSchema import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaLocationLookup.filesystemMetadataProviderSchema import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaLocationLookup.localDynamicMetadataProviderSchema import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.SchemaType import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR - /** * Controller implementing REST resource responsible for exposing structure definition for metadata resolvers user * interface in terms of JSON schema. @@ -50,6 +50,9 @@ class MetadataResolverUiDefinitionController { case SchemaType.DYNAMIC_HTTP_METADATA_RESOLVER: jsonSchemaLocation = dynamicHttpMetadataProviderSchema(this.jsonSchemaResourceLocationRegistry) break + case SchemaType.EXTERNAL_METADATA_RESOLVER: + jsonSchemaLocation = externalMetadataProviderSchema(this.jsonSchemaResourceLocationRegistry) + break default: throw new UnsupportedOperationException("Json schema for an unsupported metadata resolver (" + resolverType + ") was requested") } diff --git a/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/service/JPAMetadataResolverServiceImpl.groovy b/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/service/JPAMetadataResolverServiceImpl.groovy index ed3f794c0..170a45fa8 100644 --- a/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/service/JPAMetadataResolverServiceImpl.groovy +++ b/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/service/JPAMetadataResolverServiceImpl.groovy @@ -11,6 +11,7 @@ import edu.internet2.tier.shibboleth.admin.ui.domain.filters.RequiredValidUntilF import edu.internet2.tier.shibboleth.admin.ui.domain.filters.SignatureValidationFilter import edu.internet2.tier.shibboleth.admin.ui.domain.filters.opensaml.OpenSamlNameIdFormatFilter import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.DynamicHttpMetadataResolver +import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.ExternalMetadataResolver import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.FileBackedHttpMetadataResolver import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.FilesystemMetadataResolver import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.LocalDynamicMetadataResolver @@ -286,6 +287,12 @@ class JPAMetadataResolverServiceImpl implements MetadataResolverService { } } + void constructXmlNodeForResolver(ExternalMetadataResolver resolver, def markupBuilderDelegate, Closure childNodes) { + markupBuilderDelegate.MetadataFilters(providerRef: resolver.getXmlId()) { + childNodes() + } + } + void constructXmlNodeForResolver(FileBackedHttpMetadataResolver resolver, def markupBuilderDelegate, Closure childNodes) { markupBuilderDelegate.MetadataProvider(id: resolver.xmlId, 'xsi:type': 'FileBackedHTTPMetadataProvider', @@ -419,7 +426,7 @@ class JPAMetadataResolverServiceImpl implements MetadataResolverService { MetadataResource( 'xmlns:resource': 'urn:mace:shibboleth:2.0:resource', 'xsi:type': 'resource:ClasspathResource', - 'file': resolver.classpathMetadataResource.file) + 'file': resolver.classpathMetadataResource.fileResource) } childNodes() @@ -449,11 +456,11 @@ class JPAMetadataResolverServiceImpl implements MetadataResolverService { 'xsi:schemaLocation': 'urn:mace:shibboleth:2.0:metadata http://shibboleth.net/schema/idp/shibboleth-metadata.xsd urn:mace:shibboleth:2.0:resource http://shibboleth.net/schema/idp/shibboleth-resource.xsd urn:mace:shibboleth:2.0:security http://shibboleth.net/schema/idp/shibboleth-security.xsd urn:oasis:names:tc:SAML:2.0:metadata http://docs.oasis-open.org/security/saml/v2.0/saml-schema-metadata-2.0.xsd urn:oasis:names:tc:SAML:2.0:assertion http://docs.oasis-open.org/security/saml/v2.0/saml-schema-assertion-2.0.xsd' ) { - resolversPositionOrderContainerService.allMetadataResolversInDefinedOrderOrUnordered.each { edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.MetadataResolver mr -> - //TODO: We do not currently marshall the internal incommon chaining resolver (with BaseMetadataResolver type) - if ((mr.type != 'BaseMetadataResolver') && (mr.enabled)) { + // We do not currently marshall the internal incommon chaining resolver (with BaseMetadataResolver type) + // We do not want to include the custom type: ExternalMetadataResolver + if ((mr.type != 'BaseMetadataResolver') && (mr.type != 'ExternalMetadataResolver') && (mr.enabled)) { constructXmlNodeForResolver(mr, delegate) { //TODO: enhance def didNamespaceProtectionFilter = !(shibUIConfiguration.protectedAttributeNamespaces && shibUIConfiguration.protectedAttributeNamespaces.size() > 0) @@ -478,6 +485,42 @@ class JPAMetadataResolverServiceImpl implements MetadataResolverService { } } + @Override + Document generateExternalMetadataFilterConfiguration() { + // TODO: this can probably be a better writer + new StringWriter().withCloseable { writer -> + def xml = new MarkupBuilder(writer) + xml.omitEmptyAttributes = true + xml.omitNullAttributes = true + + // https://shibboleth.atlassian.net/wiki/spaces/IDP4/pages/1279033515/ByReferenceFilter + xml.MetadataFilter( + 'xsi:type': 'ByReference', + 'xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance', + 'xsi:schemaLocation': 'urn:mace:shibboleth:2.0:metadata http://shibboleth.net/schema/idp/shibboleth-metadata.xsd urn:mace:shibboleth:2.0:security http://shibboleth.net/schema/idp/shibboleth-security.xsd urn:oasis:names:tc:SAML:2.0:assertion http://docs.oasis-open.org/security/saml/v2.0/saml-schema-assertion-2.0.xsd urn:oasis:names:tc:SAML:2.0:metadata http://docs.oasis-open.org/security/saml/v2.0/saml-schema-metadata-2.0.xsd', + 'xmlns:md': 'urn:oasis:names:tc:SAML:2.0:metadata', + 'xmlns': 'urn:mace:shibboleth:2.0:metadata', + 'xmlns:security': 'urn:mace:shibboleth:2.0:security', + 'xmlns:saml2': 'urn:oasis:names:tc:SAML:2.0:assertion' + ) { + resolversPositionOrderContainerService.allMetadataResolversInDefinedOrderOrUnordered.each { + edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.MetadataResolver mr -> + // Only include the custom type: ExternalMetadataResolver + if ((mr.type == 'ExternalMetadataResolver') && (mr.enabled)) { + constructXmlNodeForResolver(mr, delegate) { + mr.metadataFilters.each { edu.internet2.tier.shibboleth.admin.ui.domain.filters.MetadataFilter filter -> + if (filter.isFilterEnabled()) { + constructXmlNodeForFilter(filter, delegate) + } + } + } + } + } + } + return DOMBuilder.newInstance().parseText(writer.toString()) + } + } + private String generateJavaScriptRegexScript(String regex) { return """ "use strict"; diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/CoreShibUiConfiguration.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/CoreShibUiConfiguration.java index c897a31b5..fdc85e20f 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/CoreShibUiConfiguration.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/CoreShibUiConfiguration.java @@ -6,6 +6,7 @@ import edu.internet2.tier.shibboleth.admin.ui.repository.MetadataResolverRepository; import edu.internet2.tier.shibboleth.admin.ui.repository.MetadataResolversPositionOrderContainerRepository; import edu.internet2.tier.shibboleth.admin.ui.scheduled.EntityDescriptorFilesScheduledTasks; +import edu.internet2.tier.shibboleth.admin.ui.scheduled.ExternalMetadataProvidersScheduledTasks; import edu.internet2.tier.shibboleth.admin.ui.scheduled.MetadataProvidersScheduledTasks; import edu.internet2.tier.shibboleth.admin.ui.security.model.listener.GroupUpdatedEntityListener; import edu.internet2.tier.shibboleth.admin.ui.security.model.listener.UserUpdatedEntityListener; @@ -88,6 +89,14 @@ public MetadataProvidersScheduledTasks metadataProvidersScheduledTasks( return new MetadataProvidersScheduledTasks(resource, metadataResolverService, fileWritingService()); } + @Bean + @ConditionalOnProperty(name = "shibui.external.metadataProviders.target") + public ExternalMetadataProvidersScheduledTasks externalMetadataProvidersScheduledTasks( + @Value("${shibui.external.metadataProviders.target}") final Resource resource, + final MetadataResolverService metadataResolverService) { + return new ExternalMetadataProvidersScheduledTasks(resource, metadataResolverService, fileWritingService()); + } + @Bean public EntityIdsSearchService entityIdsSearchService(LuceneUtility luceneUtility, Analyzer fullTokenAnalyzer) { return new EntityIdsSearchServiceImpl(luceneUtility, fullTokenAnalyzer); diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/JsonSchemaComponentsConfiguration.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/JsonSchemaComponentsConfiguration.java index d483319f3..34c5c1eaf 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/JsonSchemaComponentsConfiguration.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/JsonSchemaComponentsConfiguration.java @@ -14,6 +14,7 @@ import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.*; import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.SchemaType.ENTITY_ATTRIBUTES_FILTERS; +import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.SchemaType.EXTERNAL_METADATA_RESOLVER; import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.SchemaType.METADATA_SOURCES; import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.SchemaType.FILESYSTEM_METADATA_RESOLVER; import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.SchemaType.LOCAL_DYNAMIC_METADATA_RESOLVER; @@ -57,6 +58,8 @@ public class JsonSchemaComponentsConfiguration { @Setter private String nameIdFormatFilterUiSchemaLocation = "classpath:nameid-filter.schema.json"; + private String externalMetadataResolverUiSchemaLocation = "classpath:external.schema.json"; + @Bean public JsonSchemaResourceLocationRegistry jsonSchemaResourceLocationRegistry(ResourceLoader resourceLoader, ObjectMapper jacksonMapper) { return JsonSchemaResourceLocationRegistry.inMemory() @@ -90,6 +93,12 @@ public JsonSchemaResourceLocationRegistry jsonSchemaResourceLocationRegistry(Res .jacksonMapper(jacksonMapper) .detectMalformedJson(true) .build()) + .register(EXTERNAL_METADATA_RESOLVER, JsonSchemaLocationBuilder.with() + .jsonSchemaLocation(externalMetadataResolverUiSchemaLocation) + .resourceLoader(resourceLoader) + .jacksonMapper(jacksonMapper) + .detectMalformedJson(true) + .build()) .register(NAME_ID_FORMAT_FILTER, JsonSchemaLocationBuilder.with() .jsonSchemaLocation(nameIdFormatFilterUiSchemaLocation) .resourceLoader(resourceLoader) diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataResolversController.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataResolversController.java index 0f7b92338..6a11f07a2 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataResolversController.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataResolversController.java @@ -82,7 +82,7 @@ public ResponseEntity unableToParseJson(Exception ex) { return ResponseEntity.badRequest().body(new ErrorResponse(HttpStatus.BAD_REQUEST.toString(), ex.getMessage(), ex.getCause().getMessage())); } - @GetMapping("/MetadataResolvers") + @GetMapping(value = "/MetadataResolvers", produces = "application/json") @Transactional(readOnly = true) public ResponseEntity getAll() { List resolvers = positionOrderContainerService.getAllMetadataResolversInDefinedOrderOrUnordered(); @@ -92,7 +92,6 @@ public ResponseEntity getAll() { @GetMapping(value = "/MetadataResolvers", produces = "application/xml") @Transactional(readOnly = true) public ResponseEntity getXml() throws IOException, TransformerException { - // TODO: externalize try (StringWriter writer = new StringWriter()) { Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); @@ -103,6 +102,19 @@ public ResponseEntity getXml() throws IOException, TransformerException { } } + @GetMapping(value = "/MetadataResolvers/External", produces = "application/xml") + @Transactional(readOnly = true) + public ResponseEntity getExternalXml() throws IOException, TransformerException { + try (StringWriter writer = new StringWriter()) { + Transformer transformer = TransformerFactory.newInstance().newTransformer(); + transformer.setOutputProperty(OutputKeys.INDENT, "yes"); + transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); + + transformer.transform(new DOMSource(metadataResolverService.generateExternalMetadataFilterConfiguration()), new StreamResult(writer)); + return ResponseEntity.ok(writer.toString()); + } + } + @GetMapping("/MetadataResolvers/{resourceId}") @Transactional(readOnly = true) public ResponseEntity getOne(@PathVariable String resourceId) { diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/CustomEntityAttributeDefinition.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/CustomEntityAttributeDefinition.java index f1d14911a..6e7ced3e2 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/CustomEntityAttributeDefinition.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/CustomEntityAttributeDefinition.java @@ -35,7 +35,7 @@ public class CustomEntityAttributeDefinition implements IRelyingPartyOverridePro @ElementCollection @CollectionTable(name = "custom_entity_attr_list_items", joinColumns = @JoinColumn(name = "name")) @Fetch(FetchMode.JOIN) - @Column(name = "value", nullable = false) + @Column(name = "item_value", nullable = false) Set customAttrListDefinitions = new HashSet<>(); @Column(name = "default_value", nullable = true) @@ -114,4 +114,4 @@ public void setName(String name) { public void updateExamplesList() { examples = customAttrListDefinitions; } -} +} \ No newline at end of file diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/LocalizedName.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/LocalizedName.java index e0a54d494..3f7dcb48e 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/LocalizedName.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/LocalizedName.java @@ -3,6 +3,7 @@ import org.hibernate.envers.Audited; import javax.annotation.Nullable; +import javax.persistence.Column; import javax.persistence.MappedSuperclass; @MappedSuperclass @@ -11,6 +12,7 @@ public class LocalizedName extends AbstractXMLObject implements org.opensaml.sam private String xMLLang; + @Column(name = "name_value") private String value; @Nullable @@ -34,4 +36,4 @@ public String getValue() { public void setValue(@Nullable String value) { this.value = value; } -} +} \ No newline at end of file diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/OrganizationURL.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/OrganizationURL.java index c8e556695..625e96379 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/OrganizationURL.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/OrganizationURL.java @@ -14,7 +14,7 @@ public class OrganizationURL extends AbstractXMLObject implements org.opensaml.s private String xMLLang; - @Column(name="value") + @Column(name="uri_value") private String uri; @Nullable diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/X509Certificate.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/X509Certificate.java index b1db21b72..cff1a3c9d 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/X509Certificate.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/X509Certificate.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; @@ -14,6 +15,7 @@ public class X509Certificate extends AbstractXMLObject implements org.opensaml.xmlsec.signature.X509Certificate { @Column(name = "x509CertificateValue") @Lob + @Type(type = "org.hibernate.type.TextType") private String value; @Nullable @@ -26,4 +28,4 @@ public String getValue() { public void setValue(@Nullable String value) { this.value = value; } -} +} \ No newline at end of file diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/X509Data.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/X509Data.java index e875932cd..7afd88814 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/X509Data.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/X509Data.java @@ -19,6 +19,7 @@ import javax.xml.namespace.QName; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.stream.Collectors; @@ -74,10 +75,11 @@ public void addX509Certificate(edu.internet2.tier.shibboleth.admin.ui.domain.X50 this.xmlObjects.add(x509Certificate); } + // TODO: might need to really implement this @Nonnull @Override public List getX509CRLs() { - return null; + return Collections.EMPTY_LIST; } @Nonnull diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/filters/EntityAttributesFilterTarget.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/filters/EntityAttributesFilterTarget.java index a7959dbbf..e2ed028a0 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/filters/EntityAttributesFilterTarget.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/filters/EntityAttributesFilterTarget.java @@ -26,7 +26,7 @@ public class EntityAttributesFilterTarget extends AbstractAuditable implements I @ElementCollection (fetch = FetchType.EAGER) @OrderColumn - @Column(length = 760) + @Column(length = 760, name="target_value") private List value; public EntityAttributesFilterTargetType getEntityAttributesFilterTargetType() { diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/filters/NameIdFormatFilterTarget.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/filters/NameIdFormatFilterTarget.java index 90445ff75..3a5bfe9da 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/filters/NameIdFormatFilterTarget.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/filters/NameIdFormatFilterTarget.java @@ -8,6 +8,7 @@ import org.hibernate.envers.AuditOverride; import org.hibernate.envers.Audited; +import javax.persistence.Column; import javax.persistence.ElementCollection; import javax.persistence.Entity; import javax.persistence.OrderColumn; @@ -27,6 +28,7 @@ public class NameIdFormatFilterTarget extends AbstractAuditable implements IFilt @ElementCollection @OrderColumn + @Column(name="target_value") private List value; public NameIdFormatFilterTargetType getNameIdFormatFilterTargetType() { diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/ClasspathMetadataResource.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/ClasspathMetadataResource.java index a3dc076ab..a76943378 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/ClasspathMetadataResource.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/ClasspathMetadataResource.java @@ -15,6 +15,6 @@ @Setter @EqualsAndHashCode public class ClasspathMetadataResource { - - private String file; -} + // renamed from "file" to work with SQLServer + private String fileResource; +} \ No newline at end of file diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/ExternalMetadataResolver.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/ExternalMetadataResolver.java new file mode 100644 index 000000000..cf488be82 --- /dev/null +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/ExternalMetadataResolver.java @@ -0,0 +1,28 @@ +package edu.internet2.tier.shibboleth.admin.ui.domain.resolvers; + +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import org.hibernate.envers.Audited; + +import javax.persistence.Column; +import javax.persistence.Entity; + +@Entity +@EqualsAndHashCode(callSuper = true) +@Getter +@Setter +@ToString +@Audited +public class ExternalMetadataResolver extends MetadataResolver { + @Column + private String description; + + @Column + String name; + + public ExternalMetadataResolver() { + type = "ExternalMetadataResolver"; + } +} \ No newline at end of file diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/MetadataResolver.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/MetadataResolver.java index 63a04d764..19c96e753 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/MetadataResolver.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/MetadataResolver.java @@ -43,7 +43,8 @@ @JsonSubTypes.Type(value = FileBackedHttpMetadataResolver.class, name = "FileBackedHttpMetadataResolver"), @JsonSubTypes.Type(value = DynamicHttpMetadataResolver.class, name = "DynamicHttpMetadataResolver"), @JsonSubTypes.Type(value = FilesystemMetadataResolver.class, name = "FilesystemMetadataResolver"), - @JsonSubTypes.Type(value = ResourceBackedMetadataResolver.class, name = "ResourceBackedMetadataResolver")}) + @JsonSubTypes.Type(value = ResourceBackedMetadataResolver.class, name = "ResourceBackedMetadataResolver"), + @JsonSubTypes.Type(value = ExternalMetadataResolver.class, name = "ExternalMetadataResolver")}) @Audited @AuditOverride(forClass = AbstractAuditable.class) public class MetadataResolver extends AbstractAuditable implements IActivatable { diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/opensaml/OpenSamlFileBackedHTTPMetadataResolver.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/opensaml/OpenSamlFileBackedHTTPMetadataResolver.java index c5d64dc5b..4b642e52a 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/opensaml/OpenSamlFileBackedHTTPMetadataResolver.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/opensaml/OpenSamlFileBackedHTTPMetadataResolver.java @@ -15,6 +15,7 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; +import java.io.File; import java.time.Duration; import java.time.Instant; @@ -135,4 +136,16 @@ public synchronized void refresh() throws ResolverException { } } } + + @Override + public void validateBackupFile(final File backupFile) throws ResolverException { + // NOPE, not going to validate this because the file reference is likely not to exist on the shibui server nor even be a + // valid path on the running server. The file is needed for the XML, but we shouldn't be validating it. + } + + @Override + protected byte[] fetchMetadata() throws ResolverException { + // NOPE, we don't need to try and fetch the metadata from either the URI nor the file + return null; + } } \ No newline at end of file diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/opensaml/OpenSamlFilesystemMetadataResolver.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/opensaml/OpenSamlFilesystemMetadataResolver.java index c247e7b53..f8b9a856f 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/opensaml/OpenSamlFilesystemMetadataResolver.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/opensaml/OpenSamlFilesystemMetadataResolver.java @@ -88,4 +88,16 @@ public void refilter() { logger.error("An error occurred while attempting to filter metadata!", e); } } + + @Override + public void validateMetadataFile(@Nonnull final File file) throws ResolverException { + // NOPE, not going to validate this because the file reference is likely not to exist on the shibui server nor even be a + // valid path on the running server. The file is needed for the XML, but we shouldn't be validating it. + } + + @Override + protected byte[] fetchMetadata() throws ResolverException { + // NOPE, we don't need to try and fetch the metadata + return null; + } } \ No newline at end of file diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/jsonschema/JsonSchemaLocationLookup.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/jsonschema/JsonSchemaLocationLookup.java index 71986eea7..b44e4e7ce 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/jsonschema/JsonSchemaLocationLookup.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/jsonschema/JsonSchemaLocationLookup.java @@ -1,6 +1,7 @@ package edu.internet2.tier.shibboleth.admin.ui.jsonschema; import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.SchemaType.ENTITY_ATTRIBUTES_FILTERS; +import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.SchemaType.EXTERNAL_METADATA_RESOLVER; import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.SchemaType.METADATA_SOURCES; import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.SchemaType.FILESYSTEM_METADATA_RESOLVER; import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.SchemaType.LOCAL_DYNAMIC_METADATA_RESOLVER; @@ -66,6 +67,19 @@ public static JsonSchemaResourceLocation localDynamicMetadataProviderSchema(Json .orElseThrow(() -> new IllegalStateException("JSON schema resource location for local dynamic metadata resolver is not registered.")); } + /** + * Searches external metadata resolver JSON schema resource location object in the given location registry. + * + * @param resourceLocationRegistry + * @return external metadata resolver JSON schema resource location object + * @throws IllegalStateException if schema is not found in the given registry + */ + public static JsonSchemaResourceLocation externalMetadataProviderSchema(JsonSchemaResourceLocationRegistry resourceLocationRegistry) { + return resourceLocationRegistry + .lookup(EXTERNAL_METADATA_RESOLVER) + .orElseThrow(() -> new IllegalStateException("JSON schema resource location for external metadata resolver is not registered.")); + } + /** * Searches dynamic http metadata resolver JSON schema resource location object in the given location registry. * @@ -75,8 +89,8 @@ public static JsonSchemaResourceLocation localDynamicMetadataProviderSchema(Json */ public static JsonSchemaResourceLocation dynamicHttpMetadataProviderSchema(JsonSchemaResourceLocationRegistry resourceLocationRegistry) { return resourceLocationRegistry - .lookup(DYNAMIC_HTTP_METADATA_RESOLVER) - .orElseThrow(() -> new IllegalStateException("JSON schema resource location for dynamic http metadata resolver is not registered.")); + .lookup(DYNAMIC_HTTP_METADATA_RESOLVER) + .orElseThrow(() -> new IllegalStateException("JSON schema resource location for dynamic http metadata resolver is not registered.")); } /** @@ -91,4 +105,4 @@ public static JsonSchemaResourceLocation nameIdFormatFilterSchema(JsonSchemaReso .lookup(NAME_ID_FORMAT_FILTER) .orElseThrow(() -> new IllegalStateException("JSON schema resource location for name id format filter is not registered.")); } -} +} \ No newline at end of file diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/jsonschema/JsonSchemaResourceLocation.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/jsonschema/JsonSchemaResourceLocation.java index 2d25fac0b..1b9054cd3 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/jsonschema/JsonSchemaResourceLocation.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/jsonschema/JsonSchemaResourceLocation.java @@ -104,7 +104,8 @@ public enum SchemaType { FILE_BACKED_HTTP_METADATA_RESOLVER("FileBackedHttpMetadataResolver"), FILESYSTEM_METADATA_RESOLVER("FilesystemMetadataResolver"), LOCAL_DYNAMIC_METADATA_RESOLVER("LocalDynamicMetadataResolver"), - DYNAMIC_HTTP_METADATA_RESOLVER("DynamicHttpMetadataResolver"); + DYNAMIC_HTTP_METADATA_RESOLVER("DynamicHttpMetadataResolver"), + EXTERNAL_METADATA_RESOLVER("ExternalMetadataResolver"); String jsonType; diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/scheduled/ExternalMetadataProvidersScheduledTasks.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/scheduled/ExternalMetadataProvidersScheduledTasks.java new file mode 100644 index 000000000..b2e3c7d37 --- /dev/null +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/scheduled/ExternalMetadataProvidersScheduledTasks.java @@ -0,0 +1,53 @@ +package edu.internet2.tier.shibboleth.admin.ui.scheduled; + +import edu.internet2.tier.shibboleth.admin.ui.service.FileWritingService; +import edu.internet2.tier.shibboleth.admin.ui.service.MetadataResolverService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.Resource; +import org.springframework.core.io.WritableResource; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.transaction.annotation.Transactional; + +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import java.io.IOException; +import java.io.StringWriter; + +@Configuration +@ConditionalOnProperty("shibui.external.metadataProviders.target") +public class ExternalMetadataProvidersScheduledTasks { + private static final Logger logger = LoggerFactory.getLogger(ExternalMetadataProvidersScheduledTasks.class); + + private final Resource target; + private final MetadataResolverService metadataResolverService; + private final FileWritingService fileWritingService; + + public ExternalMetadataProvidersScheduledTasks(Resource target, MetadataResolverService metadataResolverService, FileWritingService fileWritingService) { + this.target = target; + this.metadataResolverService = metadataResolverService; + this.fileWritingService = fileWritingService; + } + + @Scheduled(fixedRateString = "${shibui.external.metadataProviders.taskRunRate:30000}") + @Transactional(readOnly = true) + public void generateMetadataProvidersFile() { + try (StringWriter os = new StringWriter()) { + Transformer transformer = TransformerFactory.newInstance().newTransformer(); + transformer.setOutputProperty(OutputKeys.INDENT, "yes"); + transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); + + + transformer.transform(new DOMSource(metadataResolverService.generateExternalMetadataFilterConfiguration()), new StreamResult(os)); + this.fileWritingService.write((WritableResource)this.target, os.toString()); + } catch (IOException | TransformerException e) { + logger.error(e.getLocalizedMessage(), e); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/service/MetadataResolverConverterServiceImpl.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/service/MetadataResolverConverterServiceImpl.java index 2343206a7..d0d20bd61 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/service/MetadataResolverConverterServiceImpl.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/service/MetadataResolverConverterServiceImpl.java @@ -99,7 +99,7 @@ private OpenSamlResourceBackedMetadataResolver convertToOpenSamlRepresentation(R break; case CLASSPATH: resource = ResourceHelper.of(new ClassPathResource(placeholderResolverService() - .resolveValueFromPossibleTokenPlaceholder(resolver.getClasspathMetadataResource().getFile()))); + .resolveValueFromPossibleTokenPlaceholder(resolver.getClasspathMetadataResource().getFileResource()))); break; default: throw new RuntimeException("Unsupported resource type!"); @@ -153,4 +153,4 @@ public boolean isDirectory() { return true; } } -} +} \ No newline at end of file diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/service/MetadataResolverService.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/service/MetadataResolverService.java index 5fd205c20..d851cd021 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/service/MetadataResolverService.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/service/MetadataResolverService.java @@ -7,6 +7,7 @@ import edu.internet2.tier.shibboleth.admin.ui.exception.EntityNotFoundException; import edu.internet2.tier.shibboleth.admin.ui.exception.ForbiddenException; import edu.internet2.tier.shibboleth.admin.ui.exception.InitializationException; +import org.w3c.dom.Node; public interface MetadataResolverService { public MetadataResolver findByResourceId(String resourceId) throws EntityNotFoundException; @@ -16,4 +17,6 @@ public interface MetadataResolverService { public void reloadFilters(String metadataResolverName); public MetadataResolver updateMetadataResolverEnabledStatus(MetadataResolver existingResolver) throws ForbiddenException, MetadataFileNotFoundException, InitializationException; -} + + public Document generateExternalMetadataFilterConfiguration(); +} \ No newline at end of file diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index 7943285f7..109e7c30f 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -9,6 +9,9 @@ logging.level.org.springframework=INFO logging.level.edu.internet2.tier.shibboleth.admin.ui=INFO spring.main.allow-bean-definition-overriding=true +# "In Spring MVC, the path was previously analyzed by AntPathMatcher, but it was changed to use PathPatternParser introduced in WebFlux from Spring 5.3.0." +# we still have the option to use ant path matcher thus keeping existing configuration from having to change +spring.mvc.pathmatch.matching-strategy=ant_path_matcher # Database Credentials spring.datasource.username=shibui @@ -16,7 +19,7 @@ spring.datasource.password=shibui # Database Configuration H2 spring.datasource.url=jdbc:h2:mem:shibui;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE -spring.datasource.platform=h2 +spring.sql.init.platform=h2 spring.datasource.driverClassName=org.h2.Driver spring.jpa.database-platform=org.hibernate.dialect.H2Dialect spring.h2.console.enabled=true @@ -37,14 +40,15 @@ spring.jackson.mapper.accept-case-insensitive-enums=true #spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDBDialect # Liquibase properties -spring.liquibase.enabled=false +spring.liquibase.enabled=true +spring.liquibase.change-log=db/changelog/changelog.sql # Hibernate properties # for production never ever use create, create-drop. It's BEST to use validate spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl spring.jpa.show-sql=false -spring.jpa.properties.hibernate.format_sql=false +spring.jpa.properties.hibernate.format_sql=true spring.jpa.properties.hibernate.check_nullability=true spring.jpa.hibernate.use-new-id-generator-mappings=true @@ -80,6 +84,12 @@ shibui.nameid-filter-ui-schema-location=classpath:nameid-filter.schema.json # shibui.metadataProviders.target=file:/opt/shibboleth-idp/conf/shibui-metadata-providers.xml # shibui.metadataProviders.taskRunRate=30000 +# Set the following property to periodically write out external metadata providers (ie metadata-filters) configuration. +# There is no default value; the following is just an example +# @see - https://shibboleth.atlassian.net/wiki/spaces/IDP4/pages/1279033515/ByReferenceFilter +# shibui.external.metadataProviders.target=file:/opt/shibboleth-idp/conf/metadata-filters.xml +# shibui.external.metadataProviders.taskRunRate=30000 + # Email configuration (local mailhog) # spring.mail.host=mailhog # spring.mail.port=1025 @@ -108,10 +118,13 @@ shibui.roles.authenticated=ADMIN,ENABLE,USER #docker container shibui.beacon-enabled=true +### Swagger/Springdoc patterns springdoc.use-management-port=true springdoc.swagger-ui.tagsSorter: alpha springdoc.writer-with-order-by-keys: true springdoc.pathsToMatch=/entities, /api/** # This property enables the openapi and swagger-ui endpoints to be exposed beneath the actuator base path. -management.endpoints.web.exposure.include=openapi, swagger-ui -management.server.port=9090 \ No newline at end of file +management.endpoints.web.exposure.include=openapi, swagger-ui, info +management.server.port=9090 +management.endpoints.web.cors.allowed-origins=* +management.endpoints.web.cors.allowed-headers=* \ No newline at end of file diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml index 671000aa6..ffeab970c 100644 --- a/backend/src/main/resources/application.yml +++ b/backend/src/main/resources/application.yml @@ -1,3 +1,12 @@ +#spring: +# jpa: +# show-sql: false +# properties: +# hibernate: +# format_sql: true +# dialect: org.hibernate.dialect.PostgreSQL95Dialect +# OR SEE: https://access.redhat.com/webassets/avalon/d/red-hat-jboss-enterprise-application-platform/7.2/javadocs/org/hibernate/dialect/package-summary.html + #shibui: ## Default password must be set for the default user to be configured and setup # default-rootuser:root diff --git a/backend/src/main/resources/db/changelog/README.txt b/backend/src/main/resources/db/changelog/README.txt new file mode 100644 index 000000000..2ebb5d59f --- /dev/null +++ b/backend/src/main/resources/db/changelog/README.txt @@ -0,0 +1,18 @@ +Understanding the liquidbase changelog.sql file + +" -- liquibase formatted sql" - this is required at the top of this file " + +" -- changeset liquibase:1.11.0 dbms:mariadb,mysql,postgresql " +This indicates a change set and the version - please use the release version that the change matches so that looking at the DB should +give a good indication of what has been run. + +The dbms section indicates which DBs the changeset that follows is valid to be run on. If this is not present, Liquidbase will try +to run the changeset always. + +" -- preconditions onFail:MARK_RAN " +" -- precondition-sql-check expectedResult:1 SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'users' " + +@see - https://docs.liquibase.com/concepts/changelogs/preconditions.html +The check here is looking to see if the schema has been built out yet. If it has not, then the db is new and will be created +correctly without needing to be updated, so MARK_RAN ensures that the given changeset will not be run, but will be added to the +liquibase changesetlog table indicating that it was checked. \ No newline at end of file diff --git a/backend/src/main/resources/db/changelog/changelog.sql b/backend/src/main/resources/db/changelog/changelog.sql new file mode 100644 index 000000000..0a63846a3 --- /dev/null +++ b/backend/src/main/resources/db/changelog/changelog.sql @@ -0,0 +1,178 @@ +-- liquibase formatted sql + +-- changeset liquibase:1.11.0.1 dbms:mysql,mariadb +-- 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 custom_entity_attr_list_items + CHANGE value item_value varchar(255); +GO +ALTER TABLE custom_entity_attr_list_items_aud + CHANGE value item_value varchar(255); +GO +ALTER TABLE entity_attributes_filter_target_value + CHANGE value target_value varchar(255); +GO +ALTER TABLE entity_attributes_filter_target_value_aud + CHANGE value target_value varchar(255); +GO +ALTER TABLE name_id_format_filter_target_value + CHANGE value target_value varchar(255); +GO +ALTER TABLE name_id_format_filter_target_value_aud + CHANGE value target_value varchar(255); +GO +ALTER TABLE organizationurl + CHANGE value uri_value varchar(255); +GO +ALTER TABLE organizationurl_aud + CHANGE value uri_value varchar(255); +GO +ALTER TABLE organization_display_name + CHANGE value name_value varchar(255); +GO +ALTER TABLE organization_display_name_aud + CHANGE value name_value varchar(255); +GO +ALTER TABLE organization_name + CHANGE value name_value varchar(255); +GO +ALTER TABLE organization_name_aud + CHANGE value name_value varchar(255); +GO +ALTER TABLE resource_backed_metadata_resolver + CHANGE file file_resource varchar(255); +GO +ALTER TABLE resource_backed_metadata_resolver_aud + CHANGE file file_resource varchar(255); +GO +ALTER TABLE service_description + CHANGE value name_value varchar(255); +GO +ALTER TABLE service_description_aud + CHANGE value name_value varchar(255); +GO +ALTER TABLE service_name + CHANGE value name_value varchar(255); +GO +ALTER TABLE service_name_aud + CHANGE value name_value varchar(255); +GO + + +-- changeset liquibase:1.11.0.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 custom_entity_attr_list_items + RENAME "value" TO "item_value"; +GO +ALTER TABLE custom_entity_attr_list_items_aud + RENAME "value" TO "item_value"; +GO +ALTER TABLE entity_attributes_filter_target_value + RENAME "value" TO "target_value"; +GO +ALTER TABLE entity_attributes_filter_target_value_aud + RENAME "value" TO "target_value"; +GO +ALTER TABLE name_id_format_filter_target_value + RENAME "value" TO "target_value"; +GO +ALTER TABLE name_id_format_filter_target_value_aud + RENAME "value" TO "target_value"; +GO +ALTER TABLE organizationurl + RENAME "value" TO "uri_value"; +GO +ALTER TABLE organizationurl_aud + RENAME "value" TO "uri_value"; +GO +ALTER TABLE organization_display_name + RENAME "value" TO "name_value"; +GO +ALTER TABLE organization_display_name_aud + RENAME "value" TO "name_value"; +GO +ALTER TABLE organization_name + RENAME "value" TO "name_value"; +GO +ALTER TABLE organization_name_aud + RENAME "value" TO "name_value"; +GO +ALTER TABLE resource_backed_metadata_resolver + RENAME "file" TO "file_resource"; +GO +ALTER TABLE resource_backed_metadata_resolver_aud + RENAME "file" TO "file_resource"; +GO +ALTER TABLE service_description + RENAME "value" TO "name_value"; +GO +ALTER TABLE service_description_aud + RENAME "value" TO "name_value"; +GO +ALTER TABLE service_name + RENAME "value" TO "name_value"; +GO +ALTER TABLE service_name_aud + RENAME "value" TO "name_value"; +GO + + +-- changeset liquibase:1.11.0.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 */ +EXEC sp_rename 'custom_entity_attr_list_items.value', item_value, 'COLUMN' +GO +EXEC sp_rename 'custom_entity_attr_list_items_aud.value', item_value, 'COLUMN' +GO +EXEC sp_rename 'entity_attributes_filter_target_value.value', target_value, 'COLUMN' +GO +EXEC sp_rename 'entity_attributes_filter_target_value_aud.value', target_value, 'COLUMN' +GO +EXEC sp_rename 'name_id_format_filter_target_value.value', target_value, 'COLUMN' +GO +EXEC sp_rename 'name_id_format_filter_target_value_aud.value', target_value, 'COLUMN' +GO +EXEC sp_rename 'organizationurl.value', uri_value, 'COLUMN' +GO +EXEC sp_rename 'organizationurl_aud.value', uri_value, 'COLUMN' +GO +EXEC sp_rename 'organization_display_name.value', name_value, 'COLUMN' +GO +EXEC sp_rename 'organization_display_name_aud.value', name_value, 'COLUMN' +GO +EXEC sp_rename 'organization_name.value', name_value, 'COLUMN' +GO +EXEC sp_rename 'organization_name_aud.value', name_value, 'COLUMN' +GO +EXEC sp_rename 'service_description.value', name_value, 'COLUMN' +GO +EXEC sp_rename 'service_description_aud.value', name_value, 'COLUMN' +GO +EXEC sp_rename 'service_name.value', name_value, 'COLUMN' +GO +EXEC sp_rename 'service_name_aud.value', name_value, 'COLUMN' +GO + +-- changeset liquibase:1.11.0.2 dbms:mariadb,postgresql,mssql,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 */ + +update filesystem_metadata_resolver set min_refresh_delay ='PT5M'; +update filesystem_metadata_resolver_aud set min_refresh_delay ='PT5M'; +update filesystem_metadata_resolver set max_refresh_delay ='PT4H'; +update filesystem_metadata_resolver_aud set max_refresh_delay ='PT4H'; + +update file_backed_http_metadata_resolver set min_refresh_delay ='PT5M'; +update file_backed_http_metadata_resolver_aud set min_refresh_delay ='PT5M'; +update file_backed_http_metadata_resolver set max_refresh_delay ='PT4H'; +update file_backed_http_metadata_resolver_aud set max_refresh_delay ='PT4H'; + +update resource_backed_metadata_resolver set min_refresh_delay ='PT5M'; +update resource_backed_metadata_resolver_aud set min_refresh_delay ='PT5M'; +update resource_backed_metadata_resolver set max_refresh_delay ='PT4H'; +update resource_backed_metadata_resolver_aud set max_refresh_delay ='PT4H'; \ No newline at end of file diff --git a/backend/src/main/resources/dynamic-http-metadata-provider.schema.json b/backend/src/main/resources/dynamic-http-metadata-provider.schema.json index cd4ef1d60..b1719f8c6 100644 --- a/backend/src/main/resources/dynamic-http-metadata-provider.schema.json +++ b/backend/src/main/resources/dynamic-http-metadata-provider.schema.json @@ -253,60 +253,18 @@ "type": "string", "title": "label.connection-request-timeout", "description": "tooltip.connection-request-timeout", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "connectionTimeout": { "type": "string", "title": "label.connection-timeout", "description": "tooltip.connection-timeout", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "socketTimeout": { "type": "string", "title": "label.socket-timeout", "description": "tooltip.socket-timeout", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "tlsTrustEngineRef": { diff --git a/backend/src/main/resources/external.schema.json b/backend/src/main/resources/external.schema.json new file mode 100644 index 000000000..daa8c4503 --- /dev/null +++ b/backend/src/main/resources/external.schema.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "required": [ + "name", + "@type", + "xmlId", + "description" + ], + "properties": { + "name": { + "title": "label.metadata-provider-name-dashboard-display-only", + "description": "tooltip.metadata-provider-name-dashboard-display-only", + "type": "string", + "widget": { + "id": "string", + "help": "message.must-be-unique" + } + }, + "@type": { + "title": "label.metadata-provider-type", + "description": "tooltip.metadata-provider-type", + "type": "string", + "const": "FilesystemMetadataResolver" + }, + "xmlId": { + "title": "label.metadata-resolver-id", + "description": "tooltip.xml-id", + "type": "string", + "minLength": 1 + }, + "enabled": { + "title": "label.enable-provider-upon-saving", + "description": "tooltip.enable-provider-upon-saving", + "type": "boolean", + "default": false + }, + "description": { + "title": "label.description", + "description": "tooltip.description", + "type": "string" + } + } +} \ No newline at end of file diff --git a/backend/src/main/resources/file-system-metadata-provider.schema.json b/backend/src/main/resources/file-system-metadata-provider.schema.json index 7969495f2..a4db5a52d 100644 --- a/backend/src/main/resources/file-system-metadata-provider.schema.json +++ b/backend/src/main/resources/file-system-metadata-provider.schema.json @@ -1,11 +1,6 @@ { "type": "object", - "required": [ - "name", - "@type", - "xmlId", - "metadataFile" - ], + "required": ["name", "@type", "xmlId", "metadataFile"], "properties": { "name": { "title": "label.metadata-provider-name-dashboard-display-only", @@ -47,18 +42,21 @@ }, "reloadableMetadataResolverAttributes": { "type": "object", + "required": ["minRefreshDelay", "maxRefreshDelay"], "properties": { "minRefreshDelay": { "title": "label.min-refresh-delay", "description": "tooltip.min-refresh-delay", "type": "string", - "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$", + "default": "PT5M" }, "maxRefreshDelay": { "title": "label.max-refresh-delay", "description": "tooltip.max-refresh-delay", "type": "string", - "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$", + "default": "PT4H" }, "refreshDelayFactor": { "title": "label.refresh-delay-factor", @@ -71,4 +69,4 @@ } } } -} \ No newline at end of file +} diff --git a/backend/src/main/resources/filebacked-http-metadata-provider.schema.json b/backend/src/main/resources/filebacked-http-metadata-provider.schema.json index f678ee306..277f3d3f9 100644 --- a/backend/src/main/resources/filebacked-http-metadata-provider.schema.json +++ b/backend/src/main/resources/filebacked-http-metadata-provider.schema.json @@ -101,152 +101,104 @@ "order": [], "type": "object", "properties": { - "disregardTLSCertificate": { - "type": "boolean", - "title": "label.disregard-tls-cert", - "description": "tooltip.disregard-tls-cert" + "disregardTLSCertificate": { + "type": "boolean", + "title": "label.disregard-tls-cert", + "description": "tooltip.disregard-tls-cert" + }, + "httpClientRef": { + "type": "string", + "title": "", + "description": "", + "widget": "hidden" + }, + "connectionRequestTimeout": { + "type": "string", + "title": "label.connection-request-timeout", + "description": "tooltip.connection-request-timeout", + "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + }, + "connectionTimeout": { + "type": "string", + "title": "label.connection-timeout", + "description": "tooltip.connection-timeout", + "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + }, + "socketTimeout": { + "type": "string", + "title": "label.socket-timeout", + "description": "tooltip.socket-timeout", + "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + }, + "tlsTrustEngineRef": { + "type": "string", + "title": "", + "description": "" + }, + "httpClientSecurityParametersRef": { + "type": "string", + "title": "", + "description": "" + }, + "proxyHost": { + "type": "string", + "title": "label.proxy-host", + "description": "tooltip.proxy-host" + }, + "proxyPort": { + "type": "string", + "title": "label.proxy-port", + "description": "tooltip.proxy-port" + }, + "proxyUser": { + "type": "string", + "title": "label.proxy-user", + "description": "tooltip.proxy-user" + }, + "proxyPassword": { + "type": "string", + "title": "label.proxy-password", + "description": "tooltip.proxy-password" + }, + "httpCaching": { + "type": "string", + "title": "label.http-caching", + "description": "tooltip.http-caching", + "widget": { + "id": "select" }, - "httpClientRef": { - "type": "string", - "title": "", - "description": "", - "widget": "hidden" - }, - "connectionRequestTimeout": { - "type": "string", - "title": "label.connection-request-timeout", - "description": "tooltip.connection-request-timeout", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" - }, - "connectionTimeout": { - "type": "string", - "title": "label.connection-timeout", - "description": "tooltip.connection-timeout", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" - }, - "socketTimeout": { - "type": "string", - "title": "label.socket-timeout", - "description": "tooltip.socket-timeout", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" - }, - "tlsTrustEngineRef": { - "type": "string", - "title": "", - "description": "" - }, - "httpClientSecurityParametersRef": { - "type": "string", - "title": "", - "description": "" - }, - "proxyHost": { - "type": "string", - "title": "label.proxy-host", - "description": "tooltip.proxy-host" - }, - "proxyPort": { - "type": "string", - "title": "label.proxy-port", - "description": "tooltip.proxy-port" - }, - "proxyUser": { - "type": "string", - "title": "label.proxy-user", - "description": "tooltip.proxy-user" - }, - "proxyPassword": { - "type": "string", - "title": "label.proxy-password", - "description": "tooltip.proxy-password" - }, - "httpCaching": { - "type": "string", - "title": "label.http-caching", - "description": "tooltip.http-caching", - "widget": { - "id": "select" - }, - "oneOf": [ - { - "enum": [ - "none" - ], - "description": "value.none" - }, - { - "enum": [ - "file" - ], - "description": "value.file" - }, - { - "enum": [ - "memory" - ], - "description": "value.memory" - } - ] - }, - "httpCacheDirectory": { - "type": "string", - "title": "label.http-caching-directory", - "description": "tooltip.http-caching-directory" - }, - "httpMaxCacheEntries": { - "type": "integer", - "title": "label.http-max-cache-entries", - "description": "tooltip.http-max-cache-entries", - "minimum": 0 - }, - "httpMaxCacheEntrySize": { - "type": "integer", - "title": "label.max-cache-entry-size", - "description": "tooltip.max-cache-entry-size", - "minimum": 0 - } + "oneOf": [ + { + "enum": ["none"], + "description": "value.none" + }, + { + "enum": ["file"], + "description": "value.file" + }, + { + "enum": ["memory"], + "description": "value.memory" + } + ] + }, + "httpCacheDirectory": { + "type": "string", + "title": "label.http-caching-directory", + "description": "tooltip.http-caching-directory" + }, + "httpMaxCacheEntries": { + "type": "integer", + "title": "label.http-max-cache-entries", + "description": "tooltip.http-max-cache-entries", + "minimum": 0 + }, + "httpMaxCacheEntrySize": { + "type": "integer", + "title": "label.max-cache-entry-size", + "description": "tooltip.max-cache-entry-size", + "minimum": 0 + } } }, "reloadableMetadataResolverAttributes": { @@ -257,13 +209,15 @@ "title": "label.min-refresh-delay", "description": "tooltip.min-refresh-delay", "type": "string", - "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$", + "default": "PT5M" }, "maxRefreshDelay": { "title": "label.max-refresh-delay", "description": "tooltip.max-refresh-delay", "type": "string", - "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$", + "default": "PT4H" }, "refreshDelayFactor": { "title": "label.refresh-delay-factor", diff --git a/backend/src/main/resources/i18n/messages.properties b/backend/src/main/resources/i18n/messages.properties index e25a7e5b9..d5202280e 100644 --- a/backend/src/main/resources/i18n/messages.properties +++ b/backend/src/main/resources/i18n/messages.properties @@ -344,6 +344,7 @@ label.default-authentication-methods=Default Authentication Method(s) label.new-of-type=New { type } label.filters=Filters label.attributes=Attributes +label.metadata-resolver-id=Metadata Resolver ID label.metadata-filter-name=Metadata Filter Name (Dashboard Display Only) label.filter-enable=Enable this Filter? @@ -685,7 +686,7 @@ tooltip.retained-roles=Note that property replacement cannot be used on this ele tooltip.remove-roleless-entity-descriptors=Controls whether to keep entity descriptors that contain no roles. Note: If this attribute is set to false, the resulting output may not be schema-valid since an element must include at least one role descriptor. tooltip.remove-empty-entities-descriptors=Controls whether to keep entities descriptors that contain no entity descriptors. Note: If this attribute is set to false, the resulting output may not be schema-valid since an element must include at least one child element, either an element or an element. -tooltip.min-refresh-delay=Lower bound on the next refresh from the time calculated based on the metadata\u0027s expiration. +tooltip.min-refresh-delay=Lower bound on the next refresh from the time calculated based on the metadata\u0027s expiration. Setting this to 0 will result in the default value being used. tooltip.max-refresh-delay=Upper bound on the next refresh from the time calculated based on the metadata\u0027s expiration. tooltip.refresh-delay-factor=A factor applied to the initially determined refresh time in order to determine the next refresh time (typically to ensure refresh takes place prior to the metadata\u0027s expiration). Attempts to refresh metadata will generally begin around the product of this number and the maximum refresh delay. tooltip.resolve-via-predicates-only=Flag indicating whether resolution may be performed solely by applying predicates to the entire metadata collection, when an entityID input criterion is not supplied. diff --git a/backend/src/main/resources/i18n/messages_en.properties b/backend/src/main/resources/i18n/messages_en.properties index dc4bce8b9..ca93cdbb3 100644 --- a/backend/src/main/resources/i18n/messages_en.properties +++ b/backend/src/main/resources/i18n/messages_en.properties @@ -531,7 +531,7 @@ tooltip.retained-roles=Note that property replacement cannot be used on this ele tooltip.remove-roleless-entity-descriptors=Controls whether to keep entity descriptors that contain no roles. Note: If this attribute is set to false, the resulting output may not be schema-valid since an element must include at least one role descriptor. tooltip.remove-empty-entities-descriptors=Controls whether to keep entities descriptors that contain no entity descriptors. Note: If this attribute is set to false, the resulting output may not be schema-valid since an element must include at least one child element, either an element or an element. -tooltip.min-refresh-delay=Lower bound on the next refresh from the time calculated based on the metadata\u0027s expiration. +tooltip.min-refresh-delay=Lower bound on the next refresh from the time calculated based on the metadata\u0027s expiration. Setting this to 0 will result in the default value being used. tooltip.max-refresh-delay=Upper bound on the next refresh from the time calculated based on the metadata\u0027s expiration. tooltip.refresh-delay-factor=A factor applied to the initially determined refresh time in order to determine the next refresh time (typically to ensure refresh takes place prior to the metadata\u0027s expiration). Attempts to refresh metadata will generally begin around the product of this number and the maximum refresh delay. tooltip.resolve-via-predicates-only=Flag indicating whether resolution may be performed solely by applying predicates to the entire metadata collection, when an entityID input criterion is not supplied. diff --git a/backend/src/main/resources/jpa-signature-config.xml b/backend/src/main/resources/jpa-signature-config.xml index 0a6696db5..9a8da32e8 100644 --- a/backend/src/main/resources/jpa-signature-config.xml +++ b/backend/src/main/resources/jpa-signature-config.xml @@ -39,7 +39,275 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/backend/src/main/resources/modified-saml2-assertion-config.xml b/backend/src/main/resources/modified-saml2-assertion-config.xml index 2f09fa77b..3349e4558 100644 --- a/backend/src/main/resources/modified-saml2-assertion-config.xml +++ b/backend/src/main/resources/modified-saml2-assertion-config.xml @@ -230,7 +230,19 @@ - + + + + + + + + + + + + + diff --git a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataFiltersControllerTests.groovy b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataFiltersControllerTests.groovy index c0a7d0e68..82bee21b2 100644 --- a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataFiltersControllerTests.groovy +++ b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/controller/MetadataFiltersControllerTests.groovy @@ -96,6 +96,11 @@ class MetadataFiltersControllerTests extends AbstractBaseDataJpaTest { return null } + @Override + Document generateExternalMetadataFilterConfiguration() { + return null + } + @Override MetadataResolver findByResourceId(String resourceId) throws EntityNotFoundException { // This won't get called diff --git a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/OpenSamlResourceBackedMetadataResolverTests.groovy b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/OpenSamlResourceBackedMetadataResolverTests.groovy index 28223b2f8..52ae52374 100644 --- a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/OpenSamlResourceBackedMetadataResolverTests.groovy +++ b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/domain/resolvers/OpenSamlResourceBackedMetadataResolverTests.groovy @@ -15,10 +15,10 @@ class OpenSamlResourceBackedMetadataResolverTests extends Specification { def 'test refresh'() { when: def rbmr = new ResourceBackedMetadataResolver(name: 'test', xmlId: 'test', classpathMetadataResource: new ClasspathMetadataResource('metadata/metadata.xml')) - def x = new OpenSamlResourceBackedMetadataResolver(openSamlObjects.parserPool, null, rbmr, ResourceHelper.of(new ClassPathResource(rbmr.classpathMetadataResource.file))) + def x = new OpenSamlResourceBackedMetadataResolver(openSamlObjects.parserPool, null, rbmr, ResourceHelper.of(new ClassPathResource(rbmr.classpathMetadataResource.fileResource))) x.refilter() then: noExceptionThrown() } -} +} \ No newline at end of file diff --git a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/service/JPAMetadataResolverServiceImplTests.groovy b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/service/JPAMetadataResolverServiceImplTests.groovy index 594ee6750..9905dbcea 100644 --- a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/service/JPAMetadataResolverServiceImplTests.groovy +++ b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/service/JPAMetadataResolverServiceImplTests.groovy @@ -1,14 +1,19 @@ package edu.internet2.tier.shibboleth.admin.ui.service +import com.google.common.collect.Lists import edu.internet2.tier.shibboleth.admin.ui.AbstractBaseDataJpaTest import edu.internet2.tier.shibboleth.admin.ui.configuration.PlaceholderResolverComponentsConfiguration import edu.internet2.tier.shibboleth.admin.ui.configuration.ShibUIConfiguration +import edu.internet2.tier.shibboleth.admin.ui.domain.Attribute +import edu.internet2.tier.shibboleth.admin.ui.domain.AttributeValue +import edu.internet2.tier.shibboleth.admin.ui.domain.XSString import edu.internet2.tier.shibboleth.admin.ui.domain.filters.EntityAttributesFilter import edu.internet2.tier.shibboleth.admin.ui.domain.filters.EntityAttributesFilterTarget import edu.internet2.tier.shibboleth.admin.ui.domain.filters.MetadataFilter import edu.internet2.tier.shibboleth.admin.ui.domain.filters.RequiredValidUntilFilter import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.ClasspathMetadataResource import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.DynamicHttpMetadataResolver +import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.ExternalMetadataResolver import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.LocalDynamicMetadataResolver import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.MetadataQueryProtocolScheme import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.RegexScheme @@ -18,6 +23,7 @@ import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.opensaml.OpenSaml import edu.internet2.tier.shibboleth.admin.ui.opensaml.OpenSamlObjects import edu.internet2.tier.shibboleth.admin.ui.repository.MetadataResolverRepository import edu.internet2.tier.shibboleth.admin.ui.util.TestObjectGenerator +import edu.internet2.tier.shibboleth.admin.util.AttributeUtility import groovy.xml.DOMBuilder import groovy.xml.MarkupBuilder import net.shibboleth.ext.spring.resource.ResourceHelper @@ -31,6 +37,8 @@ import org.springframework.boot.test.context.TestConfiguration import org.springframework.context.annotation.Bean import org.springframework.core.io.ClassPathResource import org.springframework.test.context.ContextConfiguration +import org.w3c.dom.Document +import org.w3c.dom.Node import org.xmlunit.builder.DiffBuilder import org.xmlunit.builder.Input import spock.lang.Ignore @@ -67,6 +75,7 @@ class JPAMetadataResolverServiceImplTests extends AbstractBaseDataJpaTest { @Autowired TestObjectGenerator testObjectGenerator + AttributeUtility attributeUtility DOMBuilder domBuilder = DOMBuilder.newInstance() StringWriter writer = new StringWriter() MarkupBuilder markupBuilder @@ -75,6 +84,7 @@ class JPAMetadataResolverServiceImplTests extends AbstractBaseDataJpaTest { markupBuilder = new MarkupBuilder(writer) markupBuilder.omitNullAttributes = true markupBuilder.omitEmptyAttributes = true + attributeUtility = new AttributeUtility(openSamlObjects) } def cleanup() { @@ -82,6 +92,43 @@ class JPAMetadataResolverServiceImplTests extends AbstractBaseDataJpaTest { writer.close() } + def 'test generating ExternalMetadataResolver XML'() { + given: + def resolver = new ExternalMetadataResolver().with { + it.setEnabled(true) + it.setName("testme") + it.setXmlId("InCommonMD") + it.setDescription("some description that won't appear in the xml") + it.addFilter(new EntityAttributesFilter().with { + it.name = 'EntityAttributes' + EntityAttributesFilterTarget filterTarget = testObjectGenerator.buildEntityAttributesFilterTarget() + filterTarget.setSingleValue("https://sp.example.org/shibboleth") + it.setEntityAttributesFilterTarget(filterTarget) + def attribute = attributeUtility.createAttributeWithStringValues('http://shibboleth.net/ns/attributes/releaseAllValues', null, 'eduPersonPrincipalName') + attribute.nameFormat = 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri' + attribute.namespacePrefix = 'saml2' + attribute.attributeValues.each { val -> + ((XSString)val).namespacePrefix = 'saml2' + + '' + } + it.attributes = [attribute] + it.intoTransientRepresentation() + it.enabled = true; + it + }) + it + } + metadataResolverRepository.save(resolver) + metadataResolverService.reloadFilters("testme") + + when: + Document doc = JPAMetadataResolverServiceImpl.cast(metadataResolverService).generateExternalMetadataFilterConfiguration() + Node node = doc.getFirstChild() + + then: + generatedXmlIsTheSameAsExpectedXml('/conf/2269.xml', node) + } + def 'test adding a filter'() { given: def expectedXML = ''' @@ -108,7 +155,7 @@ class JPAMetadataResolverServiceImplTests extends AbstractBaseDataJpaTest { it.resourceId = "testme" it.name = "testme" it.classpathMetadataResource = new ClasspathMetadataResource().with { - it.file = "metadata/aggregate.xml" + it.fileResource = "metadata/aggregate.xml" it } it.metadataFilters.add(new EntityAttributesFilter().with { @@ -275,7 +322,7 @@ class JPAMetadataResolverServiceImplTests extends AbstractBaseDataJpaTest { def resolver = new edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.ResourceBackedMetadataResolver().with { it.xmlId = 'ClasspathResourceMetadata' it.classpathMetadataResource = new ClasspathMetadataResource().with { - it.file = '/path/to/a/classpath/location/metadata.xml' + it.fileResource = '/path/to/a/classpath/location/metadata.xml' it } it diff --git a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/util/TestHelpers.groovy b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/util/TestHelpers.groovy index f50263663..e2d67412e 100644 --- a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/util/TestHelpers.groovy +++ b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/util/TestHelpers.groovy @@ -3,20 +3,20 @@ package edu.internet2.tier.shibboleth.admin.ui.util import edu.internet2.tier.shibboleth.admin.ui.security.model.User import groovy.xml.XmlUtil import junit.framework.Assert -import javax.xml.transform.Source; -import javax.xml.transform.Transformer -import javax.xml.transform.TransformerException -import javax.xml.transform.TransformerFactory -import javax.xml.transform.dom.DOMSource -import javax.xml.transform.stream.StreamResult - import org.apache.commons.lang.StringUtils -import org.springframework.security.core.context.SecurityContextHolder import org.w3c.dom.Document +import org.w3c.dom.Node import org.xmlunit.builder.DiffBuilder import org.xmlunit.builder.Input import org.xmlunit.builder.Input.Builder +import javax.xml.transform.Source +import javax.xml.transform.Transformer +import javax.xml.transform.TransformerException +import javax.xml.transform.TransformerFactory +import javax.xml.transform.dom.DOMSource +import javax.xml.transform.stream.StreamResult + /** * @author Bill Smith (wsmith@unicon.net) */ @@ -50,6 +50,19 @@ class TestHelpers { Assert.assertFalse(myDiff.toString(), myDiff.hasDifferences()); } + static void generatedXmlIsTheSameAsExpectedXml(String expectedXmlResource, Node generatedXml) { + def Builder builder = Input.fromNode(generatedXml) + def Source source = builder.build() + def myDiff = DiffBuilder.compare(Input.fromStream(TestHelpers.getResourceAsStream(expectedXmlResource))) + .withTest(builder) + .withAttributeFilter({attribute -> !attribute.name.equals("sourceDirectory")}) + .ignoreComments() + .ignoreWhitespace() + .build() + System.out.println("@@@ \n" + getString(source) + "\n") + Assert.assertFalse(myDiff.toString(), myDiff.hasDifferences()); + } + public static String getString(DOMSource domSource) throws TransformerException { StringWriter writer = new StringWriter(); StreamResult result = new StreamResult(writer); @@ -67,4 +80,4 @@ class TestHelpers { def user = new User(username: username, role: rolename) Optional.of(user) } -} +} \ No newline at end of file diff --git a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/util/TestObjectGenerator.groovy b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/util/TestObjectGenerator.groovy index bf17b107e..7b2865462 100644 --- a/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/util/TestObjectGenerator.groovy +++ b/backend/src/test/groovy/edu/internet2/tier/shibboleth/admin/ui/util/TestObjectGenerator.groovy @@ -30,7 +30,6 @@ import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.MetadataQueryProt import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.MetadataResolver import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.ReloadableMetadataResolverAttributes import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.ResourceBackedMetadataResolver -import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.SvnMetadataResource import edu.internet2.tier.shibboleth.admin.util.AttributeUtility import edu.internet2.tier.shibboleth.admin.util.MDDCConstants import edu.internet2.tier.shibboleth.admin.util.ModelRepresentationConversions @@ -607,7 +606,7 @@ class TestObjectGenerator { it.name = 'ClasspathResourceMetadata' it.xmlId = 'ClasspathResourceMetadata' it.classpathMetadataResource = new ClasspathMetadataResource().with { - it.file = 'metadata/metadata.xml' + it.fileResource = 'metadata/metadata.xml' it } it.reloadableMetadataResolverAttributes = new ReloadableMetadataResolverAttributes().with { diff --git a/backend/src/test/resources/conf/2269.xml b/backend/src/test/resources/conf/2269.xml new file mode 100644 index 000000000..f4c166e29 --- /dev/null +++ b/backend/src/test/resources/conf/2269.xml @@ -0,0 +1,21 @@ + + + + + + + eduPersonPrincipalName + + https://sp.example.org/shibboleth + + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle index ee0af8876..3fcdff1c6 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id 'base' - id 'net.researchgate.release' version '2.6.0' + id 'net.researchgate.release' version '3.0.0' id 'com.github.breadmoirai.github-release' version '2.2.9' } @@ -23,9 +23,10 @@ githubRelease { release { git { - pushToRemote = 'i2' + pushToRemote.set(project.'i2.git.remote') + requireBranch.set(project.'i2.git.branch') } } afterReleaseBuild.dependsOn project.getTasksByName('githubRelease', false) -afterReleaseBuild.dependsOn project.getTasksByName('dockerTagsPush', true) +afterReleaseBuild.dependsOn project.getTasksByName('dockerTagsPush', true) \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index f645de2d4..7efe1ae08 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,12 +1,11 @@ name=shibui group=edu.internet2.tier.shibboleth.admin.ui -version=1.11.0-SNAPSHOT +version=1.12.0-SNAPSHOT ### library versions ### commonsCollections4Version=4.4 cryptacularVersion=1.2.4 -hibernateVersion=5.5.0.Final -#hibernateVersion=5.6.9.Final +hibernateVersion=5.6.9.Final luceneVersion=8.1.1 log4JVersion=2.17.2 lombokVersion=5.3.3.3 @@ -14,10 +13,14 @@ opensamlVersion=4.2.0 pac4JVersion=5.4.3 pac4jSpringSecurityVersion=7.0.3 shibbolethVersion=4.2.1 -springbootVersion=2.5.12 -#springbootVersion=2.7.0 -springSecurityVersion=5.6.3 -# springSecurityVersion=5.7.1 +springbootVersion=2.7.0 +springSecurityVersion=5.7.1 + +### DB Driver Versions ### +mariadbVersion=3.0.4 +mysqlVersion=8.0.29 +postgresVersion=42.3.4 +sqlserverVersion=9.4.1.jre11 org.gradle.jvmargs=-Xmx1g -XX:-UseGCOverheadLimit @@ -26,13 +29,9 @@ i2.github.token= i2.github.owner=TIER i2.github.repo=shib-idp-ui i2.github.apiEndpoint=https://github.internet2.edu/api/v3 +i2.git.remote=i2 +i2.git.branch=master ## NOTES # pac4j spring security 7.0.3 here uses the pac4j 5.4.3 core, thus differences in versions (they used use the same versions, now -# keeping them in sync takes paying attention -# -# Springboot 2.7.0 and Hibernate 5.6.9 are current, but don't like all the columns named "value" in the db (along with H2), so don't -# update to these versions until ready to migrate the database columns. (the tests fail under these versions because the test database -# doesn't work). -# -# Additionally, springbootsecurity for tests doesn't like 5.7.1 \ No newline at end of file +# keeping them in sync takes paying attention \ No newline at end of file diff --git a/pac4j-module/build.gradle b/pac4j-module/build.gradle index 6a1295758..4080df12a 100644 --- a/pac4j-module/build.gradle +++ b/pac4j-module/build.gradle @@ -46,8 +46,11 @@ dependencies { exclude group: 'org.opensaml' exclude group: 'commons-collections' } + // But we do need this opensaml lib that wasn't provided + implementation "org.opensaml:opensaml-storage-impl:${project.'opensamlVersion'}" compile "org.apache.commons:commons-collections4:${project.'commonsCollections4Version'}" + testCompile project(':backend') testCompile "org.opensaml:opensaml-saml-api:${project.'opensamlVersion'}" diff --git a/pac4j-module/src/main/java/net/unicon/shibui/pac4j/WebSecurity.java b/pac4j-module/src/main/java/net/unicon/shibui/pac4j/WebSecurity.java index a67bf4a96..884569ac7 100644 --- a/pac4j-module/src/main/java/net/unicon/shibui/pac4j/WebSecurity.java +++ b/pac4j-module/src/main/java/net/unicon/shibui/pac4j/WebSecurity.java @@ -5,7 +5,7 @@ import edu.internet2.tier.shibboleth.admin.ui.security.service.IRolesService; import edu.internet2.tier.shibboleth.admin.ui.security.service.UserService; import edu.internet2.tier.shibboleth.admin.ui.service.EmailService; -import static net.unicon.shibui.pac4j.Pac4jConfiguration.PAC4J_CLIENT_NAME; +import org.pac4j.core.authorization.authorizer.DefaultAuthorizers; import org.pac4j.core.config.Config; import org.pac4j.core.matching.matcher.Matcher; import org.pac4j.springframework.security.web.CallbackFilter; @@ -26,6 +26,8 @@ import javax.servlet.Filter; import java.util.Optional; +import static net.unicon.shibui.pac4j.Pac4jConfiguration.PAC4J_CLIENT_NAME; + @Configuration @AutoConfigureOrder(-1) @ConditionalOnProperty(name = "shibui.pac4j-enabled", havingValue = "true") @@ -62,7 +64,8 @@ public Pac4jWebSecurityConfigurerAdapter(final Config config, UserService userSe protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests().antMatchers("/unsecured/**/*").permitAll(); - final SecurityFilter securityFilter = new SecurityFilter(this.config, PAC4J_CLIENT_NAME); + // adding the authorizor bypasses the default behavior of checking CSRF in Pac4J's default securitylogic+defaultauthorizationchecker + final SecurityFilter securityFilter = new SecurityFilter(this.config, PAC4J_CLIENT_NAME, DefaultAuthorizers.IS_AUTHENTICATED); // add filter based on auth type http.antMatcher("/**").addFilterBefore(getFilter(config, pac4jConfigurationProperties.getTypeOfAuth()), BasicAuthenticationFilter.class); diff --git a/testbed/authentication/docker-compose.yml b/testbed/authentication/docker-compose.yml index 884042c4a..42b12cb6a 100644 --- a/testbed/authentication/docker-compose.yml +++ b/testbed/authentication/docker-compose.yml @@ -20,7 +20,7 @@ services: - "8080:8080" - "443:443" - "8443:8443" -# - "8000:8000" + - "9090:9090" volumes: - /var/run/docker.sock:/var/run/docker.sock - ../reverse-proxy/:/configuration/ @@ -72,6 +72,7 @@ services: - ./shibui/application.yml:/application.yml ports: - "8000:8000" +# - "9090:9090" entrypoint: ["/usr/bin/java", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000", "-jar", "app.war"] networks: reverse-proxy: diff --git a/testbed/mariadb/conf/application.yml b/testbed/mariadb/conf/application.yml index 68018a4b9..82fe6fec7 100644 --- a/testbed/mariadb/conf/application.yml +++ b/testbed/mariadb/conf/application.yml @@ -10,7 +10,7 @@ spring: jpa: properties: hibernate: - dialect: org.hibernate.dialect.MariaDBDialect + dialect: org.hibernate.dialect.MariaDB103Dialect server: port: 8443 ssl: @@ -135,4 +135,4 @@ custom: logging: level: org.pac4j: "TRACE" - org.opensaml: "INFO" + org.opensaml: "INFO" \ No newline at end of file diff --git a/testbed/postgres/conf/application.yml b/testbed/postgres/conf/application.yml index 2173107e1..56fd5e709 100644 --- a/testbed/postgres/conf/application.yml +++ b/testbed/postgres/conf/application.yml @@ -8,9 +8,11 @@ spring: username: shibui password: shibui jpa: + show-sql: false properties: hibernate: - dialect: org.hibernate.dialect.PostgreSQLDialect + dialect: org.hibernate.dialect.PostgreSQL95Dialect + format_sql: true server: port: 8443 ssl: @@ -135,4 +137,4 @@ custom: logging: level: org.pac4j: "TRACE" - org.opensaml: "INFO" + org.opensaml: "INFO" \ No newline at end of file diff --git a/testbed/postgres/docker-compose.yml b/testbed/postgres/docker-compose.yml index 593ceb1fc..c66b591a8 100644 --- a/testbed/postgres/docker-compose.yml +++ b/testbed/postgres/docker-compose.yml @@ -11,7 +11,7 @@ services: networks: - front ports: - - 3306:3306 + - 5432:5432 shibui: image: unicon/shibui ports: diff --git a/testbed/sqlServer/conf/application.yml b/testbed/sqlServer/conf/application.yml new file mode 100644 index 000000000..f69ccb318 --- /dev/null +++ b/testbed/sqlServer/conf/application.yml @@ -0,0 +1,138 @@ +spring: + profiles: + include: dev + datasource: + platform: sqlserver + driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver + url: jdbc:sqlserver://db:1433 + username: sa + password: Password1 + jpa: + properties: + hibernate: + dialect: org.hibernate.dialect.SQLServerDialect +server: + port: 8443 + ssl: + key-store: "/conf/keystore.p12" + key-store-password: "changeit" + keyStoreType: "PKCS12" + keyAlias: "tomcat" +shibui: + user-bootstrap-resource: file:/conf/users.csv + roles: ROLE_ADMIN,ROLE_NONE,ROLE_USER,ROLE_PONY +custom: + attributes: + # Default attributes + - name: eduPersonPrincipalName + displayName: label.attribute-eduPersonPrincipalName + - name: uid + displayName: label.attribute-uid + - name: mail + displayName: label.attribute-mail + - name: surname + displayName: label.attribute-surname + - name: givenName + displayName: label.attribute-givenName + - name: eduPersonAffiliation + displayName: label.attribute-eduPersonAffiliation + - name: eduPersonScopedAffiliation + displayName: label.attribute-eduPersonScopedAffiliation + - name: eduPersonPrimaryAffiliation + displayName: label.attribute-eduPersonPrimaryAffiliation + - name: eduPersonEntitlement + displayName: label.attribute-eduPersonEntitlement + - name: eduPersonAssurance + displayName: label.attribute-eduPersonAssurance + - name: eduPersonUniqueId + displayName: label.attribute-eduPersonUniqueId + - name: employeeNumber + displayName: label.attribute-employeeNumber + # Custom attributes + overrides: + # Default overrides + - name: signAssertion + displayName: label.sign-the-assertion + displayType: boolean + defaultValue: false + helpText: tooltip.sign-assertion + attributeName: http://shibboleth.net/ns/profiles/saml2/sso/browser/signAssertions + attributeFriendlyName: signAssertions + - name: dontSignResponse + displayName: label.dont-sign-the-response + displayType: boolean + defaultValue: false + helpText: tooltip.dont-sign-response + attributeName: http://shibboleth.net/ns/profiles/saml2/sso/browser/signResponses + attributeFriendlyName: signResponses + - name: turnOffEncryption + displayName: label.turn-off-encryption-of-response + displayType: boolean + defaultValue: false + helpText: tooltip.turn-off-encryption + attributeName: http://shibboleth.net/ns/profiles/encryptAssertions + attributeFriendlyName: encryptAssertions + - name: useSha + displayName: label.use-sha1-signing-algorithm + displayType: boolean + defaultValue: false + helpText: tooltip.usa-sha-algorithm + persistType: string + persistValue: shibboleth.SecurityConfiguration.SHA1 + attributeName: http://shibboleth.net/ns/profiles/securityConfiguration + attributeFriendlyName: securityConfiguration + - name: ignoreAuthenticationMethod + displayName: label.ignore-any-sp-requested-authentication-method + displayType: boolean + defaultValue: false + helpText: tooltip.ignore-auth-method + persistType: string + persistValue: 0x1 + attributeName: http://shibboleth.net/ns/profiles/disallowedFeatures + attributeFriendlyName: disallowedFeatures + - name: omitNotBefore + displayName: label.omit-not-before-condition + displayType: boolean + defaultValue: false + helpText: tooltip.omit-not-before-condition + attributeName: http://shibboleth.net/ns/profiles/includeConditionsNotBefore + attributeFriendlyName: includeConditionsNotBefore + - name: responderId + displayName: label.responder-id + displayType: string + defaultValue: null + helpText: tooltip.responder-id + attributeName: http://shibboleth.net/ns/profiles/responderId + attributeFriendlyName: responderId + - name: nameIdFormats + displayName: label.nameid-format-to-send + displayType: set + helpText: tooltip.nameid-format + defaultValues: + - 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 + attributeName: http://shibboleth.net/ns/profiles/nameIDFormatPrecedence + attributeFriendlyName: nameIDFormatPrecedence + - name: authenticationMethods + displayName: label.authentication-methods-to-use + displayType: set + helpText: tooltip.authentication-methods-to-use + defaultValues: + - 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 + attributeName: http://shibboleth.net/ns/profiles/defaultAuthenticationMethods + attributeFriendlyName: defaultAuthenticationMethods + - name: forceAuthn + displayName: label.force-authn + displayType: boolean + defaultValue: false + helpText: tooltip.force-authn + attributeName: http://shibboleth.net/ns/profiles/forceAuthn + attributeFriendlyName: forceAuthn +logging: + level: + org.pac4j: "TRACE" + org.opensaml: "INFO" \ No newline at end of file diff --git a/testbed/sqlServer/conf/keystore.p12 b/testbed/sqlServer/conf/keystore.p12 new file mode 100644 index 000000000..57f9c162a Binary files /dev/null and b/testbed/sqlServer/conf/keystore.p12 differ diff --git a/testbed/sqlServer/conf/users.csv b/testbed/sqlServer/conf/users.csv new file mode 100644 index 000000000..0ff75785d --- /dev/null +++ b/testbed/sqlServer/conf/users.csv @@ -0,0 +1,2 @@ +root,{bcrypt}$2a$10$V1jeTIc0b2u7Y3yU.LqkXOPRVTBFc7SW07QaJR4KrBAmWGgTcO9H.,first,last,ROLE_ADMIN,user1@example.org +admin,{bcrypt}$2a$10$V1jeTIc0b2u7Y3yU.LqkXOPRVTBFc7SW07QaJR4KrBAmWGgTcO9H.,first,last,ROLE_ADMIN,jj@example.org \ No newline at end of file diff --git a/testbed/sqlServer/docker-compose.yml b/testbed/sqlServer/docker-compose.yml new file mode 100644 index 000000000..68276f256 --- /dev/null +++ b/testbed/sqlServer/docker-compose.yml @@ -0,0 +1,36 @@ +version: "3.7" + +services: + db: + container_name: db + ports: + - 1433:1433 + build: + context: . + dockerfile: docker/Dockerfile + networks: + - front + shibui: + image: unicon/shibui + ports: + - 8080:8080 + - 5005:5005 + - 8443:8443 + volumes: + - ./conf:/conf + - ./conf/application.yml:/application.yml + depends_on: + - db + networks: + - front + mailhog: + image: mailhog/mailhog:latest + ports: + - 1025:1025 + - 8025:8025 + container_name: mailhog + networks: + - front +networks: + front: + driver: bridge \ No newline at end of file diff --git a/testbed/sqlServer/docker/Dockerfile b/testbed/sqlServer/docker/Dockerfile new file mode 100644 index 000000000..4d8379c31 --- /dev/null +++ b/testbed/sqlServer/docker/Dockerfile @@ -0,0 +1,9 @@ +FROM mcr.microsoft.com/mssql/server:2019-latest + +ENV ACCEPT_EULA=Y +ENV SA_PASSWORD=Password1 + +COPY ./docker/scripts / + +ENTRYPOINT [ "/bin/bash", "entrypoint.sh" ] +CMD [ "/opt/mssql/bin/sqlservr" ] \ No newline at end of file diff --git a/testbed/sqlServer/docker/scripts/entrypoint.sh b/testbed/sqlServer/docker/scripts/entrypoint.sh new file mode 100755 index 000000000..8b861beef --- /dev/null +++ b/testbed/sqlServer/docker/scripts/entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +if [ "$1" = '/opt/mssql/bin/sqlservr' ]; then + # If this is the container's first run, initialize the application database + if [ ! -f /tmp/app-initialized ]; then + # Initialize the application database asynchronously in a background process. This allows a) the SQL Server process to be the main process in the container, which allows graceful shutdown and other goodies, and b) us to only start the SQL Server process once, as opposed to starting, stopping, then starting it again. + function initialize_app_database() { + # Wait a bit for SQL Server to start. SQL Server's process doesn't provide a clever way to check if it's up or not, and it needs to be up before we can import the application database + sleep 15s + + #run the setup script to create the DB and the schema in the DB + /opt/mssql-tools/bin/sqlcmd -S db -U sa -P Password1 -d master -i setup.sql + + # Note that the container has been initialized so future starts won't wipe changes to the data + touch /tmp/app-initialized + } + initialize_app_database & + fi +fi + +exec "$@" \ No newline at end of file diff --git a/testbed/sqlServer/docker/scripts/setup.sql b/testbed/sqlServer/docker/scripts/setup.sql new file mode 100644 index 000000000..9c49fede4 --- /dev/null +++ b/testbed/sqlServer/docker/scripts/setup.sql @@ -0,0 +1,10 @@ +CREATE DATABASE shibui; +GO +USE shibui; +GO +CREATE LOGIN shibui WITH PASSWORD = 'shibuiPass1'; +GO +CREATE USER shibui FOR LOGIN shibui; +GO +EXEC sp_addrolemember 'db_owner', 'shibui'; +GO \ No newline at end of file diff --git a/ui/public/assets/schema/provider/external.schema.json b/ui/public/assets/schema/provider/external.schema.json new file mode 100644 index 000000000..daa8c4503 --- /dev/null +++ b/ui/public/assets/schema/provider/external.schema.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "required": [ + "name", + "@type", + "xmlId", + "description" + ], + "properties": { + "name": { + "title": "label.metadata-provider-name-dashboard-display-only", + "description": "tooltip.metadata-provider-name-dashboard-display-only", + "type": "string", + "widget": { + "id": "string", + "help": "message.must-be-unique" + } + }, + "@type": { + "title": "label.metadata-provider-type", + "description": "tooltip.metadata-provider-type", + "type": "string", + "const": "FilesystemMetadataResolver" + }, + "xmlId": { + "title": "label.metadata-resolver-id", + "description": "tooltip.xml-id", + "type": "string", + "minLength": 1 + }, + "enabled": { + "title": "label.enable-provider-upon-saving", + "description": "tooltip.enable-provider-upon-saving", + "type": "boolean", + "default": false + }, + "description": { + "title": "label.description", + "description": "tooltip.description", + "type": "string" + } + } +} \ No newline at end of file diff --git a/ui/public/assets/schema/provider/file-system.schema.json b/ui/public/assets/schema/provider/file-system.schema.json index 38d0d90e3..a4db5a52d 100644 --- a/ui/public/assets/schema/provider/file-system.schema.json +++ b/ui/public/assets/schema/provider/file-system.schema.json @@ -1,15 +1,10 @@ { "type": "object", - "required": [ - "name", - "@type", - "xmlId", - "metadataFile" - ], + "required": ["name", "@type", "xmlId", "metadataFile"], "properties": { "name": { "title": "label.metadata-provider-name-dashboard-display-only", - "description": "tooltip.metadata-provider-name-dashboard-display-only", + "description": "tooltip.metadata-provider-name", "type": "string", "widget": { "id": "string", @@ -20,7 +15,7 @@ "title": "label.metadata-provider-type", "description": "tooltip.metadata-provider-type", "type": "string", - "const": "FilesystemMetadataResolver" + "default": "FilesystemMetadataResolver" }, "xmlId": { "title": "label.xml-id", @@ -47,18 +42,21 @@ }, "reloadableMetadataResolverAttributes": { "type": "object", + "required": ["minRefreshDelay", "maxRefreshDelay"], "properties": { "minRefreshDelay": { "title": "label.min-refresh-delay", "description": "tooltip.min-refresh-delay", "type": "string", - "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$", + "default": "PT5M" }, "maxRefreshDelay": { "title": "label.max-refresh-delay", "description": "tooltip.max-refresh-delay", "type": "string", - "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$", + "default": "PT4H" }, "refreshDelayFactor": { "title": "label.refresh-delay-factor", @@ -71,4 +69,4 @@ } } } -} \ No newline at end of file +} diff --git a/ui/public/assets/schema/provider/filebacked-http.schema.json b/ui/public/assets/schema/provider/filebacked-http.schema.json index 860733486..dffeaa65e 100644 --- a/ui/public/assets/schema/provider/filebacked-http.schema.json +++ b/ui/public/assets/schema/provider/filebacked-http.schema.json @@ -116,60 +116,18 @@ "type": "string", "title": "label.connection-request-timeout", "description": "tooltip.connection-request-timeout", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "connectionTimeout": { "type": "string", "title": "label.connection-timeout", "description": "tooltip.connection-timeout", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "socketTimeout": { "type": "string", "title": "label.socket-timeout", "description": "tooltip.socket-timeout", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" }, "tlsTrustEngineRef": { @@ -211,21 +169,15 @@ }, "oneOf": [ { - "enum": [ - "none" - ], + "enum": ["none"], "description": "value.none" }, { - "enum": [ - "file" - ], + "enum": ["file"], "description": "value.file" }, { - "enum": [ - "memory" - ], + "enum": ["memory"], "description": "value.memory" } ] @@ -252,18 +204,24 @@ "reloadableMetadataResolverAttributes": { "$id": "reloadableMetadataResolverAttributes", "type": "object", + "required": [ + "minRefreshDelay", + "maxRefreshDelay" + ], "properties": { "minRefreshDelay": { "title": "label.min-refresh-delay", "description": "tooltip.min-refresh-delay", "type": "string", - "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$", + "default": "PT5M" }, "maxRefreshDelay": { "title": "label.max-refresh-delay", "description": "tooltip.max-refresh-delay", "type": "string", - "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + "pattern": "^$|^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$", + "default": "PT4H" }, "refreshDelayFactor": { "title": "label.refresh-delay-factor", diff --git a/ui/src/app/App.constant.js b/ui/src/app/App.constant.js index 3b6af7f89..afa7a688c 100644 --- a/ui/src/app/App.constant.js +++ b/ui/src/app/App.constant.js @@ -5,8 +5,18 @@ export const getBasePath = () => { //replace(/^\/|\/$/g, '') }; +export const getActuatorPath = () => { + const url = new URL(document.getElementsByTagName('base')[0].href); + + var foo = document.createElement("a"); + foo.href = url.pathname?.replace(/^\/+/g, ''); + foo.port = "9090" + return foo.href; +} + export const BASE_PATH = getBasePath(); export const API_BASE_PATH = `${BASE_PATH}api`; +export const ACTUATOR_PATH = getActuatorPath(); export const FILTER_PLUGIN_TYPES = ['RequiredValidUntil', 'SignatureValidation', 'EntityRoleWhiteList']; diff --git a/ui/src/app/App.js b/ui/src/app/App.js index 20331e4e8..546241f10 100644 --- a/ui/src/app/App.js +++ b/ui/src/app/App.js @@ -33,6 +33,7 @@ import { SessionModal } from './core/user/SessionModal'; import { Roles } from './admin/Roles'; import { Groups } from './admin/Groups'; import { BASE_PATH } from './App.constant'; +import { ProtectRoute } from './core/components/ProtectRoute'; function App() { @@ -81,12 +82,32 @@ function App() { - - - + + + + + } /> + + + + + } /> + + + + + } /> - - + + + + + } /> + + + + + } /> diff --git a/ui/src/app/core/components/VersionInfo.js b/ui/src/app/core/components/VersionInfo.js index 1c6badfc1..1c88ad271 100644 --- a/ui/src/app/core/components/VersionInfo.js +++ b/ui/src/app/core/components/VersionInfo.js @@ -1,7 +1,7 @@ import React from 'react'; import useFetch from 'use-http'; -import { BASE_PATH } from '../../App.constant'; +import { ACTUATOR_PATH } from '../../App.constant'; import Translate from '../../i18n/components/translate'; @@ -11,11 +11,15 @@ const year = new Date().getFullYear(); const params = { year }; export function VersionInfo () { - - const { data = {} } = useFetch(`${BASE_PATH}actuator/info`, {}, []); + var opts = { + headers: { + 'mode':'no-cors' + } + } + const { data = {} } = useFetch(`${ACTUATOR_PATH}actuator/info`, opts, []); const [ versionData, setVersionData ] = React.useState(''); - + React.useEffect(() => { setVersionData(formatter(data)); }, [data]); @@ -29,4 +33,4 @@ export function VersionInfo () { ); } -export default VersionInfo; \ No newline at end of file +export default VersionInfo; diff --git a/ui/src/app/dashboard/view/Dashboard.js b/ui/src/app/dashboard/view/Dashboard.js index e5f145572..b1d058eaf 100644 --- a/ui/src/app/dashboard/view/Dashboard.js +++ b/ui/src/app/dashboard/view/Dashboard.js @@ -112,6 +112,9 @@ export function Dashboard () { } /> + + + } diff --git a/ui/src/app/form/component/fields/FilterTargetField.js b/ui/src/app/form/component/fields/FilterTargetField.js index 2ce8f3ccc..0cdaa50ce 100644 --- a/ui/src/app/form/component/fields/FilterTargetField.js +++ b/ui/src/app/form/component/fields/FilterTargetField.js @@ -11,6 +11,7 @@ import useFetch from 'use-http'; import queryString from 'query-string'; import API_BASE_PATH from '../../../App.constant'; import isNil from 'lodash/isNil'; +import capitalize from 'lodash/capitalize'; import Editor from 'react-simple-code-editor'; // import { highlight, languages } from 'prismjs/components/prism-core'; // import 'prismjs/components/prism-clike'; @@ -68,6 +69,9 @@ const FilterTargetField = ({ const [touched, setTouched] = React.useState(false); const [ids, setSearchIds] = React.useState([]); + const [errors, setErrors] = React.useState(); + const translator = useTranslator(); + const { get, response } = useFetch(`${API_BASE_PATH}/EntityIds/search`, { cachePolicy: 'no-cache' }); @@ -128,6 +132,10 @@ const FilterTargetField = ({ setSelectedType(option); }; + React.useEffect(() => { + setErrors(errorSchema?.value?.__errors?.map((error, eIdx) => capitalize(translator(error))).join(', ')); + }, [errorSchema]); + return (
@@ -231,11 +239,8 @@ const FilterTargetField = ({ onChange={ ({target: { value }}) => handleTextChange(value) } /> {errorSchema?.value?.__errors ? - {errorSchema?.value?.__errors?.map((error, eIdx) => - - {error} - - )} + {errors} + : Required for Regex diff --git a/ui/src/app/form/component/widgets/TextWidget.js b/ui/src/app/form/component/widgets/TextWidget.js index d4801ab4e..2f8c183b0 100644 --- a/ui/src/app/form/component/widgets/TextWidget.js +++ b/ui/src/app/form/component/widgets/TextWidget.js @@ -7,6 +7,7 @@ import Form from "react-bootstrap/Form"; import Translate from "../../../i18n/components/translate"; import { InfoIcon } from "../InfoIcon"; +import { useTranslator } from "../../../i18n/hooks"; const TextWidget = ({ id, @@ -43,6 +44,8 @@ const TextWidget = ({ onChange(fieldValue); }, [fieldValue, onChange]); + const translator = useTranslator(); + // const classNames = [rawErrors?.length > 0 ? "is-invalid" : "", type === 'file' ? 'custom-file-label': ""] return ( @@ -57,7 +60,7 @@ const TextWidget = ({ @@ -20,7 +20,7 @@ export function NewProvider() {
- + {(data, onRestart) => { + scroller.scrollTo(element, { + duration: 500, + smooth: true, + offset + }); + }; export function MetadataComparison () { @@ -54,6 +63,12 @@ export function MetadataComparison () {   Version History + {type === 'provider' && canFilter && + + }
{type === 'provider' && canFilter && v && - +

Metadata Filter @@ -74,7 +89,7 @@ export function MetadataComparison () { {(c) => } - +

}
} diff --git a/ui/src/app/metadata/wizard/MetadataProviderWizard.js b/ui/src/app/metadata/wizard/MetadataProviderWizard.js index d2cbc0864..7193c0573 100644 --- a/ui/src/app/metadata/wizard/MetadataProviderWizard.js +++ b/ui/src/app/metadata/wizard/MetadataProviderWizard.js @@ -49,7 +49,6 @@ export function MetadataProviderWizard({onSave, loading, block}) { return ( <> -