如何设置Kibana SSO(通过OAuth)?
我的公司非常努力地为所有第三方服务保留SSO。我想让Kibana与我们的谷歌应用程序帐户一起工作。可能吗?如何实现?Kibana让您自行实现安全性。我相信Elastic的产品支持安全即插即用(security-as-a-plugin),但我还没有浏览订阅模式,也没有深入研究过它 我处理这个问题的方法是使用一个和使用nginx将代理反向到Kibana如何设置Kibana SSO(通过OAuth)?,oauth,single-sign-on,kibana,Oauth,Single Sign On,Kibana,我的公司非常努力地为所有第三方服务保留SSO。我想让Kibana与我们的谷歌应用程序帐户一起工作。可能吗?如何实现?Kibana让您自行实现安全性。我相信Elastic的产品支持安全即插即用(security-as-a-plugin),但我还没有浏览订阅模式,也没有深入研究过它 我处理这个问题的方法是使用一个和使用nginx将代理反向到Kibana server { listen 80; server_name kibana.example.org; # redirec
server {
listen 80;
server_name kibana.example.org;
# redirect http->https while we're at it
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
# listen for traffic destined for kibana.example.org:443
listen 443 default ssl;
server_name kibana.example.org;
ssl_certificate /etc/nginx/ssl/cert.crt;
ssl_certificate_key /etc/nginx/ssl/cert.key.pem;
add_header Strict-Transport-Security max-age=1209600;
# for https://kibana.example.org/, send to our oauth2 proxy app
location / {
# the oauth2 proxy application i use listens on port :4180
proxy_pass http://127.0.0.1:4180;
# preserve our host and ip from the request in case we want to
# dispatch the request to a named nginx directive
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_connect_timeout 15;
proxy_send_timeout 30;
proxy_read_timeout 30;
}
}
请求进入后,触发一个nginx指令,该指令将请求发送到ouath应用程序,后者依次处理SSO资源并重定向到服务器本地主机上的侦听Kibana实例。它是安全的,因为无法直接连接到Kibana。从Elasticsearch,Kibana 5.0,shield插件(安全插件)嵌入在(付费服务)中。因此,通过Kibana 5.0,您可以:
server {
listen 80;
server_name kibana.example.org;
# redirect http->https while we're at it
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
# listen for traffic destined for kibana.example.org:443
listen 443 default ssl;
server_name kibana.example.org;
ssl_certificate /etc/nginx/ssl/cert.crt;
ssl_certificate_key /etc/nginx/ssl/cert.key.pem;
add_header Strict-Transport-Security max-age=1209600;
# for https://kibana.example.org/, send to our oauth2 proxy app
location / {
# the oauth2 proxy application i use listens on port :4180
proxy_pass http://127.0.0.1:4180;
# preserve our host and ip from the request in case we want to
# dispatch the request to a named nginx directive
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_connect_timeout 15;
proxy_send_timeout 30;
proxy_read_timeout 30;
}
}
- 使用
- 使用
Authorization
标题和摘要base64(用户名:密码)
有关该步骤的说明,请参见适用于x-pack的。因此,您将有:
我已经在中设置了docker compose配置,以便在Kibana/Elasticsearch 6.1.1中使用searchguard或x-pack: