-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API OIDC authentication mechanism #10905
Open
ErykKul
wants to merge
17
commits into
develop
Choose a base branch
from
authn-arch-api-oidc
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
81d0ee0
api oidc authentication mechanism
ErykKul 96fab76
replaced tabs with spaces
ErykKul cbde18f
better error handling for not authenticated users
ErykKul b137bbc
Update docker-compose-dev.yml
ErykKul e94ebc4
changed the demo user to admin and better error when user is not foun…
ErykKul 2a2c583
admin user email fix
ErykKul b7937e6
restored kaycloak config to original
ErykKul d1120f8
restored bearer token config
ErykKul eea06bd
removed unused import
ErykKul 1a5cc5d
simplified config
ErykKul 5c1dc24
improved implementation with exposed tokens, no unverified emails blo…
ErykKul 575d653
only verified email can be used to log in
ErykKul eea3b5c
fixed email verified check
ErykKul 0703a65
oidc JSF log in
ErykKul ff8bb52
bearer token and oidc provider refactoring to use the new payara mech…
ErykKul 61703e8
fixed log in issues
ErykKul 004613f
redirect to first log in page and user lookup by user record identifier
ErykKul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,13 +16,12 @@ services: | |
ENABLE_RELOAD: "1" | ||
SKIP_DEPLOY: "${SKIP_DEPLOY}" | ||
DATAVERSE_JSF_REFRESH_PERIOD: "1" | ||
DATAVERSE_FEATURE_API_BEARER_AUTH: "1" | ||
ErykKul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
DATAVERSE_MAIL_SYSTEM_EMAIL: "dataverse@localhost" | ||
DATAVERSE_MAIL_MTA_HOST: "smtp" | ||
DATAVERSE_AUTH_OIDC_ENABLED: "1" | ||
DATAVERSE_AUTH_OIDC_CLIENT_ID: test | ||
DATAVERSE_AUTH_OIDC_CLIENT_SECRET: 94XHrfNRwXsjqTqApRrwWmhDLDHpIYV8 | ||
DATAVERSE_AUTH_OIDC_AUTH_SERVER_URL: http://keycloak.mydomain.com:8090/realms/test | ||
ErykKul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
DATAVERSE_AUTH_API_OIDC_CLIENT_ID: oauth2-proxy | ||
DATAVERSE_AUTH_API_OIDC_CLIENT_SECRET: 72341b6d-7065-4518-a0e4-50ee15025608 | ||
DATAVERSE_AUTH_API_OIDC_PROVIDER_URI: http://172.17.0.1:9080/realms/oauth2-proxy | ||
ErykKul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
DATAVERSE_AUTH_API_OIDC_REDIRECT_URI: http://localhost:8080/api/v1/callback/token | ||
DATAVERSE_SPI_EXPORTERS_DIRECTORY: "/dv/exporters" | ||
# These two oai settings are here to get HarvestingServerIT to pass | ||
dataverse_oai_server_maxidentifiers: "2" | ||
|
@@ -164,24 +163,24 @@ services: | |
tmpfs: | ||
- /mail:mode=770,size=128M,uid=1000,gid=1000 | ||
|
||
dev_keycloak: | ||
container_name: "dev_keycloak" | ||
image: 'quay.io/keycloak/keycloak:21.0' | ||
keycloak: | ||
ErykKul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
container_name: keycloak | ||
image: keycloak/keycloak:25.0 | ||
hostname: keycloak | ||
command: | ||
- 'start-dev' | ||
ErykKul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- '--http-port=9080' | ||
- '--import-realm' | ||
volumes: | ||
- ./keycloak:/opt/keycloak/data/import | ||
environment: | ||
- KEYCLOAK_ADMIN=kcadmin | ||
- KEYCLOAK_ADMIN_PASSWORD=kcpassword | ||
- KEYCLOAK_LOGLEVEL=DEBUG | ||
- KC_HOSTNAME_STRICT=false | ||
networks: | ||
dataverse: | ||
aliases: | ||
- keycloak.mydomain.com #create a DNS alias within the network (add the same alias to your /etc/hosts to get a working OIDC flow) | ||
command: start-dev --import-realm --http-port=8090 # change port to 8090, so within the network and external the same port is used | ||
KC_HTTP_PORT: 9080 | ||
ErykKul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
KEYCLOAK_ADMIN: [email protected] | ||
ErykKul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
KEYCLOAK_ADMIN_PASSWORD: password | ||
ports: | ||
- "8090:8090" | ||
volumes: | ||
- './conf/keycloak/test-realm.json:/opt/keycloak/data/import/test-realm.json' | ||
- 9080:9080 | ||
networks: | ||
- dataverse | ||
|
||
ErykKul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# This proxy configuration is only intended to be used for development purposes! | ||
# DO NOT USE IN PRODUCTION! HIGH SECURITY RISK! | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just putting this here at the top but can we please get a release note snippet?