Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/casdoor/elk-auth-casdoor
ELK (Elasticsearch, Kibana) auth based on Casdoor
https://github.com/casdoor/elk-auth-casdoor
auth authentication elasticsearch elk iam kibana proxy sso
Last synced: about 16 hours ago
JSON representation
ELK (Elasticsearch, Kibana) auth based on Casdoor
- Host: GitHub
- URL: https://github.com/casdoor/elk-auth-casdoor
- Owner: casdoor
- License: apache-2.0
- Created: 2022-01-10T04:03:17.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-16T14:02:02.000Z (almost 3 years ago)
- Last Synced: 2024-06-21T15:47:52.135Z (5 months ago)
- Topics: auth, authentication, elasticsearch, elk, iam, kibana, proxy, sso
- Language: Go
- Homepage:
- Size: 24.4 KB
- Stars: 38
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elk-auth-casdoor
This is a reverse proxy plugin for authenticating elk's user with casdoor. This plugin intercepts all users' requests towards kibana, check whether this user is authenticated by casdoor.Request will be proceeded if this user has been correctly authenticated.
If this user hasn't been correctly authenticated, request will be temporarly cached, and the user will be redirect to Casdoor login page. After user correctly logs in through casdoor, the cached request will be restored and sent to kibana. So it's ok if a POST request (or something other than GET) is intercepted, and user won't need to refill the form and resend the request. The reverse proxy will remember it for you.
## Quick start
1. register your proxy as an app of Casdoor.
2. modify the configuration
The configuration file locates in "conf/app.conf".
```ini
appname = .
# port on which the reverse proxy shall be run
httpport = 8080
runmode = dev
#EDIT IT IF NECESSARY. The url of this reverse proxy
pluginEndpoint="http://localhost:8080"
#EDIT IT IF NECESSARY. The url of the kibana
targetEndpoint="http://localhost:5601"
#EDIT IT. The url of casdoor
casdoorEndpoint="http://localhost:8000"
#EDIT IT. The clientID of your reverse proxy in casdoor
clientID=ceb6eb261ab20174548d
#EDIT IT. The clientSecret of your reverse proxy in casdoor
clientSecret=af928f0ef1abc1b1195ca58e0e609e9001e134f4
#EDIT IT. The application name of your reverse proxy in casdoor
appName=ELKProxy
#EDIT IT. The organization to which your reverse proxy belongs in casdoor
organization=built-in
```
3. `go run main.go`4. visit , and log in following the guidance of redirection, and you shall see kibana protected and authenticated by casdoor.
5. If everything works well, don't forget to block the visits of original kibana's port comming from outside by configurating your firewall(or something else), so that outsiders can only visit kibana via this reverse proxy.