-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP auth proxy (nginx) not working #189
Comments
Interesting. Which browser is this? |
I've tried in the latest versions of Chrome and Safari. |
Not sure why this is happening, Kibana isn't responsible for sending the username/password. The browser should prompt for it. I'm using the same setup on demo.kibana.org. |
I don't get a username/password prompt on demo.kibana.org. Is it just using a proxy without http auth? That seems to work fine. It's when I require HTTP auth to get to the ES server that Kibana stops working because it is not authenticating (401 error). However, when I hit the urls for the ES server directly in the browser, it does prompt for the username/password and works when I provide the credentials. |
Try saving a dashboard, you should get a l/p prompt |
No luck. It doesn't prompt for credentials. It flashes the green dialog saying it saved but doesn't actually save it. The list of dashboards remains empty. When I point directly to the ES server (no http auth) and do the same thing, it saves successfully and shows in the list. I did also notice this in the console for Chrome:
I wonder if that could be affecting the browser prompting for the credentials? I'm running it locally for testing using pow.cx (that's where the .dev hostname comes from). The request is still making it the server as shown in the logs:
Does kibana have to run on the same hostname that it will be connecting to for ES? |
Sorry, I meant try saving a dashboard on demo.kibana.org And no, unless you've turned off the cors settings of elasticsearch, it does not need to run on the same host. |
Ah, I see the prompt when saving a dashboard on the demo site. Should the same thing be happening when kibana initially loads and tries to pull data from ES via the http auth proxy? |
I've just tested it with auth on both the static assets (kibana's files) and the proxy, and it works, correctly prompting me for a username and password before displaying anything |
I must be doing something different. Here is the nginx configuration I'm using. It is being installed by the elasticsearch::proxy recipe in the ES cookbook. This is setup on a server at fqdn. Then I'm pointing the config.js.file to that proxy like this: var config = new Settings(
{
// By default this will attempt to reach ES at the same host you have
// elasticsearch installed on. You probably want to set it to the FQDN of your
// elasticsearch host
//elasticsearch: "http://"+window.location.hostname+":9200",
elasticsearch: 'http://fqdn:8080',
kibana_index: "kibana-int",
modules: ['histogram','map','pie','table','stringquery','sort',
'timepicker','text','fields','hits','dashcontrol',
'column','derivequeries','trends','bettermap'],
}
); Any idea why this never prompts for the username/password in kibana? |
Closing this as inactive. |
2.4.1 add es data files
## Overview This update adds details to the Data Visualizer documentation, specifying supported file formats and their size limits. **Related issue:** [#189](elastic/search-docs-team#189) ### Preview [Machine Learning]() --------- Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
…c#193819) ## Overview This update adds details to the Data Visualizer documentation, specifying supported file formats and their size limits. **Related issue:** [elastic#189](elastic/search-docs-team#189) ### Preview [Machine Learning]() --------- Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com> (cherry picked from commit 37af730)
…193819) (#193883) # Backport This will backport the following commits from `main` to `8.x`: - [Updates file format details for Data Visualizer documentation (#193819)](#193819) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"kosabogi","email":"105062005+kosabogi@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-24T14:37:43Z","message":"Updates file format details for Data Visualizer documentation (#193819)\n\n## Overview\r\n\r\nThis update adds details to the Data Visualizer documentation,\r\nspecifying supported file formats and their size limits.\r\n**Related issue:**\r\n[#189](https://github.com/elastic/search-docs-team/issues/189)\r\n\r\n### Preview\r\n\r\n[Machine Learning]()\r\n\r\n---------\r\n\r\nCo-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>","sha":"37af7304f01776e3d89afcbe596a76048371cff8","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v9.0.0","v8.16.0","backport:version"],"title":"Updates file format details for Data Visualizer documentation","number":193819,"url":"https://github.com/elastic/kibana/pull/193819","mergeCommit":{"message":"Updates file format details for Data Visualizer documentation (#193819)\n\n## Overview\r\n\r\nThis update adds details to the Data Visualizer documentation,\r\nspecifying supported file formats and their size limits.\r\n**Related issue:**\r\n[#189](https://github.com/elastic/search-docs-team/issues/189)\r\n\r\n### Preview\r\n\r\n[Machine Learning]()\r\n\r\n---------\r\n\r\nCo-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>","sha":"37af7304f01776e3d89afcbe596a76048371cff8"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193819","number":193819,"mergeCommit":{"message":"Updates file format details for Data Visualizer documentation (#193819)\n\n## Overview\r\n\r\nThis update adds details to the Data Visualizer documentation,\r\nspecifying supported file formats and their size limits.\r\n**Related issue:**\r\n[#189](https://github.com/elastic/search-docs-team/issues/189)\r\n\r\n### Preview\r\n\r\n[Machine Learning]()\r\n\r\n---------\r\n\r\nCo-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>","sha":"37af7304f01776e3d89afcbe596a76048371cff8"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: kosabogi <105062005+kosabogi@users.noreply.github.com>
…lastic#193819) (elastic#193883) # Backport This will backport the following commits from `main` to `8.x`: - [Updates file format details for Data Visualizer documentation (elastic#193819)](elastic#193819) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"kosabogi","email":"105062005+kosabogi@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-24T14:37:43Z","message":"Updates file format details for Data Visualizer documentation (elastic#193819)\n\n## Overview\r\n\r\nThis update adds details to the Data Visualizer documentation,\r\nspecifying supported file formats and their size limits.\r\n**Related issue:**\r\n[elastic#189](https://github.com/elastic/search-docs-team/issues/189)\r\n\r\n### Preview\r\n\r\n[Machine Learning]()\r\n\r\n---------\r\n\r\nCo-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>","sha":"37af7304f01776e3d89afcbe596a76048371cff8","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v9.0.0","v8.16.0","backport:version"],"title":"Updates file format details for Data Visualizer documentation","number":193819,"url":"https://github.com/elastic/kibana/pull/193819","mergeCommit":{"message":"Updates file format details for Data Visualizer documentation (elastic#193819)\n\n## Overview\r\n\r\nThis update adds details to the Data Visualizer documentation,\r\nspecifying supported file formats and their size limits.\r\n**Related issue:**\r\n[elastic#189](https://github.com/elastic/search-docs-team/issues/189)\r\n\r\n### Preview\r\n\r\n[Machine Learning]()\r\n\r\n---------\r\n\r\nCo-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>","sha":"37af7304f01776e3d89afcbe596a76048371cff8"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193819","number":193819,"mergeCommit":{"message":"Updates file format details for Data Visualizer documentation (elastic#193819)\n\n## Overview\r\n\r\nThis update adds details to the Data Visualizer documentation,\r\nspecifying supported file formats and their size limits.\r\n**Related issue:**\r\n[elastic#189](https://github.com/elastic/search-docs-team/issues/189)\r\n\r\n### Preview\r\n\r\n[Machine Learning]()\r\n\r\n---------\r\n\r\nCo-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>","sha":"37af7304f01776e3d89afcbe596a76048371cff8"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: kosabogi <105062005+kosabogi@users.noreply.github.com>
Based on the sample/nginx.conf example and comments, I have an nginx proxy setup with http auth. The only difference being that I have http auth required on the entire proxy but the comments indicate this is fine. I can go directly to the proxy at http://fqdn:8080 which prompts or the username/password and after authenticating I can receive responses in json from the elasticsearch server. But when I use this in the config.js nothing loads and the requests fail with a 401 error.
If I use the http://fqdn:9200 directly in config.js everything works fine but I'd like to put elasticsearch behind a proxy with http auth.
One the server nginx is logging the following error:
It appears since kibana isn't sending a username/password the request for /_aliases is just failing instead of the browser prompting for authentication.
This seems like a bug but I may be missing something. Has anyone been able to get a similar setup working?
The text was updated successfully, but these errors were encountered: