ELK Post request failing, require kbn-xsrf:true header

Hello,

I am working on ELK, I am sending post request to Kibana which require kbn-xsrf: true header.

I am setting this up but still elk is asking for this header.

Do we have any workaround for this ?

Hi @Aqeel ,

It looks like you miss spelled “true”

not working,
FYI the cred i am using are of predefined type, elastic security.

If i set custom auth like:
{
”headers”: "{

“Authorization”:”Apikey slirnvlernv”,
”kbn-xsrf”:”kibana”

}

}

it works, but the api key is exposed in credentialed, so looking for a way to make it work with predefined credentials

Have a look at the Custom auth option and see if this works if you set both headers in there. If the auth requires both headers to be present, then this could resolve your issue


{
	"headers": {
		"Authorization": "Apikey slirnvlernv",
		"kbn-xsrf": true
	}
}

However, using header auth and a custom header should also have worked

custom auth is working but credentials are exposed, looking for a way in which credentials are not exposed.
Head auth is not working it only get 1 name and value, i have two value is headers

Who all has access to your n8n instance? Custom auth seems to be your answer at the moment.