diff --git a/docs/toml.md b/docs/toml.md index 206b81bbd..375cebe66 100644 --- a/docs/toml.md +++ b/docs/toml.md @@ -1305,6 +1305,13 @@ prefix = "/traefik" # # filename = "etcd.tmpl" +# Use etcd user/pass authentication +# +# Optional +# +# username = foo +# password = bar + # Enable etcd TLS connection # # Optional diff --git a/provider/kv/kv.go b/provider/kv/kv.go index ee511e901..fc234fa4b 100644 --- a/provider/kv/kv.go +++ b/provider/kv/kv.go @@ -24,6 +24,8 @@ type Provider struct { Endpoint string `description:"Comma separated server endpoints"` Prefix string `description:"Prefix used for KV store"` TLS *provider.ClientTLS `description:"Enable TLS support"` + Username string `description:"KV Username"` + Password string `description:"KV Password"` StoreType store.Backend Kvclient store.Store } @@ -33,6 +35,8 @@ func (p *Provider) CreateStore() (store.Store, error) { storeConfig := &store.Config{ ConnectionTimeout: 30 * time.Second, Bucket: "traefik", + Username: p.Username, + Password: p.Password, } if p.TLS != nil { diff --git a/traefik.sample.toml b/traefik.sample.toml index 12c4a0f1e..928478ce3 100644 --- a/traefik.sample.toml +++ b/traefik.sample.toml @@ -855,6 +855,13 @@ # # filename = "etcd.tmpl" +# Use etcd user/pass authentication +# +# Optional +# +# username = foo +# password = bar + # Enable etcd TLS connection # # Optional @@ -865,7 +872,6 @@ # key = "/etc/ssl/etcd.key" # insecureskipverify = true - ################################################################ # Zookeeper configuration backend ################################################################