Layer7 API Management

 View Only

 How to use Audit Sinc Context Variables

Bruno Ogasawara's profile image
Bruno Ogasawara posted Mar 03, 2021 07:38 AM
Hello team,

I'm trying to configure the "Customize Error Response" with some outputs from "audit context variables" and "audit sinc context variable".

I was looking into Audit Sink Context Variables in the manual, and there it says:

"The following context variables are relevant only when used in an audit sink policy, or within a policy fragment that is included in an audit sink policy. If called from any other policy, these variables do not exist and are interpolated as blank. If the
template.strictMode
cluster property is enforced, the calling assertion fails."

Indeed, when I use the variables that belongs to Audit Sinc, they are all blank.
I don't understand very well what I have to do in order to use the variables in my "Customize Error Response" assertion.

Can someone give me a hand ?

Thanks !
MarkHolster's profile image
MarkHolster
Hi Bruno,

The audit sink policy is a special policy that allows you to handle the audit events that are emitted during execution of all regular policies. To give some context to those events you can use the Audit Sink Context Variables. So using those variables in the context of a regular policy is impossible, hence the values are blank. Nevertheless some variables that are available in the audit sink have a 'non audit sink counterpart'. Which ones are you trying to use?

Kind regards,
Mark