searchguard http basic authentication is not working

#1
  • Search Guard and Elasticsearch version

–> 6.5.4

  • Installed and used enterprise modules, if any

–> Using community edition searchguard

  • JVM version and operating system version

JVM - Java 1.8.0

OS - Windows 7

  • Search Guard configuration files

  • Elasticsearch log messages on debug level

  • Other installed Elasticsearch or Kibana plugins, if any

– No other plugins

Hello all,

I have installed elasticsearch, kibana and searchguard. All version 6.5.4

And all are working fine (when I am logging through kibana host)

But I want to loggin kibana using url (http basic auth). I am using postman to try this.

It is returning status as 200 ok , But stucked on kibanawelcomelogo page.

Not showing kibana dashboard.

Kindly help.

Urgent.

kibana.yml (6.9 KB)

elasticsearch.yml (3.84 KB)

sg_config.yml (9.4 KB)

0 Likes

#2

When you write:

"But I want to loggin kibana using url (http basic auth). "

What is the actual HTTP call incl. HTTP headers you are issuing?

···

On Friday, March 29, 2019 at 8:27:01 AM UTC+1, nehajain0031@gmail.com wrote:

  • Search Guard and Elasticsearch version

–> 6.5.4

  • Installed and used enterprise modules, if any

–> Using community edition searchguard

  • JVM version and operating system version

JVM - Java 1.8.0

OS - Windows 7

  • Search Guard configuration files
  • Elasticsearch log messages on debug level
  • Other installed Elasticsearch or Kibana plugins, if any

– No other plugins

Hello all,

I have installed elasticsearch, kibana and searchguard. All version 6.5.4

And all are working fine (when I am logging through kibana host)

But I want to loggin kibana using url (http basic auth). I am using postman to try this.

It is returning status as 200 ok , But stucked on kibanawelcomelogo page.

Not showing kibana dashboard.

Kindly help.

Urgent.

0 Likes

#3

http://localhost:5601/app/kibana

Headers–>

Content-Type: application/json
kbn-xsrf: true

Basic Auth–>
admin/admin

These are the entries I made in Postman.

It is returning 200 ok response also.

But stucked on kibana loading page

Kindly help… Its need on urgent basis

···

On Friday, March 29, 2019 at 1:50:03 PM UTC+5:30, Jochen Kressin wrote:

When you write:

"But I want to loggin kibana using url (http basic auth). "

What is the actual HTTP call incl. HTTP headers you are issuing?

On Friday, March 29, 2019 at 8:27:01 AM UTC+1, nehaja...@gmail.com wrote:

  • Search Guard and Elasticsearch version

–> 6.5.4

  • Installed and used enterprise modules, if any

–> Using community edition searchguard

  • JVM version and operating system version

JVM - Java 1.8.0

OS - Windows 7

  • Search Guard configuration files
  • Elasticsearch log messages on debug level
  • Other installed Elasticsearch or Kibana plugins, if any

– No other plugins

Hello all,

I have installed elasticsearch, kibana and searchguard. All version 6.5.4

And all are working fine (when I am logging through kibana host)

But I want to loggin kibana using url (http basic auth). I am using postman to try this.

It is returning status as 200 ok , But stucked on kibanawelcomelogo page.

Not showing kibana dashboard.

Kindly help.

Urgent.

0 Likes

assigned jkressin #4
0 Likes

#5

This seems to be a Postman issue then. I just tried to add Basic Authentication headers by using mod_headers in Chrome. Everything works as expected, I can skip the login dialogue and getting redirected to Kibana. Be aware that Kibana is JavaScript heavy, so maybe Postman cannot handle.

1 Like

#6

Its working with mod_headers.
But when we are calling it from java portal and passing headers… It is not working.
It stucked at kibana loading page and return 200 ok response

I also tried to open the kibana page from android app through webview. It worked fine after adding below lines
WebSettings settings = wvReport.getSettings();
settings.setDomStorageEnabled(true);

The kibana dashboard is opening fine from android app.

But still not working from java

0 Likes

#7

But then it does not really look like a Search Guard issue. If you see the Kibana loading page, it means that all Search Guard authentication checks have already passed and we’re back to the regular Kibana loading behaviour so to speak. Also, since you write it is working with mod_headers it means that everything works as expected when using a traditional browser.

So the first thing you should probably do is to use a plain Kibana / Elasticsearch installation without Search Guard, and see if this loads correctly.

0 Likes

#8

Ok Thanks for the help.
I’ll try and let you know

0 Likes