I am struggling to get the example setup, as provided by the Oasis documentation running.
I have taken the Docker setup with keycloak with these few modifications:
- Disabled (commented out) North in the Docker YAML and the nginx config (North is not a priority right now)
- In
docker-compose.yaml
, changedKEYCLOAK_FRONTEND_URL=https://my-oasis.org/keycloak/auth
(like pointed out in the install docs) - In
configs/nomad.yaml
, changedpublic_server_url: 'https://my-oasis.org/keycloak/auth/'
(also according to docs) - Changed the admin credentials
Issue 1: “Unknown user (401)”
The provided keycloak realm config brings a test user. Login works.
If I now attempt Publish → Uploads, it won’t proceed, but fails with the message “You are logged in with an unknown user (401)”.
If I login with admin credentials on https://my-public-hostname/keycloak/auth , I can configure the realm. I created another user, but it behaves identically.
The logs of the nginx proxy confirm that there is indeed an access issue:
$SERVER_IP - - [22/Feb/2024:14:49:10 +0000] "GET /nomad-oasis/api/v1/uploads?page_size=10&page=1&order_by=upload_create_time&order=desc HTTP/1.1" 401 51 "https://my-oasis.org/nomad-oasis/gui/user/uploads" "$browser" "$CLIENT_IP"
$SERVER_IP - - [22/Feb/2024:14:49:10 +0000] "GET /nomad-oasis/api/v1/uploads?is_published=false&roles=main_author&page_size=10000&order_by=upload_create_time&order=desc HTTP/1.1" 401 51 "https://my-oasis.org/nomad-oasis/gui/user/uploads" "$browser" "$CLIENT_IP"
$SERVER_IP - - [22/Feb/2024:14:49:10 +0000] "GET /nomad-oasis/api/v1/uploads/command-examples HTTP/1.1" 401 51 "https://my-oasis.org/nomad-oasis/gui/user/uploads" "$browser" "$CLIENT_IP"
$SERVER_IP - - [22/Feb/2024:14:49:11 +0000] "GET /nomad-oasis/api/v1/uploads?page_size=10&page=1&order_by=upload_create_time&order=desc HTTP/1.1" 401 51 "https://my-oasis.org/nomad-oasis/gui/user/uploads" "$browser" "$CLIENT_IP"
$SERVER_IP - - [22/Feb/2024:14:49:11 +0000] "GET /nomad-oasis/api/v1/uploads/command-examples HTTP/1.1" 401 51 "https://my-oasis.org/nomad-oasis/gui/user/uploads" "$browser" "$CLIENT_IP"
$SERVER_IP - - [22/Feb/2024:14:49:11 +0000] "GET /nomad-oasis/api/v1/uploads?is_published=false&roles=main_author&page_size=10000&order_by=upload_create_time&order=desc HTTP/1.1" 401 51 "https://my-oasis.org/nomad-oasis/gui/user/uploads" "$browser" "$CLIENT_IP"
Which property must be set for a user to have access to the upload process? Why is this disabled in the reference setup from the documentation?
What puzzles me, is that I had played around with another test Oasis before, and successfully uploaded data there (example datasets etc.).
Issue 2: No user access to keycloak account console
If logged in as a user, NOMAD offers a link to the account settings at the top right (https://my-public-hostname/keycloak/auth/realms/nomad/account/). It displays the error message “failed to initialize keycloak”, and then is just stuck at the “Account Console loading …” screen.
A look into the logs of the nginx proxy:
$SERVER_IP - - [22/Feb/2024:14:37:20 +0000] "GET /keycloak/auth/realms/nomad/protocol/openid-connect/login-status-iframe.html/init?client_id=account-console&origin=https%3A%2F%2Fmy-oasis.org HTTP/1.1" 403 0 "-" "$browser" "$CLIENT_IP"
This means that unprivileged users currently have no access to their account data.
I only have a superficial understanding of how the authentication process to NOMAD Oasis works. The experiences so fare were not the most encouraging for the more sophisticated setup that we are aiming at for the production-grade setup.
I have no doubt that a working setup is possible for self-hosted keycloak instances. It’s just that the example setup given in the documentation is not working out of the box, and a first debugging round has not led me to any insightful progress on why.
All containers have been pull
ed today. I will provide detailed version information if necessary.