Skip to content

Commit 2b51cd7

Browse files
committed
Use secured hydra endpoints for PTs
1 parent 57b16da commit 2b51cd7

File tree

10 files changed

+30
-30
lines changed

10 files changed

+30
-30
lines changed

testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/common/HydraIdentityProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void extendEnvironment(Environment.Builder builder)
7979
.withEnv("OAUTH2_EXPOSE_INTERNAL_ERRORS", "1")
8080
.withEnv("GODEBUG", "http2debug=1")
8181
.withEnv("DSN", DSN)
82-
.withEnv("URLS_SELF_ISSUER", "http://hydra:4444/")
82+
.withEnv("URLS_SELF_ISSUER", "https://hydra:4444/")
8383
.withEnv("URLS_CONSENT", "http://hydra-consent:3000/consent")
8484
.withEnv("URLS_LOGIN", "http://hydra-consent:3000/login")
8585
.withEnv("SERVE_TLS_KEY_PATH", "/tmp/certs/hydra.pem")
@@ -88,7 +88,7 @@ public void extendEnvironment(Environment.Builder builder)
8888
.withEnv("TTL_ACCESS_TOKEN", TTL_ACCESS_TOKEN_IN_SECONDS + "s")
8989
.withEnv("TTL_REFRESH_TOKEN", TTL_REFRESH_TOKEN_IN_SECONDS + "s")
9090
.withEnv("OAUTH2_ALLOWED_TOP_LEVEL_CLAIMS", "groups")
91-
.withCommand("serve", "all", "--dangerous-force-http")
91+
.withCommand("serve", "all")
9292
.withCopyFileToContainer(forHostPath(configDir.getPath("cert/hydra.pem")), "/tmp/certs/hydra.pem")
9393
.waitingFor(new WaitAllStrategy()
9494
.withStrategy(Wait.forLogMessage(".*Setting up http server on :4444.*", 1))
@@ -135,7 +135,7 @@ public DockerContainer createClient(
135135
{
136136
DockerContainer clientCreatingContainer = new DockerContainer(HYDRA_IMAGE, "hydra-client-preparation")
137137
.withCommand("clients", "create",
138-
"--endpoint", "http://hydra:4445",
138+
"--endpoint", "https://hydra:4445",
139139
"--skip-tls-verify",
140140
"--id", clientId,
141141
"--secret", clientSecret,

testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/common/hydra-identity-provider/login_and_consent_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from urllib.parse import urlparse, parse_qs
77
from urllib.request import Request, urlopen
88

9-
HYDRA_ADMIN_URL = os.getenv("HYDRA_ADMIN_URL", "http://hydra:4445")
9+
HYDRA_ADMIN_URL = os.getenv("HYDRA_ADMIN_URL", "https://hydra:4445")
1010
PORT = os.getenv("PORT", 3000)
1111
SSL_CONTEXT = ssl.create_default_context()
1212
SSL_CONTEXT.check_hostname = False

testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/environment/singlenode-oauth2-authenticated-http-proxy/trino/config.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ http-server.authentication.type=oauth2
1313
http-server.https.port=7778
1414
http-server.https.enabled=true
1515
http-server.https.keystore.path=/docker/trino-product-tests/conf/trino/etc/trino.pem
16-
http-server.authentication.oauth2.issuer=http://hydra:4444/
17-
http-server.authentication.oauth2.auth-url=http://hydra:4444/oauth2/auth
18-
http-server.authentication.oauth2.token-url=http://hydra:4444/oauth2/token
19-
http-server.authentication.oauth2.jwks-url=http://hydra:4444/.well-known/jwks.json
16+
http-server.authentication.oauth2.issuer=https://hydra:4444/
17+
http-server.authentication.oauth2.auth-url=https://hydra:4444/oauth2/auth
18+
http-server.authentication.oauth2.token-url=https://hydra:4444/oauth2/token
19+
http-server.authentication.oauth2.jwks-url=https://hydra:4444/.well-known/jwks.json
2020
http-server.authentication.oauth2.client-id=trinodb_client_id
2121
http-server.authentication.oauth2.client-secret=trinodb_client_secret
2222
http-server.authentication.oauth2.user-mapping.pattern=(.*)(@.*)?

testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/environment/singlenode-oauth2-authenticated-https-proxy/trino/config.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ http-server.authentication.type=oauth2
1313
http-server.https.port=7778
1414
http-server.https.enabled=true
1515
http-server.https.keystore.path=/docker/trino-product-tests/conf/trino/etc/trino.pem
16-
http-server.authentication.oauth2.issuer=http://hydra:4444/
17-
http-server.authentication.oauth2.auth-url=http://hydra:4444/oauth2/auth
18-
http-server.authentication.oauth2.token-url=http://hydra:4444/oauth2/token
19-
http-server.authentication.oauth2.jwks-url=http://hydra:4444/.well-known/jwks.json
16+
http-server.authentication.oauth2.issuer=https://hydra:4444/
17+
http-server.authentication.oauth2.auth-url=https://hydra:4444/oauth2/auth
18+
http-server.authentication.oauth2.token-url=https://hydra:4444/oauth2/token
19+
http-server.authentication.oauth2.jwks-url=https://hydra:4444/.well-known/jwks.json
2020
http-server.authentication.oauth2.client-id=trinodb_client_id
2121
http-server.authentication.oauth2.client-secret=trinodb_client_secret
2222
http-server.authentication.oauth2.user-mapping.pattern=(.*)(@.*)?

testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/environment/singlenode-oauth2-http-proxy/config.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ http-server.authentication.type=oauth2
1313
http-server.https.port=7778
1414
http-server.https.enabled=true
1515
http-server.https.keystore.path=/docker/trino-product-tests/conf/trino/etc/trino.pem
16-
http-server.authentication.oauth2.issuer=http://hydra:4444/
17-
http-server.authentication.oauth2.auth-url=http://hydra:4444/oauth2/auth
18-
http-server.authentication.oauth2.token-url=http://hydra:4444/oauth2/token
19-
http-server.authentication.oauth2.jwks-url=http://hydra:4444/.well-known/jwks.json
16+
http-server.authentication.oauth2.issuer=https://hydra:4444/
17+
http-server.authentication.oauth2.auth-url=https://hydra:4444/oauth2/auth
18+
http-server.authentication.oauth2.token-url=https://hydra:4444/oauth2/token
19+
http-server.authentication.oauth2.jwks-url=https://hydra:4444/.well-known/jwks.json
2020
http-server.authentication.oauth2.client-id=trinodb_client_id
2121
http-server.authentication.oauth2.client-secret=trinodb_client_secret
2222
http-server.authentication.oauth2.user-mapping.pattern=(.*)(@.*)?

testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/environment/singlenode-oauth2-https-proxy/config.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ http-server.authentication.type=oauth2
1313
http-server.https.port=7778
1414
http-server.https.enabled=true
1515
http-server.https.keystore.path=/docker/trino-product-tests/conf/trino/etc/trino.pem
16-
http-server.authentication.oauth2.issuer=http://hydra:4444/
17-
http-server.authentication.oauth2.auth-url=http://hydra:4444/oauth2/auth
18-
http-server.authentication.oauth2.token-url=http://hydra:4444/oauth2/token
19-
http-server.authentication.oauth2.jwks-url=http://hydra:4444/.well-known/jwks.json
16+
http-server.authentication.oauth2.issuer=https://hydra:4444/
17+
http-server.authentication.oauth2.auth-url=https://hydra:4444/oauth2/auth
18+
http-server.authentication.oauth2.token-url=https://hydra:4444/oauth2/token
19+
http-server.authentication.oauth2.jwks-url=https://hydra:4444/.well-known/jwks.json
2020
http-server.authentication.oauth2.client-id=trinodb_client_id
2121
http-server.authentication.oauth2.client-secret=trinodb_client_secret
2222
http-server.authentication.oauth2.user-mapping.pattern=(.*)(@.*)?

testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/environment/singlenode-oauth2-refresh/config.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ http-server.authentication.type=oauth2
1313
http-server.https.port=7778
1414
http-server.https.enabled=true
1515
http-server.https.keystore.path=/docker/trino-product-tests/conf/trino/etc/trino.pem
16-
http-server.authentication.oauth2.issuer=http://hydra:4444/
16+
http-server.authentication.oauth2.issuer=https://hydra:4444/
1717
http-server.authentication.oauth2.scopes=openid,offline
18-
http-server.authentication.oauth2.auth-url=http://hydra:4444/oauth2/auth
19-
http-server.authentication.oauth2.token-url=http://hydra:4444/oauth2/token
20-
http-server.authentication.oauth2.jwks-url=http://hydra:4444/.well-known/jwks.json
18+
http-server.authentication.oauth2.auth-url=https://hydra:4444/oauth2/auth
19+
http-server.authentication.oauth2.token-url=https://hydra:4444/oauth2/token
20+
http-server.authentication.oauth2.jwks-url=https://hydra:4444/.well-known/jwks.json
2121
http-server.authentication.oauth2.client-id=trinodb_client_id
2222
http-server.authentication.oauth2.client-secret=trinodb_client_secret
2323
http-server.authentication.oauth2.user-mapping.pattern=(.*)(@.*)?

testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/environment/singlenode-oauth2/config.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ http-server.authentication.type=oauth2
1313
http-server.https.port=7778
1414
http-server.https.enabled=true
1515
http-server.https.keystore.path=/docker/trino-product-tests/conf/trino/etc/trino.pem
16-
http-server.authentication.oauth2.issuer=http://hydra:4444/
17-
http-server.authentication.oauth2.auth-url=http://hydra:4444/oauth2/auth
18-
http-server.authentication.oauth2.token-url=http://hydra:4444/oauth2/token
19-
http-server.authentication.oauth2.jwks-url=http://hydra:4444/.well-known/jwks.json
16+
http-server.authentication.oauth2.issuer=https://hydra:4444/
17+
http-server.authentication.oauth2.auth-url=https://hydra:4444/oauth2/auth
18+
http-server.authentication.oauth2.token-url=https://hydra:4444/oauth2/token
19+
http-server.authentication.oauth2.jwks-url=https://hydra:4444/.well-known/jwks.json
2020
http-server.authentication.oauth2.client-id=trinodb_client_id
2121
http-server.authentication.oauth2.client-secret=trinodb_client_secret
2222
http-server.authentication.oauth2.user-mapping.pattern=(.*)(@.*)?

testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/environment/singlenode-oidc-refresh/config.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ http-server.authentication.type=oauth2
1313
http-server.https.port=7778
1414
http-server.https.enabled=true
1515
http-server.https.keystore.path=/docker/trino-product-tests/conf/trino/etc/trino.pem
16-
http-server.authentication.oauth2.issuer=http://hydra:4444/
16+
http-server.authentication.oauth2.issuer=https://hydra:4444/
1717
http-server.authentication.oauth2.scopes=openid,offline
1818
http-server.authentication.oauth2.client-id=trinodb_client_id
1919
http-server.authentication.oauth2.client-secret=trinodb_client_secret

testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/environment/singlenode-oidc/config.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ http-server.authentication.type=oauth2
1313
http-server.https.port=7778
1414
http-server.https.enabled=true
1515
http-server.https.keystore.path=/docker/trino-product-tests/conf/trino/etc/trino.pem
16-
http-server.authentication.oauth2.issuer=http://hydra:4444/
16+
http-server.authentication.oauth2.issuer=https://hydra:4444/
1717
http-server.authentication.oauth2.client-id=trinodb_client_id
1818
http-server.authentication.oauth2.client-secret=trinodb_client_secret
1919
http-server.authentication.oauth2.user-mapping.pattern=(.*)(@.*)?

0 commit comments

Comments
 (0)