What version of OnDemand are you using?
First, I’d get rid of
user_env: null. If you’re using the default then just comment that out or don’t use it. Actually forcing it to
null could be the issue.
If that’s not the issue, I’d still just get rid of it because it may lead to further confusion later on down the road.
The next thing I’d look at is the regular expression
"^([^@]+)@tld.ac.ug$" and how it’s being formatted from yaml → the apache config. You’ve listed here the
ood_portal.yml, what does it show up as in the
ood-portal.conf? You may need to use single quotes here for safety - there’s a similar issue on this discourse about single and double quotes and how it affects yaml.
I quickly tested that regex using
ood_auth_map.regex in 1.8 and in lua for 2.0 and they both work out OK. So it’s not the regex directly but maybe some formatting issue interpolating it from YAML into the commands.
Lastly you could set
lua_log_level: 'debug' and you’ll start to see log messages like this in your apache logs (though they’ll likely indicate what we already know - you’re mapping user@email => user@email).
[Fri Jul 16 15:17:25.331560 2021] [lua:debug] [pid 54:tid 140649550563072] @/opt/ood/mod_ood_proxy/lib/ood/user_map.lua(21): [client 127.0.0.1:46224] Mapped 'jeff@localhost' => 'jeff'