1
0
Fork 0
mirror of synced 2024-12-22 14:41:06 -05:00

support google oauth

This commit is contained in:
Ivan Lopez 2016-12-02 17:25:06 +01:00
parent 9d0772e50b
commit afccd7923d

View file

@ -29,14 +29,14 @@ http_addr = {{ server.bind.address }}
http_port = {{ server.bind.port }}
# The public facing domain name used to access grafana from a browser
;domain = localhost
domain = {{ server.get('domain', 'localhost') }}
# Redirect to correct domain if host header does not match domain
# Prevents DNS rebinding attacks
;enforce_domain = false
# The full public facing url
;root_url = %(protocol)s://%(domain)s:%(http_port)s/
root_url = {{ server.get('root_url', '%(protocol)s://%(domain)s:%(http_port)s/') }}
# Log web requests
;router_logging = false
@ -185,15 +185,19 @@ org_name = {{ server.auth.role }}
#################################### Google Auth ##########################
[auth.google]
{%- if server.auth.google.get('enabled') %}
enabled = true
allowed_domains = {{ server.auth.google.get('allowed_domains', '') }}
allow_sign_up = {{ server.auth.google.get('allow_sign_up', 'false') }}
client_id = {{ server.auth.google.get('client_id', '') }}
client_secret = {{ server.auth.google.get('client_secret', '') }}
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
api_url = https://www.googleapis.com/oauth2/v1/userinfo
{%- else %}
;enabled = false
;allow_sign_up = false
;client_id = some_client_id
;client_secret = some_client_secret
;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
;api_url = https://www.googleapis.com/oauth2/v1/userinfo
;allowed_domains =
{%- endif %}
#################################### Auth Proxy ##########################
[auth.proxy]