Changing case with "User_map_match"

Hi All,

I am using dex to authenticate to Active Directory(AD). The AD user objects are all upper-case and the Linux system users are created in lower-case and therefore introduces a mapping error between AD and the system users. Therefore, I would like to use the “user_map_match” option in ood_portal to ensure that the correct case is provided when authenticating. We also have alternate AD user objects that are based on numbers only that require authentication. These work fine because they do not require any case changes.

I am not proficient in Lua patterns and the options I’ve tried do not work. Any suggestions how I could get this working?

Cheers

I’ve noted that there was a move away from the cmd version. I’ve written a script which converts the case but thought it might be beneficial to understand how user_map_match would work for this as it’s being promoted versus the cmd version.

Cheers

The cmd version issues a command which has much more overhead than simply calling a function in a programming language. Issuing a command (in this context) requires starting a whole new process which have to make all sorts of system calls.

So in sum, there’s just more overhead with the cmd which can cause latencies.

That said - I’m pretty sure user_map_match can only extract a string from another string. I don’t believe it can do transformations like that.

Thank you, Jeff. This works for me and allows for much more granular adjustments in future. I have noted your comment on latencies.

1 Like