Skip to content

Commit

Permalink
Merge pull request elastic#8013 from thomasneirynck/enh/7196
Browse files Browse the repository at this point in the history
Bind Kibana server to localhost.

This is a breaking change. Now, Kibana will not be accessible to remote users by default. To enable this, the server.host parameter needs to be configured.
  • Loading branch information
thomasneirynck authored Aug 25, 2016
2 parents bfb81ef + e702c6d commit f49bf02
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions config/kibana.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Kibana is served by a back end server. This setting specifies the port to use.
# server.port: 5601

# This setting specifies the IP address of the back end server.
# server.host: "0.0.0.0"
# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
# The default is 'localhost', which usually means remote machines will not be able to connect.
# To allow connections from remote users, set this parameter to a non-loopback address.
# server.host: "localhost"

# Enables you to specify a path to mount Kibana at if you are running behind a proxy. This setting
# cannot end in a slash.
Expand Down
2 changes: 1 addition & 1 deletion docs/kibana-yml.asciidoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.Kibana Configuration Settings
[horizontal]
`server.port:`:: *Default: 5601* Kibana is served by a back end server. This setting specifies the port to use.
`server.host:`:: *Default: "0.0.0.0"* This setting specifies the IP address of the back end server.
`server.host:`:: *Default: "localhost"* This setting specifies the host of the back end server.
`server.basePath:`:: Enables you to specify a path to mount Kibana at if you are running behind a proxy. This setting
cannot end in a slash (`/`).
`server.maxPayloadBytes:`:: *Default: 1048576* The maximum payload size in bytes for incoming server requests.
Expand Down
2 changes: 1 addition & 1 deletion docs/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ deprecated[4.2, The names of several Kibana server properties changed in the 4.2
+
*alias*: `host` deprecated[4.2]
+
*default*: `"0.0.0.0"`
*default*: `"localhost"`
`elasticsearch.url` added[4.2]:: The Elasticsearch instance where the indices you want to query reside.
+
Expand Down
2 changes: 1 addition & 1 deletion src/server/config/__tests__/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('lib/config/config', function () {
it('should allow keys in the schema', function () {
let config = new Config(schema);
let run = function () {
config.set('test.client.host', 'http://0.0.0.0');
config.set('test.client.host', 'http://localhost');
};
expect(run).to.not.throwException();
});
Expand Down
2 changes: 1 addition & 1 deletion src/server/config/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = () => Joi.object({

server: Joi.object({
name: Joi.string().default(os.hostname()),
host: Joi.string().hostname().default('0.0.0.0'),
host: Joi.string().hostname().default('localhost'),
port: Joi.number().default(5601),
maxPayloadBytes: Joi.number().default(1048576),
autoListen: Joi.boolean().default(true),
Expand Down

0 comments on commit f49bf02

Please sign in to comment.