Commit Graph

19 Commits

Author SHA1 Message Date
Michael Schurter
556adad26a config: accept CA PEM files with extra whitespace
Previously we did a validation pass over CA PEM files before calling
Go's CertPool.AppendCertsFromPEM to provide more detailed error messages
than the stdlib provides.

Unfortunately our validation was overly strict and rejected valid CA
files. This is actually the reason the stdlib PEM parser doesn't return
meaningful errors: PEM files are extremely permissive and it's difficult
to tell the difference between invalid data and valid metadata.

This PR removes our custom validation as it would reject valid data and
the extra error messages were not useful in diagnosing the error
encountered.
2018-09-06 11:38:56 -07:00
Alex Dadgar
da0bec03c1 Fix make check errors 2018-09-04 16:03:52 -07:00
Chelsea Holland Komlo
92fc1ce470 refactor to use golang built in api for certs 2018-08-10 12:37:21 -04:00
Chelsea Holland Komlo
bc01b401fc add functionality to check if signature algorithm is supported in cipher suites 2018-08-10 12:37:21 -04:00
Chelsea Holland Komlo
bfaf4dcb2b change function signature to take entire tls config object 2018-08-10 12:37:21 -04:00
Chelsea Holland Komlo
2cc252baa7 fixup! more specific test assertion 2018-06-13 09:58:40 -04:00
Chelsea Holland Komlo
cd8de515cc add tests and improve should reload logic 2018-06-08 15:10:10 -04:00
Chelsea Holland Komlo
9943b9bafe enable more tls 1.2 ciphers 2018-06-07 17:49:57 -04:00
Alex Dadgar
f547535292 Merge branch 'master' into f-tls-parse-certs 2018-05-30 17:25:50 +00:00
Chelsea Holland Komlo
5ae88d9f0c handle parsing multiple certificates in a pem file 2018-05-29 18:25:43 -04:00
Chelsea Holland Komlo
d4152c77ea parse CA certificate to catch more specific errors 2018-05-25 18:14:32 -04:00
Chelsea Holland Komlo
25896ddf3c add support for tls PreferServerCipherSuites
add further tests for tls configuration
2018-05-25 13:20:00 -04:00
Chelsea Holland Komlo
6733d768f0 refactor NewTLSConfiguration to pass in verifyIncoming/verifyOutgoing
add missing fields to TLS merge method
2018-05-23 18:35:30 -04:00
Chelsea Holland Komlo
509180ee00 add support for configurable TLS minimum version 2018-05-09 18:07:12 -04:00
Chelsea Holland Komlo
0f46208cc1 allow configurable cipher suites
disallow 3DES and RC4 ciphers

add documentation for tls_cipher_suites
2018-05-09 17:15:31 -04:00
Chelsea Komlo
fa9fd4422c Nomad agent reload TLS configuration on SIGHUP (#3479)
* Allow server TLS configuration to be reloaded via SIGHUP

* dynamic tls reloading for nomad agents

* code cleanup and refactoring

* ensure keyloader is initialized, add comments

* allow downgrading from TLS

* initalize keyloader if necessary

* integration test for tls reload

* fix up test to assert success on reloaded TLS configuration

* failure in loading a new TLS config should remain at current

Reload only the config if agent is already using TLS

* reload agent configuration before specific server/client

lock keyloader before loading/caching a new certificate

* introduce a get-or-set method for keyloader

* fixups from code review

* fix up linting errors

* fixups from code review

* add lock for config updates; improve copy of tls config

* GetCertificate only reloads certificates dynamically for the server

* config updates/copies should be on agent

* improve http integration test

* simplify agent reloading storing a local copy of config

* reuse the same keyloader when reloading

* Test that server and client get reloaded but keep keyloader

* Keyloader exposes GetClientCertificate as well for outgoing connections

* Fix spelling

* correct changelog style
2017-11-14 17:53:23 -08:00
Michael Schurter
c9397c75a8 Fix tlsutil tests 2016-11-10 12:18:13 -08:00
Alex Dadgar
818196e4a1 get tlsutil tests to compile - need to regenerate the certificates 2016-11-09 14:41:08 -08:00
Diptanu Choudhury
f416ac7419 Moved tlsutil into helpers 2016-10-25 16:05:37 -07:00