TOSIT-IO / tdp-ui

Graphical interface for tdp-server
Apache License 2.0
3 stars 2 forks source link

161 unauthenticated mode #163

Closed PaulFarault closed 1 year ago

PaulFarault commented 1 year ago

Which issue(s) this PR fixes

Fixes #161

Additional comments

This PR may be improved by storing the user profile infos in Redux (#138).

Agreements

PaulFarault commented 1 year ago

@rpignolet I wonder if I should store the skipAuth as a config prop. Would it be better to have it as an environment variable?

Also, I wonder how to integrate it to the doc as in order to work, we have to specify the DO_NOT_USE_IN_PRODUCTION_DISABLE_TOKEN_CHECK env variable on tdp-server. Should we add a dedicated dev or test env? Or just a mention on the README?

rpignolet commented 1 year ago

In tdp-server, all config var can be defined as environment variable, I think it should be the same for tdp-ui but this is a generic feature, currently, if the tdp-ui config does not read environment variable, do not add it inside this PR. You can add a mention inside the README if you want.

leopaul36 commented 1 year ago

I enabled DO_NOT_USE_IN_PRODUCTION_DISABLE_TOKEN_CHECK=True in env/dev/config/tdp_server.env and the UI still tries to reach the OpenID, I can see in the console:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8080/auth/realms/tdp_server/.well-known/openid-configuration. (Reason: CORS request did not succeed). Status code: (null).

Did I miss something?

PaulFarault commented 1 year ago

I can't reproduce it @leopaul36, did you set skipAuth to true in the UI's config.json? (Yes, it is not documented yet)

PaulFarault commented 1 year ago

Force pushed after rebase on master.