An open API service indexing awesome lists of open source software.

https://github.com/bertrandmartel/kibana-oauth2-proxy

oauth2 proxy docker config for Kibana 6.1.1 with searchguard or xpack
https://github.com/bertrandmartel/kibana-oauth2-proxy

docker kibana oauth2 searchguard x-pack

Last synced: about 1 year ago
JSON representation

oauth2 proxy docker config for Kibana 6.1.1 with searchguard or xpack

Awesome Lists containing this project

README

          

# Kibana Oauth2.0 proxy config

Docker configuration for using [oauth2_proxy](https://github.com/bitly/oauth2_proxy) as Oauth2.0 proxy for Kibana 6.1.1 using either :

* [Search Guard](http://docs.search-guard.com/latest/main-concepts)
* [X-Pack](https://www.elastic.co/products/x-pack)

![oauth2](https://user-images.githubusercontent.com/5183022/34469919-b20b629e-ef27-11e7-84a7-3ec9ea5e765e.png)

Edit `searchguard/docker-compose.yml` or `xpack/docker-compose.yml` with correct oauth config (container `oauth2-proxy`) :

```yaml
- GITHUB_ORG=
- GITHUB_TEAM=
- CLIENT_ID=
- CLIENT_SECRET=
```

The sample configuration here uses Github authentication for a single Team inside an organization, You can use any supported Oauth provider available [here](https://github.com/bitly/oauth2_proxy#oauth-provider-configuration). You will need to update `oauth-proxy/start.sh` with the correct variables if they are not already there

## SearchGuard

```bash
cd searchguard
docker-compose up
```

Then go to http://locahost:4180

## X-Pack

Complete tutorial for xpack can be found [here](https://www.elastic.co/blog/user-impersonation-with-x-pack-integrating-third-party-auth-with-kibana)

```bash
cd xpack
docker-compose up
```

Then go to http://locahost:4180

## Note for searchguard

The `searchguard/docker-compose.yml` uses two custom images with built-in proxy configuration :

* [`bertrandmartel/docker-elasticsearch`](https://github.com/bertrandmartel/docker-elasticsearch) forked from [`khezen/docker-elasticsearch`](https://github.com/khezen/docker-elasticsearch)
* [`bertrandmartel/docker-kibana`](https://github.com/bertrandmartel/docker-kibana) forked from [`khezen/docker-kibana`](https://github.com/khezen/docker-kibana)

For already existing configuration, check [Using Kibana with proxy authentication](http://docs.search-guard.com/latest/kibana-authentication-search-guard#using-kibana-with-proxy-authentication)

## Using a base path

Only when using Search Guard config, if you want to use a base path, for instance "/kibana" :

```yaml
nginx-proxy:
environment:
- BASE_PATH=/kibana/
```
and

```yaml
kibana:
environment:
SERVER_BASE_PATH: "/kibana"
```
and

```yaml
oauth2-proxy:
environment:
- UPSTREAM=http://nginx-proxy:8080/kibana/
```

After composing up, go to http://localhost:4180/kibana

You can find a sample config [here](https://github.com/bertrandmartel/kibana-oauth2-proxy/blob/base-path/searchguard/docker-compose.yml)

## License

The MIT License (MIT) Copyright (c) 2017-2018 Bertrand Martel