Skip to content

Commit

Permalink
Merge branch 'bugfix/SHIBUI-1386' of bitbucket.org:unicon/shib-idp-ui…
Browse files Browse the repository at this point in the history
… into task/SHIBUI-1365
  • Loading branch information
rmathis committed Aug 8, 2019
2 parents a85bf2b + c2b2c1d commit 0f9e5ab
Show file tree
Hide file tree
Showing 19 changed files with 2,130 additions and 78 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pipeline {
stage('Run Selenium tests') {
when {
expression {
return GIT_BRANCH.startsWith('PR')
return (GIT_BRANCH.startsWith('PR') || GIT_BRANCH.endsWith('-QA'))
}
}
steps {
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ COPY loader.properties loader.properties

EXPOSE 8080

ENTRYPOINT ["/usr/bin/java", "-jar", "app.jar"]
ENTRYPOINT ["/usr/bin/java", "-jar", "app.jar"]
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package edu.internet2.tier.shibboleth.admin.ui.controller

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.resolvers.DynamicHttpMetadataResolver
import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.FileBackedHttpMetadataResolver
import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.FilesystemMetadataResolver
Expand Down Expand Up @@ -103,6 +105,37 @@ class MetadataResolverControllerVersionEndpointsIntegrationTests extends Specifi
mrv2.body.name == 'resolverUPDATED'
}

def "SHIBUI-1386"() {
MetadataResolver mr = new FileBackedHttpMetadataResolver(name: 'testme')
mr = repository.save(mr)

when: 'add a filter'
// def filterValue = '''{"type":"EntityAttributes","@type":"EntityAttributes","filterEnabled":true,"entityAttributesFilterTarget":{"entityAttributesFilterTargetType":"ENTITY","value":["https://idp.unicon.net/idp/shibboleth"]},"relyingPartyOverrides":{"signAssertion":false,"dontSignResponse":false,"turnOffEncryption":false,"useSha":false,"ignoreAuthenticationMethod":false,"omitNotBefore":false,"nameIdFormats":[],"authenticationMethods":[],"forceAuthn":false},"attributeRelease":[],"name":"Test Filter 1"}'''
def filter = new EntityAttributesFilter(
name: 'testme',
filterEnabled: true
).with {
it.relyingPartyOverrides = [
'signAssertion': true
]
it.setEntityAttributesFilterTarget(new EntityAttributesFilterTarget().with {
it.entityAttributesFilterTargetType = EntityAttributesFilterTarget.EntityAttributesFilterTargetType.ENTITY
it.value = ['https://testme/sp']
it
})
it
}
mr.metadataFilters.add(filter)
mr = repository.save(mr)

def allVersions = getAllMetadataResolverVersions(mr.resourceId, List)
def mrv1 = getMetadataResolverForVersion(mr.resourceId, allVersions.body[0].id, MetadataResolver)
def mrv2 = getMetadataResolverForVersion(mr.resourceId, allVersions.body[1].id, MetadataResolver)

then:
noExceptionThrown()
}

private getAllMetadataResolverVersions(String resourceId, responseType) {
this.restTemplate.getForEntity(resourceUriFor(ALL_VERSIONS_URI, resourceId), responseType)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ class SeleniumSIDETest extends Specification {
// 'Create and Delete Name ID Format Regex Filter' | '/CreateAndDeleteNameIDFormatRegexFilter.side'
// 'Create and Delete Name ID Format Script Filter' | '/CreateAndDeleteNameIDFormatScriptFilter.side'
// 'Create and Modify Filter Order' | '/ModifyFilterOrder.side'
// 'SHIBUI-1281: Metadata Source Dashboard' | '/SHIBUI-1281.side'
'SHIBUI-1281: Metadata Source Dashboard' | '/SHIBUI-1281.side'
'SHIBUI-1311: Metadata Provider Dashboard' | '/SHIBUI-1311.side'
'SHIBUI-950: Metadata Source from XML w/ digest' | '/SHIBUI-950.side'
'SHIBUI-1352: Create LocalDynamic provider' | '/SHIBUI-1352-1.side'
'SHIBUI-1352: Create FileSystem provider' | '/SHIBUI-1352-2.side'
'SHIBUI-1333: Verify metadata source configuration' | '/SHIBUI-1333.side'
}
}

41 changes: 21 additions & 20 deletions backend/src/integration/resources/SHIBUI-1281.side
Original file line number Diff line number Diff line change
Expand Up @@ -824,35 +824,35 @@
"id": "6c794e94-9c64-4683-816a-380432f2ed79",
"comment": "",
"command": "click",
"target": "id=/securityInfo/x509CertificateAvailable",
"target": "id=/securityInfo/x509CertificateAvailable.true",
"targets": [
["id=/securityInfo/x509CertificateAvailable", "id"],
["css=.form-check:nth-child(3) #\\/securityInfo\\/x509CertificateAvailable", "css:finder"],
["xpath=//input[@id='/securityInfo/x509CertificateAvailable']", "xpath:attributes"],
["id=/securityInfo/x509CertificateAvailable.true", "id"],
["css=#\\/securityInfo\\/x509CertificateAvailable\\.true", "css:finder"],
["xpath=//input[@id='/securityInfo/x509CertificateAvailable.true']", "xpath:attributes"],
["xpath=//input", "xpath:position"]
],
"value": ""
}, {
"id": "f0ade90e-2c31-4a77-b936-3b2a00388477",
"comment": "",
"command": "click",
"target": "id=/securityInfo/authenticationRequestsSigned",
"target": "id=/securityInfo/authenticationRequestsSigned.true",
"targets": [
["id=/securityInfo/authenticationRequestsSigned", "id"],
["css=.form-check:nth-child(3) #\\/securityInfo\\/authenticationRequestsSigned", "css:finder"],
["xpath=//input[@id='/securityInfo/authenticationRequestsSigned']", "xpath:attributes"],
["id=/securityInfo/authenticationRequestsSigned.true", "id"],
["css=#\\/securityInfo\\/authenticationRequestsSigned\\.true", "css:finder"],
["xpath=//input[@id='/securityInfo/authenticationRequestsSigned.true']", "xpath:attributes"],
["xpath=//div[2]/sf-form-element/div/sf-widget-chooser/boolean-radio/div/div/label/input", "xpath:position"]
],
"value": ""
}, {
"id": "e26eda6f-1897-42e2-9ea9-671b1ff88874",
"comment": "",
"command": "click",
"target": "id=/securityInfo/wantAssertionsSigned",
"target": "id=/securityInfo/wantAssertionsSigned.true",
"targets": [
["id=/securityInfo/wantAssertionsSigned", "id"],
["css=.form-check:nth-child(3) #\\/securityInfo\\/wantAssertionsSigned", "css:finder"],
["xpath=//input[@id='/securityInfo/wantAssertionsSigned']", "xpath:attributes"],
["id=/securityInfo/wantAssertionsSigned.true", "id"],
["css=#\\/securityInfo\\/wantAssertionsSigned\\.true", "css:finder"],
["xpath=//input[@id='/securityInfo/wantAssertionsSigned.true']", "xpath:attributes"],
["xpath=//div[3]/sf-form-element/div/sf-widget-chooser/boolean-radio/div/div/label/input", "xpath:position"]
],
"value": ""
Expand Down Expand Up @@ -886,12 +886,12 @@
"id": "23ff8b87-ac6c-4f82-a779-aa91be11f49c",
"comment": "",
"command": "click",
"target": "id=/securityInfo/x509Certificates/0/type",
"target": "id=/securityInfo/x509Certificates/0/type.0",
"targets": [
["id=/securityInfo/x509Certificates/0/type", "id"],
["name=field51", "name"],
["css=.form-check:nth-child(3) > #\\/securityInfo\\/x509Certificates\\/0\\/type", "css:finder"],
["xpath=//input[@id='/securityInfo/x509Certificates/0/type']", "xpath:attributes"],
["id=/securityInfo/x509Certificates/0/type.0", "id"],
["name=field55", "name"],
["css=#\\/securityInfo\\/x509Certificates\\/0\\/type\\.0", "css:finder"],
["xpath=//input[@id='/securityInfo/x509Certificates/0/type.0']", "xpath:attributes"],
["xpath=//div/div/input", "xpath:position"]
],
"value": ""
Expand Down Expand Up @@ -960,10 +960,11 @@
"id": "835ad053-0a10-4606-a148-c7ba36be316f",
"comment": "",
"command": "click",
"target": "css=.form-check:nth-child(4) > #\\/securityInfo\\/x509Certificates\\/1\\/type",
"target": "id=/securityInfo/x509Certificates/1/type.1",
"targets": [
["css=.form-check:nth-child(4) > #\\/securityInfo\\/x509Certificates\\/1\\/type", "css:finder"],
["xpath=(//input[@id='/securityInfo/x509Certificates/1/type'])[2]", "xpath:attributes"],
["id=/securityInfo/x509Certificates/1/type.1", "id"],
["css=#\\/securityInfo\\/x509Certificates\\/1\\/type\\.1", "css:finder"],
["xpath=//input[@id='/securityInfo/x509Certificates/1/type.1']", "xpath:attributes"],
["xpath=//li[2]/div/div/div[2]/sf-form-element/div/sf-widget-chooser/custom-object/div/div/fieldset/div/div[2]/sf-form-element/div/sf-widget-chooser/custom-radio-widget/div/div[2]/input", "xpath:position"]
],
"value": ""
Expand Down
43 changes: 24 additions & 19 deletions backend/src/integration/resources/SHIBUI-1311.side
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,11 @@
"id": "f0459917-b2a1-4e3c-8800-25273965129f",
"comment": "",
"command": "click",
"target": "css=.form-check:nth-child(4) #\\/initializeFromBackupFile",
"target": "id=/initializeFromBackupFile.false",
"targets": [
["css=.form-check:nth-child(4) #\\/initializeFromBackupFile", "css:finder"],
["xpath=(//input[@id='/initializeFromBackupFile'])[2]", "xpath:attributes"],
["id=/initializeFromBackupFile.false", "id"],
["css=#\\/initializeFromBackupFile\\.false", "css:finder"],
["xpath=//input[@id='/initializeFromBackupFile.false']", "xpath:attributes"],
["xpath=//div[2]/label/input", "xpath:position"]
],
"value": ""
Expand Down Expand Up @@ -198,44 +199,47 @@
"id": "bf041d41-5d58-4f69-8fcc-49ec79e5547d",
"comment": "",
"command": "click",
"target": "css=.form-check:nth-child(4) #\\/requireValidMetadata",
"target": "id=/requireValidMetadata.false",
"targets": [
["css=.form-check:nth-child(4) #\\/requireValidMetadata", "css:finder"],
["xpath=(//input[@id='/requireValidMetadata'])[2]", "xpath:attributes"],
["id=/requireValidMetadata.false", "id"],
["css=#\\/requireValidMetadata\\.false", "css:finder"],
["xpath=//input[@id='/requireValidMetadata.false']", "xpath:attributes"],
["xpath=//div[6]/sf-form-element/div/sf-widget-chooser/boolean-radio/div/div[2]/label/input", "xpath:position"]
],
"value": ""
}, {
"id": "fba85c75-e218-4deb-b5e1-888ff75b6a4e",
"comment": "",
"command": "click",
"target": "css=.form-check:nth-child(4) #\\/failFastInitialization",
"target": "id=/failFastInitialization.false",
"targets": [
["css=.form-check:nth-child(4) #\\/failFastInitialization", "css:finder"],
["xpath=(//input[@id='/failFastInitialization'])[2]", "xpath:attributes"],
["id=/failFastInitialization.false", "id"],
["css=#\\/failFastInitialization\\.false", "css:finder"],
["xpath=//input[@id='/failFastInitialization.false']", "xpath:attributes"],
["xpath=//div[7]/sf-form-element/div/sf-widget-chooser/boolean-radio/div/div[2]/label/input", "xpath:position"]
],
"value": ""
}, {
"id": "375b8d6e-179b-4f14-8f00-d8a8cad29d7e",
"comment": "",
"command": "click",
"target": "css=.form-check:nth-child(4) #\\/useDefaultPredicateRegistry",
"target": "id=/useDefaultPredicateRegistry.false",
"targets": [
["css=.form-check:nth-child(4) #\\/useDefaultPredicateRegistry", "css:finder"],
["xpath=(//input[@id='/useDefaultPredicateRegistry'])[2]", "xpath:attributes"],
["id=/useDefaultPredicateRegistry.false", "id"],
["css=#\\/useDefaultPredicateRegistry\\.false", "css:finder"],
["xpath=//input[@id='/useDefaultPredicateRegistry.false']", "xpath:attributes"],
["xpath=//div[8]/sf-form-element/div/sf-widget-chooser/boolean-radio/div/div[2]/label/input", "xpath:position"]
],
"value": ""
}, {
"id": "8b4bf341-62c0-491f-b775-d2faf55477bc",
"comment": "",
"command": "click",
"target": "id=/satisfyAnyPredicates",
"target": "id=/satisfyAnyPredicates.true",
"targets": [
["id=/satisfyAnyPredicates", "id"],
["css=.form-check:nth-child(3) #\\/satisfyAnyPredicates", "css:finder"],
["xpath=//input[@id='/satisfyAnyPredicates']", "xpath:attributes"],
["id=/satisfyAnyPredicates.true", "id"],
["css=#\\/satisfyAnyPredicates\\.true", "css:finder"],
["xpath=//input[@id='/satisfyAnyPredicates.true']", "xpath:attributes"],
["xpath=//div[9]/sf-form-element/div/sf-widget-chooser/boolean-radio/div/div/label/input", "xpath:position"]
],
"value": ""
Expand Down Expand Up @@ -674,10 +678,11 @@
"id": "d389f80c-4923-40ad-bdb6-f1142cb95a5e",
"comment": "",
"command": "click",
"target": "css=.form-check:nth-child(4) #\\/initializeFromBackupFile",
"target": "id=/initializeFromBackupFile.false",
"targets": [
["css=.form-check:nth-child(4) #\\/initializeFromBackupFile", "css:finder"],
["xpath=(//input[@id='/initializeFromBackupFile'])[2]", "xpath:attributes"],
["id=/initializeFromBackupFile.false", "id"],
["css=#\\/initializeFromBackupFile\\.false", "css:finder"],
["xpath=//input[@id='/initializeFromBackupFile.false']", "xpath:attributes"],
["xpath=//div[2]/label/input", "xpath:position"]
],
"value": ""
Expand Down
Loading

0 comments on commit 0f9e5ab

Please sign in to comment.