Add client certificate CA option to authenticate with client certs

Add the ability to authenticate against multiple client CA certificates.

Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
This commit is contained in:
Simon Thulbourn 2015-03-20 15:19:07 +00:00
parent d3bbb078c1
commit c8f3800f1c
4 changed files with 71 additions and 1 deletions

View file

@ -52,6 +52,27 @@ var configStruct = Configuration{
},
},
},
HTTP: struct {
Addr string `yaml:"addr,omitempty"`
Prefix string `yaml:"prefix,omitempty"`
Secret string `yaml:"secret,omitempty"`
TLS struct {
Certificate string `yaml:"certificate,omitempty"`
Key string `yaml:"key,omitempty"`
ClientCAs []string `yaml:"clientcas,omitempty"`
} `yaml:"tls,omitempty"`
Debug struct {
Addr string `yaml:"addr,omitempty"`
} `yaml:"debug,omitempty"`
}{
TLS: struct {
Certificate string `yaml:"certificate,omitempty"`
Key string `yaml:"key,omitempty"`
ClientCAs []string `yaml:"clientcas,omitempty"`
}{
ClientCAs: []string{"/path/to/ca.pem"},
},
},
}
// configYamlV0_1 is a Version 0.1 yaml document representing configStruct
@ -82,6 +103,9 @@ notifications:
reporting:
bugsnag:
apikey: BugsnagApiKey
http:
clientcas:
- /path/to/ca.pem
`
// inmemoryConfigYamlV0_1 is a Version 0.1 yaml document specifying an inmemory