Skip to content

Commit

Permalink
finally working config
Browse files Browse the repository at this point in the history
  • Loading branch information
ErykKul committed Oct 2, 2024
1 parent 172ab32 commit 336b11f
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 21 deletions.
3 changes: 0 additions & 3 deletions dev-env/add-keycloak-in-hosts.sh

This file was deleted.

3 changes: 0 additions & 3 deletions dev-env/add-oidc.sh

This file was deleted.

6 changes: 2 additions & 4 deletions dev-env/docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ services:
ports:
- 9080:9080
networks:
dataverse:
aliases:
- keycloak2.mydomain.com #create a DNS alias within the network (add the same alias to your /etc/hosts to get a working OIDC flow)
dataverse: {}

dev_nginx:
container_name: 'dev_nginx_proxy'
Expand Down Expand Up @@ -86,7 +84,7 @@ services:
DATAVERSE_AUTH_OIDC_ENABLED: "1"
DATAVERSE_AUTH_OIDC_CLIENT_ID: oauth2-proxy
DATAVERSE_AUTH_OIDC_CLIENT_SECRET: 72341b6d-7065-4518-a0e4-50ee15025608
DATAVERSE_AUTH_OIDC_AUTH_SERVER_URL: http://keycloak2.mydomain.com:9080/realms/oauth2-proxy
DATAVERSE_AUTH_OIDC_AUTH_SERVER_URL: http://172.17.0.1:9080/realms/oauth2-proxy
JVM_ARGS: -Ddataverse.pid.providers=fake
-Ddataverse.pid.default-provider=fake
-Ddataverse.pid.fake.type=FAKE
Expand Down
1 change: 1 addition & 0 deletions dev-env/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ http {

location / {
proxy_pass http://dataverse:8080;
proxy_set_header Authorization "Bearer ${http_x_forwarded_access_token}";
}

location /spa {
Expand Down
4 changes: 1 addition & 3 deletions dev-env/oauth2-proxy-keycloak.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ cookie_domains=["localhost:4180", "localhost:8000", "localhost:9080"] # Required
whitelist_domains=[".localhost"] # Required to allow redirection back to original requested target.
skip_jwt_bearer_tokens="true" # will skip requests that have verified JWT bearer tokens (the token must have aud that matches this client id or one of the extras from extra-jwt-issuers)
pass_access_token="true"
set_xauthrequest="true"
pass_authorization_header="true"

# keycloak provider
client_secret="72341b6d-7065-4518-a0e4-50ee15025608"
Expand All @@ -17,6 +15,6 @@ redirect_url="http://localhost:4180/oauth2/callback"

# in this case oauth2-proxy is going to visit
# http://keycloak.localhost:9080/realms/oauth2-proxy/.well-known/openid-configuration for configuration
oidc_issuer_url="http://keycloak2.mydomain.com:9080/realms/oauth2-proxy"
oidc_issuer_url="http://172.17.0.1:9080/realms/oauth2-proxy"
provider="oidc"
provider_display_name="Keycloak"
8 changes: 0 additions & 8 deletions dev-env/oidc.json

This file was deleted.

0 comments on commit 336b11f

Please sign in to comment.