Pun_custom_env undefined under certain build scenarios?

This is likely pretty specific to my build process but I am running into the following after a successful authentication:

Error -- undefined method `map' for nil:NilClass

      Hash[@pun_custom_env.map {|key, value| [key.to_s, value.to_s]}]
                          ^^^^
Run 'nginx_stage --help' to see a full list of available command line options.

I am running into this with 3.1.9 and 3.1.10 in a Rocky 8 container. I do not have the issue in a 3.1.9 Rocky 9 container that I have in prod though. I am using mod_auth_opendic directly configured in ood_portal.yml.

I can see in my logs that the user_map_cmd script is successfully mapping to the existing user and it is echoing out properly to Apache so as far as I can tell, the OIDC bits are all working fine and this is all post-auth.

Interestingly enough, my boss was standing up a test baremetal instance but following my Dockerfile build recipe and ran into the same issue. However after playing with the ood config, regenerating and restarting ood a few times it seemed to resolve itself. At this point I don’t think the tweaks to the config actually made a difference as we are back to the way the config was when it first happened but I am wondering if during those restarts, something initialized that wasn’t before. Of course, in the containers this has not happened but I start them from scratch based on the image each time so that is not surprising.

Digging around the nginx_stage code a bit, I am potentially wondering if the user is not being set for some reason which is causing pun_custom_env to not be populated properly and resulting in the later code calling it not being able to make a map out of it?

I am kind of just thought dumping here though. Is there a way to run the nginx_stage with more debugging potentially?

Thanks,
Morgan

sigh…

Right, nginx_stage.yml cant have a variable defined with nothing in it…:

---
pun_custom_env:

was the issue…