support google oauth
This commit is contained in:
parent
9d0772e50b
commit
afccd7923d
1 changed files with 14 additions and 10 deletions
|
@ -29,14 +29,14 @@ http_addr = {{ server.bind.address }}
|
||||||
http_port = {{ server.bind.port }}
|
http_port = {{ server.bind.port }}
|
||||||
|
|
||||||
# The public facing domain name used to access grafana from a browser
|
# 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
|
# Redirect to correct domain if host header does not match domain
|
||||||
# Prevents DNS rebinding attacks
|
# Prevents DNS rebinding attacks
|
||||||
;enforce_domain = false
|
;enforce_domain = false
|
||||||
|
|
||||||
# The full public facing url
|
# 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
|
# Log web requests
|
||||||
;router_logging = false
|
;router_logging = false
|
||||||
|
@ -185,15 +185,19 @@ org_name = {{ server.auth.role }}
|
||||||
|
|
||||||
#################################### Google Auth ##########################
|
#################################### Google Auth ##########################
|
||||||
[auth.google]
|
[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
|
;enabled = false
|
||||||
;allow_sign_up = false
|
{%- endif %}
|
||||||
;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 =
|
|
||||||
|
|
||||||
#################################### Auth Proxy ##########################
|
#################################### Auth Proxy ##########################
|
||||||
[auth.proxy]
|
[auth.proxy]
|
||||||
|
|
Loading…
Reference in a new issue