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

SPA - OIDC integration following the design implemented on the PoC #558

Merged
merged 103 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 102 commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
d940723
Added: oidc-pkce boilerplate
GPortas Oct 3, 2024
5bc3cc6
Changed: simpler OIDC config init
GPortas Oct 3, 2024
d5b41b2
chore: use alpha version of js-dataverse
g-saracca Oct 4, 2024
8e80e3d
feat: avoid react strict mode for now to avoid double renders on dev …
g-saracca Oct 4, 2024
ee4d48f
feat: autoLogin config to false to avoid inmediate login from AuthCon…
g-saracca Oct 4, 2024
1edfce9
feat: modify protected route base on AuthContext properties
g-saracca Oct 4, 2024
d11f55e
feat: login, logout and user name in header with OIDC AuthContext fun…
g-saracca Oct 4, 2024
454ddb4
feat: some experimental things and logs in the SessionProvider
g-saracca Oct 4, 2024
da681ad
Fixed: reverse proxy rules
GPortas Oct 7, 2024
78ef74a
Added: OIDC support for the containerized Dataverse instance
GPortas Oct 7, 2024
cb43509
Added: missing Bearer token feature flag turned on
GPortas Oct 7, 2024
5b07eb4
Added: format tweak in docker-compose
GPortas Oct 7, 2024
ba14705
Removed: session auth feature flag from docker-compose due to incompa…
GPortas Oct 7, 2024
4cbaa12
Fixed: OIDC integration issues
GPortas Oct 8, 2024
faae765
feat: change base url naming of backend url due to conflict with base…
g-saracca Oct 8, 2024
78b37ed
feat: callback page, redirect user to intended page
g-saracca Oct 8, 2024
7115e7a
Merge branch 'poc/oidc_pkce' of https://github.com/IQSS/dataverse-fro…
g-saracca Oct 8, 2024
00d3a0e
Changed: using js-dataverse version with OIDC token bearer auth
GPortas Oct 11, 2024
d4fa0c4
Merge branch 'poc/oidc_pkce' of github.com:IQSS/dataverse-frontend in…
GPortas Oct 11, 2024
9c2beee
Changed: upgraded js-dataverse package version
GPortas Oct 14, 2024
819196c
Merge branch 'develop' into poc/oidc_pkce
g-saracca Oct 14, 2024
78828e8
feat: back to using authenticated user data from dataverse
g-saracca Oct 14, 2024
bdc76d4
feat: fix lint and change wording
g-saracca Oct 14, 2024
882fbb9
feat: send login state as object with returnTo path
g-saracca Oct 15, 2024
e30c11c
Merge branch 'develop' into feat/528-oidc-integration
g-saracca Oct 25, 2024
5fba27f
chore: bump package version
g-saracca Oct 25, 2024
dc42ba9
feat: navigate back to parent collection
g-saracca Oct 29, 2024
06cb721
feat: remove unused refreshTokenExpire
g-saracca Oct 29, 2024
1f1b0cf
feat: protected route dont render outlet unless user is set
g-saracca Oct 29, 2024
666a71e
test: initial e2e test work with new auth mechanism
g-saracca Oct 29, 2024
16fa000
Merge branch 'develop' into feat/528-oidc-integration
g-saracca Nov 4, 2024
b75cfc1
test: refactor api helpers and utils
g-saracca Nov 4, 2024
da54b6f
test: refactor tests with new oidc
g-saracca Nov 4, 2024
12fe3f7
test: set regular user as superuser in setup
g-saracca Nov 5, 2024
da82d11
feat: change link to old login for button link
g-saracca Nov 5, 2024
7975ce9
tests: more work on setup etc
g-saracca Nov 7, 2024
e5fa8ee
feat: add axios instance
g-saracca Nov 7, 2024
885fb08
feat: integration tests
g-saracca Nov 7, 2024
f75fc38
chore: update js-dataverse version
g-saracca Nov 25, 2024
d8a603b
feat: use DV local storage key prefix and pass it trough js-dataverse
g-saracca Nov 25, 2024
ee1c82a
feat: read error handler
g-saracca Nov 25, 2024
1aa6064
feat: detect specific error to redirect user to sign up page
g-saracca Nov 25, 2024
c769dfa
feat: session provider in router, redirect to signup page
g-saracca Nov 25, 2024
ecf61d5
feat: sign up form working
g-saracca Nov 26, 2024
59a47e2
feat(design-system): add rows prop
g-saracca Nov 26, 2024
a579ee9
feat: add alert about pre-filled fields and msg
g-saracca Nov 27, 2024
3ad6c2b
feat: catch errors and navigate after success
g-saracca Nov 27, 2024
f77475c
feat: logout user if cancels the form
g-saracca Nov 27, 2024
07bd1cd
feat: session provider work for unit testing also
g-saracca Nov 27, 2024
0cfd017
test: fix component tests
g-saracca Nov 27, 2024
51532af
feat: get terms of use
g-saracca Nov 27, 2024
42e800f
test: fix request access modal tests
g-saracca Nov 27, 2024
e674e26
feat: implement story
g-saracca Nov 28, 2024
edf4429
feat: get terms of use repository convention
g-saracca Nov 28, 2024
f3e4689
feat: add aria-required attrs
g-saracca Nov 28, 2024
c3049d1
Merge branch 'develop' into feat/528-oidc-integration
g-saracca Nov 28, 2024
dfcf7ac
feat(design system): extend Table props
g-saracca Nov 28, 2024
d6c8c26
feat: extend User interface with identifier
g-saracca Nov 28, 2024
884dfa6
feat: redirect user to account info tab after registration
g-saracca Nov 28, 2024
9609648
feat: add account info tab stories
g-saracca Nov 28, 2024
baa605d
test: account unit tests
g-saracca Nov 28, 2024
084a85e
test: auth-callback unit test
g-saracca Nov 29, 2024
ec97eea
test: sign up and form tests
g-saracca Nov 29, 2024
c158b70
chore: upgrade js-dataverse
g-saracca Nov 29, 2024
bddfcac
feat: use register use case instead of axios
g-saracca Nov 29, 2024
63a7cf9
test: use user repo instead of axios
g-saracca Nov 29, 2024
148cc26
feat: use user repo in stories
g-saracca Nov 29, 2024
58a4329
feat: add position to User modal and show it in account info
g-saracca Nov 29, 2024
9b5d880
chore: fix lint errors
g-saracca Nov 29, 2024
75a59c5
feat: show created alert
g-saracca Dec 2, 2024
855d5ff
tests: finish with e2e & integration tests
g-saracca Dec 2, 2024
022a925
test: use pr 10959 dataverse img tag version
g-saracca Dec 3, 2024
810bcea
feat: navigate to root collection after success
g-saracca Dec 3, 2024
e2f32cc
chore: add confetti package
g-saracca Dec 3, 2024
89c9342
feat: show success alert and confettis
g-saracca Dec 3, 2024
6886639
feat: fix z-index and remove unneeded alert
g-saracca Dec 3, 2024
17a3ed5
test: command assert collection after sign up
g-saracca Dec 3, 2024
73546d4
chore: missing claims flag
g-saracca Dec 3, 2024
81bc0b5
chore: remove logs
g-saracca Dec 3, 2024
1f359df
chore: remove old todos and comments
g-saracca Dec 3, 2024
4818ec0
chore: install dompurify to sanitize html
g-saracca Dec 3, 2024
6f640ca
feat: sanitize future installation terms of use
g-saracca Dec 3, 2024
ae17898
lint: fix type
g-saracca Dec 3, 2024
1f84839
test: fix unit test hook
g-saracca Dec 3, 2024
6550206
chore: update to latest js-dataverse pr version
g-saracca Dec 3, 2024
67de855
feat: comment out terms of use call
g-saracca Dec 4, 2024
93c4d4b
test: update accoun info tests
g-saracca Dec 4, 2024
d04cd5a
test: force click
g-saracca Dec 4, 2024
0ba8559
test: wait to see if button disabled error goes away
g-saracca Dec 4, 2024
7863b95
test: rollback changes and add missing register
g-saracca Dec 4, 2024
f55d190
chore: remove unusude dataverse info repo
g-saracca Dec 4, 2024
9eaf379
test: change cy viewport
g-saracca Dec 4, 2024
c5e9031
test: set up cypress cloud recording
g-saracca Dec 4, 2024
4c1de69
test: check with find by test id
g-saracca Dec 4, 2024
92ff472
test: check not disabled first
g-saracca Dec 4, 2024
27c1d28
test: check not disabled and checked states before clicking
g-saracca Dec 4, 2024
31d25de
test: remove should be checked
g-saracca Dec 5, 2024
31f506a
test: add wait 300
g-saracca Dec 5, 2024
f698b57
test: test only ValidToken form test
g-saracca Dec 5, 2024
f12fc28
test: add a wait before checking
g-saracca Dec 5, 2024
db44740
test: wait at the begining helps, removing cypress record config
g-saracca Dec 5, 2024
448ed61
test: initiate api config in tests with bearer token, remove unnecess…
g-saracca Dec 6, 2024
84f1832
Update tests/e2e-integration/integration/datasets/DatasetJSDataverseR…
g-saracca Dec 10, 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
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
types: [opened, reopened]

