Skip to content

Instantly share code, notes, and snippets.

@jcmartins
Last active October 31, 2019 15:11
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jcmartins/ce8951db811086fc02f5 to your computer and use it in GitHub Desktop.
Save jcmartins/ce8951db811086fc02f5 to your computer and use it in GitHub Desktop.
Grafana with Google Auth
###GOOGLE Console DEV
Original JavaScript autorized
http://grafana.mydomain.com.br
URIs redirect autorized
http://grafana.mydomain.com.br:3000/login/google
### NGINX PROXY
server {
listen 80;
server_name grafana.mydomain.com.br;
access_log /var/log/nginx/grafana.mydomain.access.log;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:3000;
}
}
### GRAFANA.INI
[auth.google]
enabled = true
client_id = 948449881444-o1mmji2gphorn1sqs8k5bps8gqk88kkk.apps.googleusercontent.com
client_secret = mysecretpass
scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
auth_url = https://accounts.google.com/o/oauth2/auth
token_url = https://accounts.google.com/o/oauth2/token
allowed_domains = mydomain.com.br
allow_sign_up = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment