Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions selenium/bin/components/fakeportal
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ start_fakeportal() {
--env UAA_URL="${UAA_URL_FOR_FAKEPORTAL}" \
--env CLIENT_ID="${CLIENT_ID}" \
--env CLIENT_SECRET="${CLIENT_SECRET}" \
--env NODE_EXTRA_CA_CERTS=/etc/uaa/ca_uaa_certificate.pem \
-v ${TEST_CONFIG_DIR}/uaa:/etc/uaa \
-v ${FAKEPORTAL_DIR}:/code/fakeportal \
mocha-test:${mocha_test_tag} run fakeportal

Expand Down
9 changes: 5 additions & 4 deletions selenium/bin/components/uaa
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ start_uaa() {
--detach \
--name uaa \
--net ${DOCKER_NETWORK} \
--publish 8080:8080 \
--mount "type=bind,source=$MOUNT_UAA_CONF_DIR,target=/uaa" \
--publish 8443:8443 \
-v ${MOUNT_UAA_CONF_DIR}:/uaa \
-v ${UAA_CONFIG_DIR}/server.xml:/layers/paketo-buildpacks_apache-tomcat/catalina-base/conf/server.xml \
--env UAA_CONFIG_PATH="/uaa" \
--env JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom" \
--env JAVA_OPTS="-Djava.security.policy=unlimited -Djava.security.egd=file:/dev/./urandom" \
${UAA_DOCKER_IMAGE}

wait_for_oidc_endpoint uaa $UAA_URL
end "UAA is ready"
}
4 changes: 2 additions & 2 deletions selenium/bin/suite_template
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ wait_for_oidc_endpoint() {
wait_for_oidc_endpoint_local() {
NAME=$1
BASE_URL=$2
CURL_ARGS="-L --fail "
CURL_ARGS="-L -k --fail "
DELAY_BETWEEN_ATTEMPTS=5
if [[ $# -eq 3 ]]; then
CURL_ARGS="$CURL_ARGS --cacert $3"
Expand All @@ -191,7 +191,7 @@ wait_for_oidc_endpoint_local() {
wait_for_oidc_endpoint_docker() {
NAME=$1
BASE_URL=$2
CURL_ARGS="-L --fail "
CURL_ARGS="-L -k --fail "
DOCKER_ARGS="--rm --net ${DOCKER_NETWORK} "
DELAY_BETWEEN_ATTEMPTS=5
if [[ $# -gt 2 ]]; then
Expand Down
3 changes: 2 additions & 1 deletion selenium/fakeportal/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function access_token(id, secret) {
console.log("Token => " + token)
return token;
} else {
throw new Error(req.status + " : " + req.responseText);
throw new Error(req.status + " : " + " : " +
req.response + " : " + req.responseText)
}
}
2 changes: 1 addition & 1 deletion selenium/test/oauth/env.docker.fakeportal
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export FAKEPORTAL_URL=http://fakeportal:3000
export RABBITMQ_HOST_FOR_FAKEPORTAL=${RABBITMQ_HOST}
export UAA_URL_FOR_FAKEPORTAL=http://uaa:8080
export UAA_URL_FOR_FAKEPORTAL=https://uaa:8443
2 changes: 1 addition & 1 deletion selenium/test/oauth/env.docker.uaa
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export UAA_URL=http://uaa:8080
export UAA_URL=https://uaa:8443
2 changes: 1 addition & 1 deletion selenium/test/oauth/env.local.fakeportal
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export FAKEPORTAL_URL=http://localhost:3000
export RABBITMQ_HOST_FOR_FAKEPORTAL=localhost:15672
export UAA_URL_FOR_FAKEPORTAL=http://host.docker.internal:8080
export UAA_URL_FOR_FAKEPORTAL=https://uaa:8443
2 changes: 1 addition & 1 deletion selenium/test/oauth/env.local.uaa
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export UAA_URL=http://localhost:8080
export UAA_URL=https://localhost:8443
43 changes: 43 additions & 0 deletions selenium/test/oauth/uaa/server.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version='1.0' encoding='utf-8'?>
<Server port="-1">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<Service name="Catalina">
<Connector class="org.apache.coyote.http11.Http11NioProtocol" protocol="HTTP/1.1" connectionTimeout="20000"
scheme="https"
port="8443"
SSLEnabled="true"
sslEnabledProtocols="TLSv1.2"
ciphers="TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
secure="true"
clientAuth="false"
sslProtocol="TLS"
keystoreFile="/uaa/server_uaa.jks"
keystoreType="PKCS12"
keyAlias="server-uaa-tls"
keystorePass="foobar"
bindOnInit="false"/>
<Connector protocol="org.apache.coyote.http11.Http11NioProtocol"
connectionTimeout="20000"
port="8989"
address="127.0.0.1"
bindOnInit="true"/>
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost"
appBase="webapps"
unpackWARs="true"
autoDeploy="false"
failCtxIfServletStartFails="true">
<Valve className="org.apache.catalina.valves.RemoteIpValve"
remoteIpHeader="x-forwarded-for"
protocolHeader="x-forwarded-proto"
internalProxies="10\.\d{1,3}\.\d{1,3}\.\d{1,3}|192\.168\.\d{1,3}\.\d{1,3}|169\.254\.\d{1,3}\.\d{1,3}|127\.\d{1,3}\.\d{1,3}\.\d{1,3}|172\.1[6-9]{1}\.\d{1,3}\.\d{1,3}|172\.2[0-9]{1}\.\d{1,3}\.\d{1,3}|172\.3[0-1]{1}\.\d{1,3}\.\d{1,3}"/>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access" suffix=".log" rotatable="false" pattern="%h %l %u %t &quot;%r&quot; %s %b"/>
</Host>
</Engine>
</Service>
</Server>
5 changes: 4 additions & 1 deletion selenium/test/oauth/uaa/uaa.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
require_https: true
https_port: 8443

logging:
config: /uaa/log4j2.properties

Expand Down Expand Up @@ -214,4 +217,4 @@ cors:
- GET
- PUT
- POST
- DELETE
- DELETE