Greetings, We are running a VM with FR3 in Azure which authenticates users with their O365 credentials against Azure ADDS. The problem is a legacy 20 characters limitation of SamAccountName attribute. I strip "@domain.com" part off O365 username before passing it to ntlm_auth but some users have very long names so "sampleverylongusername" is truncated to "sampleverylonguserna" in DC. How do I right a simple check to truncate it in FR? I'm not skilled in regular expressions. So I've tried if (Stripped-User-Name =~ /(.{0,19})$/) { update request { Stripped-User-Name := "%{1}" } } but that cuts off first 20 characters and leaves the rest.
* Mikhail Sutormin <msutormin@gmail.com> [2016-09-22 01:47]:
if (Stripped-User-Name =~ /(.{0,19})$/) {
You're anchoring it to the end of the line with $. Try ^(.{0,19}) instead and it should work (hopefully - didn't test). -- Vegard Svanberg <vegard@svanberg.no> [*Takapa@IRC (EFnet)]
participants (2)
-
Mikhail Sutormin -
Vegard Svanberg