Hello,
I am trying to set up Open OnDemand to redirect to a waiting page when users do not yet exist. Users are created in Keycloak and then synced to our LDAP servers, which means there may be a delay of a few minutes between a user existing in Keycloak and being able to access Open OnDemand, and actually existing on the OnDemand system (e.g. id user0001
will return id: user0001: no such user
for a few mins)
I have configured my ood_portal.yml
as follows for this:
map_fail_uri: '/nouseryet'
register_uri: '/nouseryet'
register_root: '/var/www/ood/register'
but I’m still getting the following error message come up - when I was expecting to be redirected:
This is what I see in the httpd logs - first the 404 and then the successful access after the user appears in LDAP/SSSD:
(130.246.X.X is where I’m browsing from)
[Tue Mar 07 15:23:12.081154 2023] [lua:info] [pid 222645] [client 130.246.X.X:19012] req_protocol="HTTP/1.1" req_handler="" req_method="GET" req_accept="text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8" req_user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0" res_content_length="117" req_content_type="" res_content_encoding="" req_status="404" req_origin="" time_user_map="0.002" local_user="iris0012" req_referer="" res_content_language="" req_port="443" log_time="2023-03-07T15:23:12.81028Z" req_server_name="portal.scarf.rl.ac.uk" log_hook="ood" req_accept_charset="" req_hostname="portal.scarf.rl.ac.uk" res_content_location="" res_content_disp="" req_is_websocket="false" remote_user="iris0012" res_location="" req_user_ip="130.246.X.X" req_is_https="true" req_filename="/opt/rh/httpd24/root/var/www/html/pun" req_uri="/pun/sys/dashboard" time_proxy="0" res_content_type="" req_accept_language="en-us,en;q=0.5" req_cache_control="" req_accept_encoding="gzip, deflate, br"
[Tue Mar 07 15:24:08.024096 2023] [lua:info] [pid 222651] [client 130.246.X.X:1852] req_protocol="HTTP/1.1" req_handler="proxy-server" req_method="GET" req_accept="text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8" req_user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0" res_content_length="904" req_content_type="" res_content_encoding="" req_status="200" req_origin="" time_user_map="0.002" local_user="iris0012" req_referer="" res_content_language="" req_port="443" log_time="2023-03-07T15:24:08.23919Z" req_server_name="portal.scarf.rl.ac.uk" log_hook="ood" req_accept_charset="" req_hostname="portal.scarf.rl.ac.uk" res_content_location="" res_content_disp="" req_is_websocket="false" remote_user="iris0012" res_location="" req_user_ip="130.246.X.X" req_is_https="true" req_filename="proxy:http://localhost/pun/sys/dashboard" req_uri="/pun/sys/dashboard" time_proxy="1.301" res_content_type="text/html; charset=utf-8" req_accept_language="en-us,en;q=0.5" req_cache_control="" req_accept_encoding="gzip, deflate, br"
The generated /opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf
looks OK to me?
SetEnv OOD_USER_MAP_MATCH ".*"
SetEnv OOD_MAP_FAIL_URI "/nouseryet"
Alias "/nouseryet" "/var/www/ood/register"
<Directory "/var/www/ood/register">
Options FollowSymLinks
AllowOverride None
AuthType openid-connect
Require claim realm_access.roles:scarf-trial
</Directory>
</VirtualHost>
The actual page does look OK to me - this is what I was expecting to see (ignore the ugly HTML - that’ll be neatened up when I get it working!)
I’m not quite sure what I’m doing wrong here! Does anyone have any advice please? Thanks!