v4 how to insert reply attributes in the radpostauth sql query?
Alan DeKok
alan.dekok at inkbridge.io
Wed Mar 25 17:54:38 UTC 2026
On Mar 25, 2026, at 11:44 PM, James Wood via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
> Just before we perform the insert, I am trying to get all of the reply
> attributes we're sending as described here:
>
> https://www.freeradius.org/documentation/freeradius-server/4.0.0/reference/xlat/pairs/print.html
>
> &control.Tmp-String-9 := "%pairs.print(reply.[*])"
You don't need quotes around the %pairs.print() call. But you likely need to quote the reply.[*] argument.
> and then referencing the tmp string on the query.
Or, just use %pairs.print() directly.
> I get:
>
> %pairs.print(reply.[*])
> ^: Unresolved expansion functions are not allowed here
>
> Any thoughts? If this isn't the right way, please advise how I can get
> these reply attributes into a string ready for the sql insert.
The %pairs.print() function is in the current git "master" branch. It's tested in CI on every commit.
$ git grep 'pairs.print' src/tests/keywords
src/tests/keywords/pairs:result_string := "%str.concat(%pairs.print('Tmp-Group-0.[*]'), ', ')"
src/tests/keywords/pairs:result_string := "%pairs.print('Tmp-Group-0.Filter-Id')"
...
Make sure you're using a recent version of v4. If you're running something from many months ago, it will out of date.
Alan DeKok.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20260326/67c4e137/attachment.sig>
More information about the Freeradius-Users
mailing list