# Dynamic http headers upon user\_map\_cmd failure

**URL:** <https://discourse.openondemand.org/t/dynamic-http-headers-upon-user-map-cmd-failure/1458>\
**Category:** Feature Requests and Roadmap Discussion\
**Created:** [May 3, 2021, 5:13pm UTC](https://discourse.openondemand.org/t/dynamic-http-headers-upon-user-map-cmd-failure/1458 "2021-05-03T17:13:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjbludwig](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mjbludwig/32/684_2.png) [@mjbludwig](https://discourse.openondemand.org/u/mjbludwig)\
**Post date:** [May 3, 2021, 5:13pm UTC](https://discourse.openondemand.org/t/dynamic-http-headers-upon-user-map-cmd-failure/1458/1 "2021-05-03T17:13:44Z")

</div>

Hi All,

This is somewhat of an evolution from [Options for user registration](https://discourse.openondemand.org/t/options-for-user-registration/342)

What I have currently is a custom user\_map\_cmd script that shims inbetween OOD trying to map the presented user to a local one.

Keycloak presents its authenticated username to my user\_map\_cmd script. This script checks ldap to see if a local cluster user exists. If one does not, it kicks off an automated local user creation process and exits 1. I think this exit 1 then skips the ood\_auth\_map bits and then just does a simple redirect to my specified map\_fail\_uri register page which is plain html with a generic message saying “account has just been made, try logging in again.”

I would like to be able to make this /register uri more dynamic, probably in the form of a small webapp that can redirect and display dynamic text. My gut reaction is that it would be sweet if OOD could pass data in a post header or something when a map\_fail\_uri occurs which my small webapp could then generate a response for. Any thought on that feasibility or another way of approaching the problem?

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 4:11pm UTC](https://discourse.openondemand.org/t/dynamic-http-headers-upon-user-map-cmd-failure/1458/2 "2022-05-26T16:11:35Z")

</div>


