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
- Host: GitHub
- URL: https://github.com/bertrandmartel/kibana-oauth2-proxy
- Owner: bertrandmartel
- License: mit
- Created: 2017-12-31T04:48:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-01T18:13:52.000Z (over 8 years ago)
- Last Synced: 2025-04-19T20:17:41.552Z (about 1 year ago)
- Topics: docker, kibana, oauth2, searchguard, x-pack
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 14
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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)

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