I am trying to make a CURL call from PHP to Kibana. The call is simple
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $URL);
curl_setopt($ch, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_USERPWD, “$user:$pass”);
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); //get status code
However searchguard wants to redirect the page and thats not handled well in the call. Any ideas how I can pass the credentials in the request?