Applying the same rule to multiple values in an attribute/config value

Stefan Paetow Stefan.Paetow at
Tue Feb 12 16:54:39 CET 2019

So, Alan, 

What would you like me to call that new realm configuration (if I were to want to submit this upstream)?

bangrealm? bang_realm? 

Gimme a name and I'll submit an upstream PR for the new realm entry :-)

With Regards

Stefan Paetow
Consultant, Trust and Identity

t: +44 (0)1235 822 125
gpg: 0x3FCE5142
xmpp: stefanp at
skype: stefan.paetow.janet

Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800.

On 12/02/2019, 15:34, "Freeradius-Users on behalf of Alan DeKok" < at on behalf of aland at> wrote:

    On Feb 11, 2019, at 6:27 PM, Stefan Paetow <Stefan.Paetow at JISC.AC.UK> wrote:
    > If I could construct a loop that iterates over my realms, then I could simply do the comparison, but you've given me an idea (i.e. defining a new 'realm' instance that uses the bang to route):
    > realm bang_realm {
    > 	format = prefix
    > 	delimiter = "!"
    > }
      Yes, that's better.
    > if (&request:User-Name =~ /([a-zA-Z0-9\.-]+)!([a-zA-Z0-9\.-]*)\@(.+)/) {
    >  #  Format: not_local_realm!... at local_realm: Rewrite User-Name for suffix
    >  bang_realm
    > } else {
    >  suffix
    > }
    > Does that (or something similar) make more sense? :-)
    > If so, I'll test this and see what we get. It still leaves the EAP identity and the outer User-Name decorated though. :-/
      Well, there isn't much choice there.
      Alan DeKok.
    List info/subscribe/unsubscribe? See

More information about the Freeradius-Users mailing list