Skip to content
Permalink
Browse files
Fix demo/shibboleth tests
Remove SOAP interface tests because SOAP is no longer supported in
midpoint 4.2.

Fix typo in curl --silent option.

Update docker-compose-tests.yml with recent changes from
docker-compose.yml file. docker-compose-tests.yml should contain the
same configuration as docker-compose.yml, only it minimizes the ports
exported to localhost, because it's not necessary for tests.
  • Loading branch information
Slavek Licehammer committed Dec 9, 2020
1 parent c3e8ec4 commit 6c13fadd0d1db53f76388499fc13032205373209
Showing with 18 additions and 13 deletions.
  1. +15 −0 demo/shibboleth/docker-compose-tests.yml
  2. +3 −13 demo/shibboleth/tests/main.bats
@@ -51,12 +51,27 @@ services:
- type: bind
source: ./configs-and-secrets/midpoint/shibboleth/idp-metadata.xml
target: /etc/shibboleth/idp-metadata.xml
- type: bind
source: ./configs-and-secrets/midpoint/shibboleth/shibboleth2.xml
target: /etc/shibboleth/shibboleth2.xml
- type: bind
source: ./configs-and-secrets/midpoint/shibboleth/attribute-map.xml
target: /etc/shibboleth/attribute-map.xml
- type: bind
source: ./configs-and-secrets/midpoint/httpd/host-cert.pem
target: /etc/pki/tls/certs/host-cert.pem
- type: bind
source: ./configs-and-secrets/midpoint/httpd/host-cert.pem
target: /etc/pki/tls/certs/cachain.pem
- type: bind
source: ./configs-and-secrets/midpoint/httpd/00-shib.conf
target: /etc/httpd/conf.modules.d/00-shib.conf
- type: bind
source: ./configs-and-secrets/midpoint/httpd/midpoint-shib.conf
target: /etc/httpd/conf.d/midpoint-shib.conf
- type: bind
source: ./configs-and-secrets/midpoint/httpd/vhosts.conf
target: /etc/httpd/conf.d/vhosts/vhosts.conf

directory:
build: ./directory/
@@ -33,7 +33,7 @@ load ../../../library
}

@test "040 Check internal SAML redirection (/midpoint/auth/saml-internal)" {
curl -k --write-out %{redirect_url} --silen --output /dev/null https://localhost:8443/midpoint/auth/saml-internal/ | grep 'https:\/\/localhost:8443\/midpoint\/auth\/saml-internal\/mySamlSso\/discovery?idp=https%3A%2F%2Fidptestbed%2Fidp%2Fshibboleth'
curl -k --write-out %{redirect_url} --silent --output /dev/null https://localhost:8443/midpoint/auth/saml-internal/ | grep 'https:\/\/localhost:8443\/midpoint\/auth\/saml-internal\/mySamlSso\/discovery?idp=https%3A%2F%2Fidptestbed%2Fidp%2Fshibboleth'
}

@test "041 Check internal SAML redirection action (midpoint/..../discovery?...)" {
@@ -51,22 +51,12 @@ load ../../../library
fi
}

@test "042 Check SOAP without Shibboleth redirection (/midpoint/ws/)" {
status="$(curl -k --write-out %{http_code} --silent --output /dev/null https://localhost:8443/midpoint/ws/)"
[ "$status" -eq 200 ]
}

@test "043 Check SOAP without Shibboleth redirection (/midpoint/model/)" {
status="$(curl -k --write-out %{http_code} --silent --output /dev/null https://localhost:8443/midpoint/model/)"
[ "$status" -eq 200 ]
}

@test "044 Check Shibboleth redirection (/midpoint/)" {
curl -k --write-out %{redirect_url} --silen --output /dev/null https://localhost:8443/midpoint/ | grep 'https:\/\/localhost:8443\/midpoint\/auth\/shib'
curl -k --write-out %{redirect_url} --silent https://localhost:8443/midpoint/ | grep 'https:\/\/localhost:8443\/midpoint\/auth\/shib'
}

@test "045 Check Shibboleth redirection (/midpoint/auth/shib/)" {
curl -k --write-out %{redirect_url} --silen --output /dev/null https://localhost:8443/midpoint/auth/shib/ | grep 'https:\/\/localhost\/idp\/profile\/SAML2\/Redirect\/SSO?SAMLRequest='
curl -k --write-out %{redirect_url} --silent --output /dev/null https://localhost:8443/midpoint/auth/shib/ | grep 'https:\/\/localhost\/idp\/profile\/SAML2\/Redirect\/SSO?SAMLRequest='
}

@test "100 Check internally-authenticated REST call: get 'administrator'" {

0 comments on commit 6c13fad

Please sign in to comment.