Skip to content

Commit da2f60d

Browse files
Rename oauth-proxy to forward-proxy
1 parent 0ca9ba9 commit da2f60d

13 files changed

+56
-37
lines changed
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11

22
HTTPD_DOCKER_IMAGE=httpd:latest
33

4-
ensure_oauth-proxy() {
5-
if docker ps | grep oauth-proxy &> /dev/null; then
6-
print "oauth-proxy already running ..."
4+
ensure_forward-proxy() {
5+
if docker ps | grep forward-proxy &> /dev/null; then
6+
print "forward-proxy already running ..."
77
else
8-
start_oauth-proxy
8+
start_forward-proxy
99
fi
1010
}
11-
init_oauth-proxy() {
12-
HTTPD_CONFIG_DIR=${TEST_CONFIG_DIR}/oauth-proxy
13-
PROXY_HOSTNAME=oauth-proxy
11+
init_forward-proxy() {
12+
HTTPD_CONFIG_DIR=${TEST_CONFIG_DIR}/forward-proxy
13+
PROXY_HOSTNAME=forward-proxy
1414
PROXY_PORT=9092
1515

1616
print "> HTTPD_CONFIG: ${HTTPD_CONFIG_DIR}"
@@ -19,11 +19,11 @@ init_oauth-proxy() {
1919
print "> PROXY_PORT: ${PROXY_PORT}"
2020

2121
}
22-
start_oauth-proxy() {
23-
begin "Starting oauth-proxy ..."
22+
start_forward-proxy() {
23+
begin "Starting forward-proxy ..."
2424

25-
init_oauth-proxy
26-
kill_container_if_exist oauth-proxy
25+
init_forward-proxy
26+
kill_container_if_exist forward-proxy
2727

2828
MOUNT_HTTPD_CONFIG_DIR=$CONF_DIR/httpd
2929

@@ -33,12 +33,12 @@ start_oauth-proxy() {
3333

3434
docker run \
3535
--detach \
36-
--name oauth-proxy \
36+
--name forward-proxy \
3737
--net ${DOCKER_NETWORK} \
3838
--publish 9092:9092 \
3939
--mount "type=bind,source=${MOUNT_HTTPD_CONFIG_DIR},target=/usr/local/apache2/conf" \
4040
${HTTPD_DOCKER_IMAGE}
4141

4242
wait_for_url $OAUTH_PROVIDER_URL ${PROXY_HOSTNAME}:${PROXY_PORT}
43-
end "oauth-proxy is ready"
43+
end "forward-proxy is ready"
4444
}

selenium/bin/suite_template

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,12 @@ run_on_docker_with() {
568568
trap teardown_components EXIT
569569

570570
start_components
571+
TEST_RESULT=$?
572+
if [ $TEST_RESULT -ne 0 ]; then
573+
teardown_components
574+
exit $TEST_RESULT
575+
fi
576+
571577
test
572578
TEST_RESULT=$?
573579
save_logs

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
44

55
TEST_CASES_PATH=/oauth/with-sp-initiated
66
TEST_CONFIG_PATH=/oauth
7-
PROFILES="oauth-proxy keycloak proxy-oauth-provider keycloak-mgt-oauth-provider tls"
7+
PROFILES="forward-proxy keycloak forward-proxy-oauth-provider keycloak-mgt-oauth-provider tls"
88

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

selenium/test/oauth/env.docker.oauth-proxy

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export FORWARD_PROXY_CERTS=/config/oauth/forward-proxy
2+
export FORWARD_PROXY_CA_CERT=${FORWARD_PROXY_CERTS}/ca_forward-proxy_certificate.pem
3+
export FORWARD_PROXY_URL=https://localhost:9092/realms/test

selenium/test/oauth/env.local.oauth-proxy

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

selenium/test/oauth/oauth-proxy/httpd.conf renamed to selenium/test/oauth/forward-proxy/httpd.conf

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ ServerAdmin [email protected]
238238
#
239239
# If your host doesn't have a registered DNS name, enter its IP address here.
240240
#
241-
ServerName oauth-proxy
241+
ServerName forward-proxy
242242

243243
#
244244
# Deny access to the entirety of your server's filesystem. You must
@@ -503,15 +503,17 @@ SSLRandomSeed connect builtin
503503
</IfModule>
504504

505505
<VirtualHost *:9092>
506-
ServerName "oauth-proxy"
506+
ServerName "forward-proxy"
507507
ProxyRequests On
508508
ProxyVia On
509+
SSLEngine on
510+
SSLCertificateKeyFile ${FORWARD_PROXY_CERTS}/server_forward-proxy_key.pem
511+
SSLCertificateFile ${FORWARD_PROXY_CERTS}/server_forward-proxy_certificate.pem
512+
509513
SSLProxyEngine On
510-
SSLProxyVerify require
514+
SSLProxyVerify none
511515
SSLProxyVerifyDepth 10
512516

513-
SSLProxyCACertificateFile /etc/httpd/conf/certs/ca.pem
514-
515517
<Proxy "*">
516518
Allow from all
517519
</Proxy>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
auth_oauth2.issuer = ${OAUTH_PROVIDER_URL}
2+
auth_oauth2.https.cacertfile = ${FORWARD_PROXY_CA_CERT}
3+
auth_oauth2.proxy = ${FORWARD_PROXY_URL}
4+
#auth_oauth2.proxy_username = ${FORWARD_PROXY_USERNAME}
5+
#auth_oauth2.proxy_password = ${FORWARD_PROXY_PASSWORD}

0 commit comments

Comments
 (0)