We are trying to deploy OpenOnDemand on our HPC at the University of Oregon (UO), but we are stuck on user authentication. We have a local LDAP server that handles all user accounts, but password authentication happens in one of two ways: 1) users with UO accounts which are authenticated to a central UO Active Directory server via Kerberos, and 2) external collaborators who do not have UO accounts are authenticated to our local LDAP server. This situation is properly handled by our PAM configuration. Is it possible to configure the OOD portal to hand off authentication to PAM? If so, how is this done? If not, are there any alternatives to handle this scenario?
We got this working on our cluster (CentOS 6 based) by installing the mod_authnz_external module for apache in combination with pwauth.
see here for more details: https://www.server-world.info/en/note?os=CentOS_7&p=httpd&f=10
We only found it to be relatively slow compared to the basic authentication.
Jacob Baggerman
Organic Chemistry
Wageningen University
There seems to also be an open source apache httpd module as well now. @ryelle where you able to solve youâre problem?
@Jacob-BM Auth seems to be a real pain point for us. Weâd love a small write up of how you folks where able to do it so we can add it to our documentation (or you can submit a PR to our docs directly too).
Looks like update_ood_portal may not be recognizing this config. At least on Centos 7. It is just building the ood-portal.conf with AuthUserFile "/opt/rh/httpd24/root/etc/httpd/.htpasswd".
@jms27000 Iâm pretty sure that entry needs to go within the auth bit like this below. I got an error when it was just hanging around in no specific area.
@jeff.ohrstrom Bad syntax in my ood-portal.yml is why the update script did not notice the change, which led to it not creating a new portal.conf.
Now the issue remains with where to put DefineExternalAuth pwauth pipe /usr/bin/pwauth
Apache does not like it in <location>:
Oct 24 12:41:20 ood httpd-scl-wrapper[44122]: AH00526: Syntax error on line 99 of /opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf:
Oct 24 12:41:20 ood httpd-scl-wrapper[44122]: DefineExternalAuth not allowed in <Location> context
but when I put it at the top of ood-portal.conf, it does not seem to see it:
DefineExternalAuth pwauth pipe /usr/bin/pwauth needs to go just above the first <Location> but after the virtual host and directory stuff. Here is where I have it:
Thanks for the detailed instructions how to setup OOD auth using PAM. I was able to follow the instructions.
A tip to others before I ask for help on my issue - When copy/pasting config lines from @Jacob-BM into ood_portal.yml pay attention to the characters. Quotes around âSSLRequireSSLâ can get you into trouble.
Now coming to my problem, I followed all the steps, made suggested changes to my ood_portal.yml, ood-portal.conf.erb, view.rb and was able to restart httpd24-httpd without errors but when I try to access the portal I get this message:
" Forbidden
You donât have permission to access /pun/sys/dashboard on this server."
When I remove the auth: section from odd_portal.yml, update_ood_portal, restart httpd24-httpd the portal goes back to old .htpasswd based authentication.
What did I miss ? I hope its still not some formatting issue! Any help or clues on how I can debug this ?
I still cannot figure out where to put the âDefineâŚâ line.
Any ideas?
Error message:
AH00526: Syntax error on line 110 of /opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf
line 110 of ood-portal.conf:
AuthUserFile â/opt/rh/httpd24/root/etc/httpd/.htpasswdâ
Yea things like OIDC configs generally go into a separate file but modules like LDAP generally donât. OIDC configs have some secrets so itâs a way to change the permissons on that file to be a little more restrictive. Where the ood-portal.conf is world readable a file like oidc.conf is 600.
Where could you add a Define? Yea we donât really allow for generic additions. You may be able to add it in the template as above (in /opt/ood/ood-portal-generator/templates/ood-portal.conf.erb). Be sure to back up the original and be sure to also save the modified version some where else. Youâll lose the modifications after an update and if you lose the backup you may corrupt your install.
Looks like in 1.7 youâll be able to specify a different template (meaning you can safely use /opt/myowndir/updated-ood-portal.conf.erb). But youâre likely on 1.6.
As to your syntax error, be careful with copying and pasting! As you can see here, the quotes are different. What you want is the first line.
I still cannot get PAM athentication working with Centos7.6
Is there any documentation that can help with this? I think I get lost between the threads above regarding Centos7 implementationâŚ
We use PAM winbind against Centralized DNS servers for user authentication.