Rocky Linux 9 - not being prompted for authentication

Hello. I am new to ood and just got it installed on a Rocky Linux 9 machine. I get the “Welcome to Open OnDemand” page (http://hostname:80), but I am continually asked to “configure authentication” (http://wontforget/public/need_auth.html).
/etc/ood/config/ood_portal.yml

auth:
- “AuthType Basic”
- “AuthName \“private\””
- “AuthUserFile \”/etc/httpd/.htpasswd\“” # Adjust path as needed
- “RequestHeader unset Authorization”
- “Require valid-user”

I do have an ood user and their credentials are in: /etc/httpd/.htpasswd

I created a /var/www/html/.htaccess file also:

AuthType Basic
AuthName “Restricted Access”
AuthUserFile /etc/httpd/.htpasswd
Require valid-user

My httpd logs show no errors. I never enabled logging in ood_portal.yml.
Are there any obvious errors? Would more info be helpful to troubleshoot?
Thanks much.

Hi and welcome!

It could be as simple as the page being cached on your browser. I’d try in a private window or with dev-tools open to ‘disable the cache’.

Beyond that - you can check the resulting /etc/httpd/conf.d/ood-portal.conf to be sure that the auth section of the YAML file has produced the correct .conf file for apache to read.

Thanks Jeff. I am going to try now. Also, that file hasn’t been updated since 11:40am est. I just tried: /opt/ood/ood-portal-generator/sbin/update_ood_portal again.

Is something like this possible?:

/etc/ood/config/ood_portal.yml

http_username: your_username
http_password: your_password

No, but your basic auth scheme is possible, even if it’s discouraged (it’s very insecure).

Also you don’t really need to run update_ood_portal as bounding httpd runs the same command. Maybe that could be it - you ran the portal, but didn’t bounce httpd. In any case, running systemctl restart httpd will run update_ood_portal for you before bouncing apache.

Ok. Thanks. Trying again.

Same page. I am on my home network doing this. I need to get past this point to attempt to install an app. A glaring issue would be better than this. I appreciate your help thus far.
[root@wontforget conf.d]# more ood-portal.conf
<VirtualHost *:*>

RewriteEngine On
RewriteCond %{REQUEST_URI} !/public/need_auth.html
RewriteRule ^.*$ /public/need_auth.html [R=301,L]

Only public assets enabled in this mode.

If you’re reading this message you need to setup authentication: https://osc.github.io/ood-documentation/latest/authentica

tion.html
Alias “/public” “/var/www/ood/public”
<Directory “/var/www/ood/public”>
Options FollowSymLinks
AllowOverride None
Require all granted

OK it seems the configs from the YAML are not reaching the .conf file. If you have no errors in journalctl when bouncing httpd - then I’d say let’s spot check the YAML file for maybe YAML errors or similar. Can you share ood_portal.yml?

ood_portal.yml (14.5 KB)
Thanks so much Jeff!

You have YAML errors. I just spot checked it with the yamllint program.

Thats just lovely. Formatting (spacing). I am going to install yamlint and try to fix this. Thanks again for all of your help Jeff!

It seems I have an error on pretty much every line lol.

1 Like