env:
E2E_DATAVERSE_IMAGE_TAG: unstable
E2E_DATAVERSE_IMAGE_TAG: 10959-bearer-token-auth-ext

jobs:
e2e:
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Update registry for the containerized development environment
working-directory: dev-env
run: |
sed -i~ '/^REGISTRY=/s/=.*/=docker.io/' .env
sed -i~ '/^REGISTRY=/s/=.*/=ghcr.io/' .env
shell: bash

- name: Start containers
Expand Down Expand Up @@ -122,7 +122,6 @@ jobs:
uses: cypress-io/github-action@v5
with:
component: true

- name: Cypress run Design System
uses: cypress-io/github-action@v5
with:
Expand Down
35 changes: 34 additions & 1 deletion dev-env/docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
depends_on:
- dev_dataverse
- dev_frontend
- dev_keycloak
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./docker-dev-volumes/nginx/logs:/var/log/nginx/
Expand Down Expand Up @@ -46,7 +47,12 @@ services:
DATAVERSE_DB_HOST: postgres
DATAVERSE_DB_PASSWORD: secret
DATAVERSE_DB_USER: ${DATAVERSE_DB_USER}
DATAVERSE_FEATURE_API_SESSION_AUTH: 1
DATAVERSE_FEATURE_API_BEARER_AUTH: 1
DATAVERSE_FEATURE_API_BEARER_AUTH_PROVIDE_MISSING_CLAIMS: 1
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:9080/realms/test
JVM_ARGS: -Ddataverse.pid.providers=fake
-Ddataverse.pid.default-provider=fake
-Ddataverse.pid.fake.type=FAKE
Expand All @@ -66,6 +72,9 @@ services:
-Ddataverse.files.s3.connection-pool-size=2048
-Ddataverse.files.s3.custom-endpoint-region=us-east-1
-Ddataverse.files.s3.custom-endpoint-url=https://s3.us-east-1.amazonaws.com
expose:
- '8080'
# TODO: The port has been opened for the redirection to /oauth2/callback.xhtml after a JSF OIDC login. We may prefer to change this to use the proxy.
ports:
- '8080:8080'
networks:
Expand Down Expand Up @@ -172,6 +181,30 @@ services:
tmpfs:
- /mail:mode=770,size=128M,uid=1000,gid=1000

dev_keycloak:
container_name: 'dev_keycloak'
image: 'quay.io/keycloak/keycloak:21.0'
hostname: keycloak
command:
- 'start-dev'
- '--import-realm'
environment:
- KC_HTTP_PORT=9080
- KC_HOSTNAME=localhost
- KC_HOSTNAME_PORT=8000
- KC_HOSTNAME_ADMIN_URL=http://localhost:8000
- KEYCLOAK_ADMIN=kcadmin
- KEYCLOAK_ADMIN_PASSWORD=kcpassword
- KEYCLOAK_LOGLEVEL=DEBUG
networks:
dataverse:
aliases:
- keycloak.mydomain.com
expose:
- 9080
volumes:
- './keycloak/test-realm.json:/opt/keycloak/data/import/test-realm.json'

networks:
dataverse:
driver: bridge
Loading
Loading