rlm_rest: Authentication by token?

Alan DeKok aland at deployingradius.com
Mon Dec 20 16:44:16 CET 2021


On Dec 18, 2021, at 9:35 AM, Michael Schwartzkopff <ms at sys4.de> wrote:
> Is there a simple way to configure the rest module to generate this
> header or do I have to do something like:
> 
> update control {
> 
>     REST-HTTP-Header := "Authorization: Token 0x123245678"
> 
> }

  Just put that before every use of the "rest" module.

  Or, you can use policies and over-ride the rest module!  Add a file raddb/policy.d/rest, with contents:

rest.authorize {
	update control {
	   REST-HTTP-Header := "Authorization: Token 0x123245678"
	}

	rest
}

  Then every time you use just "rest" in the "authorize" section, the server will magically run that policy.

  It's very handy for this kind of situation.

  Alan DeKok.




More information about the Freeradius-Users mailing list