Skip to content
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

Draft
wants to merge 62 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
81d0ee0
api oidc authentication mechanism
ErykKul Oct 3, 2024
96fab76
replaced tabs with spaces
ErykKul Oct 3, 2024
cbde18f
better error handling for not authenticated users
ErykKul Oct 3, 2024
b137bbc
Update docker-compose-dev.yml
ErykKul Oct 3, 2024
e94ebc4
changed the demo user to admin and better error when user is not foun…
ErykKul Oct 3, 2024
2a2c583
admin user email fix
ErykKul Oct 3, 2024
b7937e6
restored kaycloak config to original
ErykKul Oct 3, 2024
d1120f8
restored bearer token config
ErykKul Oct 3, 2024
eea06bd
removed unused import
ErykKul Oct 3, 2024
1a5cc5d
simplified config
ErykKul Oct 3, 2024
5c1dc24
improved implementation with exposed tokens, no unverified emails blo…
ErykKul Oct 4, 2024
575d653
only verified email can be used to log in
ErykKul Oct 4, 2024
eea3b5c
fixed email verified check
ErykKul Oct 4, 2024
0703a65
oidc JSF log in
ErykKul Oct 4, 2024
ff8bb52
bearer token and oidc provider refactoring to use the new payara mech…
ErykKul Oct 4, 2024
61703e8
fixed log in issues
ErykKul Oct 4, 2024
004613f
redirect to first log in page and user lookup by user record identifier
ErykKul Oct 5, 2024
d377505
Multi-tenancy implementation
ErykKul Oct 5, 2024
895e054
bearer token mechanism for OIDC
ErykKul Oct 5, 2024
ac43c94
OIDC token is no loger stored in DB after first log in
ErykKul Oct 5, 2024
baa02ea
python bearer token example
ErykKul Oct 5, 2024
1db8c10
added documentation
ErykKul Oct 7, 2024
e603365
doc fix
ErykKul Oct 7, 2024
0123ab2
added a release note
ErykKul Oct 7, 2024
b0190e5
doc fix
ErykKul Oct 7, 2024
058c17a
doc fix
ErykKul Oct 7, 2024
4e6e8e5
doc fix
ErykKul Oct 7, 2024
6a635bf
doc fix
ErykKul Oct 7, 2024
3cf9d4d
doc fix
ErykKul Oct 7, 2024
22da240
Update src/main/java/edu/harvard/iq/dataverse/authorization/providers…
ErykKul Oct 7, 2024
96bb495
Update src/main/java/edu/harvard/iq/dataverse/authorization/providers…
ErykKul Oct 7, 2024
5950c94
Update doc/sphinx-guides/source/installation/oidc.rst
ErykKul Oct 7, 2024
6ff8744
Update doc/sphinx-guides/source/installation/oidc.rst
ErykKul Oct 7, 2024
803618d
Update doc/release-notes/PR-10905-OIDC-new-implementation.md
ErykKul Oct 7, 2024
68da25a
removed run_dev_env.sh and added it in .gitignore to prevent commitin…
ErykKul Oct 7, 2024
d600c51
moved python example
ErykKul Oct 7, 2024
817c416
restored accidently deleted line
ErykKul Oct 7, 2024
45facde
@ejb -> @inject
ErykKul Oct 7, 2024
9a44380
toJson -> JsonPrinter.json
ErykKul Oct 7, 2024
ef0f0f8
change BearerTokenMechanism class to final class
ErykKul Oct 7, 2024
0658a93
added comment
ErykKul Oct 7, 2024
6148051
added comment
ErykKul Oct 7, 2024
ca5ee82
removed unused injection
ErykKul Oct 7, 2024
b56210b
This is Javagit add -A! (Spartan kick here)
ErykKul Oct 7, 2024
139c9fc
reverted token auto-refreshing to default value
ErykKul Oct 7, 2024
28d70aa
made the fact that nobody has access to the content behind the authen…
ErykKul Oct 7, 2024
1ffdf70
renamed required role: all -> nobodyHasAccess
ErykKul Oct 7, 2024
5057c61
SEVERE -> FINE
ErykKul Oct 7, 2024
fc5fb0f
simplified method a bit
ErykKul Oct 7, 2024
a30647f
removed nimbus dependency
ErykKul Oct 7, 2024
9a4a702
added comments in the code
ErykKul Oct 8, 2024
e1b75f9
updated release note
ErykKul Oct 8, 2024
b90bb31
PKCE client example
ErykKul Oct 8, 2024
56c7ade
removed unneeded newline
ErykKul Oct 8, 2024
c151b5c
added ; at the end of the line
ErykKul Oct 8, 2024
f219d79
double quotes to single quotes
ErykKul Oct 8, 2024
e39749e
fixed server restart problem
ErykKul Oct 9, 2024
be96092
reverted commit on a wrong branch
ErykKul Oct 9, 2024
bb70526
simplified implementation
ErykKul Oct 13, 2024
0264957
removed uneeded log
ErykKul Oct 13, 2024
0ec91dd
updated configuration
ErykKul Oct 13, 2024
11e7de7
merged develop
ErykKul Nov 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 19 additions & 20 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ services:
ENABLE_RELOAD: "1"
ErykKul marked this conversation as resolved.
Show resolved Hide resolved
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"
Expand Down Expand Up @@ -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!
Expand Down
Loading
Loading