{"id":91,"date":"2017-12-01T14:28:20","date_gmt":"2017-12-01T14:28:20","guid":{"rendered":"http:\/\/buki.io\/?p=91"},"modified":"2017-12-26T14:11:08","modified_gmt":"2017-12-26T14:11:08","slug":"secure-kibana-with-basic_auth-and-nginx","status":"publish","type":"post","link":"http:\/\/buki.io\/?p=91","title":{"rendered":"Secure Kibana with basic_auth and nginx"},"content":{"rendered":"<p>If you don\u2019t have the money to afford x-pack, but you want to secure your Kibana at least with basic authentication using nginx, the following entries in default.conf. The target is a kibana instance within the same Docker swarm network.<br \/>\n<code><br \/>\nlocation \/app\/kibana {<br \/>\nauth_basic \"Restricted Content\"; auth_basic_user_file \"\/etc\/nginx\/.htpasswd\"; proxy_pass <a href=\"http:\/\/kibana:5601\/app\/kibana\">kibana:5601\/app\/kibana<\/a>;<br \/>\n}<br \/>\nlocation \/app\/timelion {<br \/>\nauth_basic \"Restricted Content\"; auth_basic_user_file \"\/etc\/nginx\/.htpasswd\"; proxy_pass <a href=\"http:\/\/kibana:5601\/app\/timelion\">kibana:5601\/app\/timelion<\/a>;<br \/>\n}<br \/>\nlocation \/bundles {<br \/>\nauth_basic \"Restricted Content\"; auth_basic_user_file \"\/etc\/nginx\/.htpasswd\"; proxy_pass <a href=\"http:\/\/kibana:5601\/bundles\">kibana:5601\/bundles<\/a>;<br \/>\n}<br \/>\nlocation \/ui {<br \/>\nauth_basic \"Restricted Content\"; auth_basic_user_file \"\/etc\/nginx\/.htpasswd\"; proxy_pass <a href=\"http:\/\/kibana:5601\/ui\">kibana:5601\/ui<\/a>;<br \/>\n}<br \/>\nlocation \/plugins {<br \/>\nauth_basic \"Restricted Content\"; auth_basic_user_file \"\/etc\/nginx\/.htpasswd\"; proxy_pass <a href=\"http:\/\/kibana:5601\/plugins\">kibana:5601\/plugins<\/a>;<br \/>\n}<br \/>\nlocation \/api\/console {<br \/>\nauth_basic \"Restricted Content\"; auth_basic_user_file \"\/etc\/nginx\/.htpasswd\"; proxy_pass <a href=\"http:\/\/kibana:5601\/api\/console\">kibana:5601\/api\/console<\/a>;<br \/>\n}<br \/>\nlocation \/api\/status {<br \/>\nauth_basic \"Restricted Content\"; auth_basic_user_file \"\/etc\/nginx\/.htpasswd\"; proxy_pass <a href=\"http:\/\/kibana:5601\/api\/status\">kibana:5601\/api\/status<\/a>;<br \/>\n}<br \/>\nlocation \/status {<br \/>\nauth_basic \"Restricted Content\"; auth_basic_user_file \"\/etc\/nginx\/.htpasswd\"; proxy_pass <a href=\"http:\/\/kibana:5601\/status\">kibana:5601\/status<\/a>;<br \/>\n}<br \/>\nlocation ~* \/api\/(.*)$ {<br \/>\nauth_basic \"Restricted Content\"; auth_basic_user_file \"\/etc\/nginx\/.htpasswd\"; proxy_pass <a href=\"http:\/\/kibana:5601\/api\/$1$is_args$args\">kibana:5601\/api\/$1$is_args$args<\/a>;<br \/>\n}<br \/>\nlocation ~* \/elasticsearch\/(.*)$ {<br \/>\nauth_basic \"Restricted Content\"; auth_basic_user_file \"\/etc\/nginx\/.htpasswd\"; proxy_pass <a href=\"http:\/\/kibana:5601\/elasticsearch\/$1$is_args$args\">kibana:5601\/elasticsearch\/$1$is_args$args<\/a>;<br \/>\n}<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you don\u2019t have the money to afford x-pack, but you want to secure your Kibana at least with basic authentication using nginx, the following entries in default.conf. The target is a kibana instance within the same Docker swarm network. location \/app\/kibana { auth_basic &#8222;Restricted Content&#8220;; auth_basic_user_file &#8222;\/etc\/nginx\/.htpasswd&#8220;; proxy_pass kibana:5601\/app\/kibana; } location \/app\/timelion { auth_basic &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/buki.io\/?p=91\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8222;Secure Kibana with basic_auth and nginx&#8220;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[3],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7N2pi-1t","_links":{"self":[{"href":"http:\/\/buki.io\/index.php?rest_route=\/wp\/v2\/posts\/91"}],"collection":[{"href":"http:\/\/buki.io\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/buki.io\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/buki.io\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/buki.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=91"}],"version-history":[{"count":3,"href":"http:\/\/buki.io\/index.php?rest_route=\/wp\/v2\/posts\/91\/revisions"}],"predecessor-version":[{"id":99,"href":"http:\/\/buki.io\/index.php?rest_route=\/wp\/v2\/posts\/91\/revisions\/99"}],"wp:attachment":[{"href":"http:\/\/buki.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/buki.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/buki.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}