1
0
Fork 0
mirror of synced 2024-11-04 08:48:57 -05:00

Auth and session cache enhancements

This commit is contained in:
Filip Pytloun 2016-03-31 21:30:13 +02:00
parent 04d32bf507
commit 89f4c5b65b

View file

@ -69,7 +69,7 @@ password = {{ server.database.password }}
#################################### Session ####################################
[session]
# Either "memory", "file", "redis", "mysql", "postgres", default is "file"
;provider = file
provider = {{ server.get('session', {}).get('engine', 'file') }}
# Provider config options
# memory: not have any config yet
@ -77,7 +77,9 @@ password = {{ server.database.password }}
# redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana`
# mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name`
# postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable
;provider_config = sessions
{%- if server.get('session', {}).get('engine', 'file') == 'redis' %}
provider_config = addr={{ server.session.get('host', '127.0.0.1') }}:{{ server.session.get('port', 6379) }},db={{ server.session.get('db', 'grafana') }}
{%- endif %}
# Session cookie name
;cookie_name = grafana_sess
@ -177,7 +179,7 @@ password = {{ server.database.password }}
enabled = true
header_name = {{ server.auth.get('header', 'X-REMOTE-USER') %}
header_property = {{ server.auth.get('header_property', 'username') }}
;auto_sign_up = true
auto_sign_up = true
{%- endif %}
#################################### Basic Auth ##########################
@ -191,14 +193,22 @@ header_property = {{ server.auth.get('header_property', 'username') }}
#################################### SMTP / Emailing ##########################
[smtp]
;enabled = false
;host = localhost:25
;user =
;password =
{%- if server.get('mail', {}).get('enabled', False) %}
enabled = true
{%- if server.mail.host is defined %}
host = {{ server.mail.host }}:{{ server.mail.get('port', 25) }}
{%- endif %}
{%- if server.mail.username is defined %}
user = {{ server.mail.username }}
password = {{ server.mail.password }}
{%- endif %}
;cert_file =
;key_file =
;skip_verify = false
;from_address = admin@grafana.localhost
from_address = {{ server.mail.get('from', 'grafana@localhost') }}
{%- else %}
enabled = false
{%- endif %}
[emails]
;welcome_email_on_sign_up = false