Re: Copying User-Name from inner tunnel to outer for accounting

Alan DeKok via Freeradius-Users <[email protected]> Mon, 20 Jul 2026 20:28:36 +0200
Newsgroups gmane.comp.freeradius.user
Message-ID <[email protected]>
--===============3018544673020353730==
Content-Type: multipart/signed;
	boundary="Apple-Mail=_456C556B-3D59-4F6E-B7D6-993634CADC2D";
	protocol="application/pgp-signature";
	micalg=pgp-sha256


--Apple-Mail=_456C556B-3D59-4F6E-B7D6-993634CADC2D
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

On Jul 20, 2026, at 6:17=E2=80=AFPM, Dominik George <[email protected]> =
wrote:
>>   In post-auth, save the User-Name information in a database, keyed =
by Acct-Session-Id.  Then, update the "accounting" section to retrieve =
the User-Name from a database, keyed by Acct-Session-ID.
> I tried to do that using the cache module. I set
>=20
>  key =3D "%{Acct-Session-Id}"
>=20
> in the module config and then called
>=20
>  post-auth {
>    cache
>  }
>=20
> in inner-tunnel, but that way, Acct-Session-Id expands to an empty =
string.

  If only there was some kind of debugging output which would show you =
what the server is doing.

> Do you happen to have an example somewhere of how to use the cache =
module for such a short-term storage?

  Read the debug output.  It will tell you what's going on.

  Alan DeKok.


--Apple-Mail=_456C556B-3D59-4F6E-B7D6-993634CADC2D
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEIUl02elqcIsf1zM0v3SJ0h7dTTMFAmpeaNQACgkQv3SJ0h7d
TTP/3g/+NUgImXfp3R7mSmPxXmOLqde/F2OUJ/5N9CoPY/WU70xRDYIJBIem0xOp
7xJ7hbPubovXa7JiWK3fFPCiyrWHs+24/9SAQ8CFuFz5wxKhYwyYT9OkXDbEZgj2
iYj9Ma6eZcYGrC0Y5E1+0is8YWWb9ccrDyfbQoXV+NlmrpjPnWymw3RoF0AUSKhP
V2h1rAiQgqf3XGX5yrdWn1DzQysoWxGv4rzJoAb+97UnYIV/qjbG4NYIdNCDExtX
wDLMPDEK5GZgiNa1hvSTxBXUvWL4TDSfmgNaKyq4Vod4OSexzAwCWWsHyJ+fRaP0
DutAzEqBij53Dyz5t9YA6lsFHpf4ihud99kTH+7WPjbwnYdlmVj70Hp3Wo+KSW7a
j8T8QYXoPqOgfJUaPEhC88dD07zSrZtgn5VAu5g+szqd2v9OZ9PE4FZUC9ly/fQi
1hRUbhRQ9OYcDD1MJh+2EnPSDU4N4iPgxSzpsEcdezyczDETLteagJluHtBa9zBm
XE2rpdauinDuimAZyj57sXHsc4VjsdeWg/W2eqMxhGHmXEVxBOgcp4Iw2sq6A8ty
E+Ruf5heMiUVxn2UioM+Hp15ynDDV0S32ogFnsYnh1Moiv5uHorYnBH5sPHc/VGA
N+QJlZQRNaTHqdQwxUIL1iRjWI5lGilRIrtTLHXgybMpwNomRmM=
=gn+P
-----END PGP SIGNATURE-----

--Apple-Mail=_456C556B-3D59-4F6E-B7D6-993634CADC2D--

--===============3018544673020353730==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
--===============3018544673020353730==--