[RADIATOR] TraceId with AuthBy REST?

C R publist.cr at gmail.com
Wed Dec 14 19:26:31 UTC 2022


Thank you, Heikki.

Great explanation!

C.

Le mer. 14 déc. 2022 à 18:02, Heikki Vatiainen via radiator
<radiator at lists.open.com.au> a écrit :
>
> On 28.11.2022 18.43, C R via radiator wrote:
>
> > Another question about AuthBy REST. I wonder if the logged TraceId can
> > be sent to the remote REST service doing the actual authentication. I
> > am refactoring the service and I see I can easily retrieve a traceid
> > from the call if it's added to the request's header, eg:
> >
> > curl -H "X-Request-ID: 3" "http://localhost:1323/?my=param"
> >
> > It's not a must-have but maybe handy when debugging logs from Radiator
> > and the REST service. Before I jump in the source and find a
> > non-supported way to retrieve the logged TraceId (maybe), it may be a
> > good idea to ask first.
>
> It seems there's no clear way to do this currently. Something similar
> that's possible with URL formatting can be added. It could even be done
> by quite similar method too. At the moment request headers can be
> configured, but they are simply static with no run-time formatting.
>
> The unclear way would be to use HTTP_AuthenticationHook, get the handle
> to current request from somewhere, it's not passed to the hook, and then
> use HTTP::Request's header() method to add 'X-Request-ID' and the
> possible authentication headers.
>
> I'd say a better method is to add support for headers that can be
> optionally formatted, or possibly a hook for more flexible header handling.
>
> Thanks,
> Heikki
>
> --
> Heikki Vatiainen
> OSC, makers of Radiator
> Visit radiatorsoftware.com for Radiator AAA server software
> _______________________________________________
> radiator mailing list
> radiator at lists.open.com.au
> https://lists.open.com.au/mailman/listinfo/radiator


More information about the radiator mailing list