Skip to content

Commit f7d5912

Browse files
WIP Test oauth-proxy in isolation
Configure rabbitmq with oath-proxy
1 parent 0007eea commit f7d5912

File tree

12 files changed

+25
-18
lines changed

12 files changed

+25
-18
lines changed

selenium/bin/components/keycloak

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ ensure_keycloak() {
1212
init_keycloak() {
1313
KEYCLOAK_CONFIG_PATH=${KEYCLOAK_CONFIG_PATH:-oauth/keycloak}
1414
KEYCLOAK_CONFIG_DIR=$(realpath ${TEST_DIR}/${KEYCLOAK_CONFIG_PATH})
15-
KEYCLOAK_URL=${OAUTH_PROVIDER_URL}
16-
15+
1716
print "> KEYCLOAK_CONFIG_DIR: ${KEYCLOAK_CONFIG_DIR}"
1817
print "> KEYCLOAK_URL: ${KEYCLOAK_URL}"
1918
print "> KEYCLOAK_DOCKER_IMAGE: ${KEYCLOAK_DOCKER_IMAGE}"

selenium/bin/components/oauth-proxy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ init_oauth-proxy() {
1717
print "> OAUTH_PROVIDER_URL: ${OAUTH_PROVIDER_URL}"
1818
print "> PROXY_HOSTNAME: ${PROXY_HOSTNAME}"
1919
print "> PROXY_PORT: ${PROXY_PORT}"
20+
2021
}
2122
start_oauth-proxy() {
2223
begin "Starting oauth-proxy ..."
@@ -38,7 +39,6 @@ start_oauth-proxy() {
3839
--mount "type=bind,source=${MOUNT_HTTPD_CONFIG_DIR},target=/usr/local/apache2/conf" \
3940
${HTTPD_DOCKER_IMAGE}
4041

41-
PROXY_URL=$(calculate_forward_proxy_url $OAUTH_PROVIDER_URL $PROXY_HOSTNAME $PROXY_PORT)
42-
43-
end "Proxy is ready"
42+
wait_for_url $OAUTH_PROVIDER_URL ${PROXY_HOSTNAME}:${PROXY_PORT}
43+
end "oauth-proxy is ready"
4444
}

selenium/bin/components/proxy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ensure_proxy() {
99
fi
1010
}
1111
init_proxy() {
12-
HTTPD_CONFIG_DIR=${TEST_CONFIG_DIR}/httpd-proxy
12+
HTTPD_CONFIG_DIR=${TEST_CONFIG_DIR}/oauth-proxy
1313
PUBLIC_RABBITMQ_HOST=${PUBLIC_RABBITMQ_HOST:-proxy:9090}
1414
PROXIED_RABBITMQ_URL=$(calculate_rabbitmq_url $PUBLIC_RABBITMQ_HOST)
1515

selenium/suites/authnz-mgt/oauth-with-keycloak-via-proxy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ TEST_CONFIG_PATH=/oauth
77
PROFILES="oauth-proxy keycloak proxy-oauth-provider keycloak-mgt-oauth-provider tls"
88

99
source $SCRIPT/../../bin/suite_template $@
10-
runWith keycloak forward-proxy
10+
runWith keycloak oauth-proxy
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export OAUTH_PROXY_CA_CERT=/config/oauth/oauth-proxy/ca_oauth-proxy_certificate.pem
2+
export OAUTH_PROXY_URL=https://proxy:9092/realms/test

selenium/test/oauth/env.docker.proxy

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export KEYCLOAK_URL=https://localhost:8443/realms/test
2-
#export OAUTH_PROVIDER_URL=https://localhost:8443/realms/test
32
export KEYCLOAK_CA_CERT=selenium/test/oauth/keycloak/ca_keycloak_certificate.pem
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export OAUTH_PROXY_CA_CERT=selenium/test/oauth/oauth-proxy/ca_oauth-proxy_certificate.pem
2+
export OAUTH_PROXY_URL=https://localhost:9092/realms/test

selenium/test/oauth/env.local.proxy

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)