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

Alan DeKok aland at deployingradius.com
Tue Feb 12 15:34:26 CET 2019


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? :-)

  Yes.

> 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.




More information about the Freeradius-Users mailing list