consul/agent/connect
Dhia Ayachi 543928d707 Format certificates properly (rfc7468) with a trailing new line (#10411)
* trim carriage return from certificates when inserting rootCA in the inMemDB

* format rootCA properly when returning the CA on the connect CA endpoint

* Fix linter warnings

* Fix providers to trim certs before returning it

* trim newlines on write when possible

* add changelog

* make sure all provider return a trailing newline after the root and intermediate certs

* Fix endpoint to return trailing new line

* Fix failing test with vault provider

* make test more robust

* make sure all provider return a trailing newline after the leaf certs

* Check for suffix before removing newline and use function

* Add comment to consul provider

* Update change log

Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>

* fix typo

* simplify code callflow

Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>

* extract requireNewLine as shared func

* remove dependency to testify in testing file

* remove extra newline in vault provider

* Add cert newline fix to envoy xds

* remove new line from mock provider

* Remove adding a new line from provider and fix it when the cert is read

* Add a comment to explain the fix

* Add missing for leaf certs

* fix missing new line

* fix missing new line in leaf certs

* remove extra new line in test

* updage changelog

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>

* fix in vault provider and when reading cache (RPC call)

* fix AWS provider

* fix failing test in the provider

* remove comments and empty lines

* add check for empty cert in test

* fix linter warnings

* add new line for leaf and private key

* use string concat instead of Sprintf

* fix new lines for leaf signing

* preallocate slice and remove append

* Add new line to `SignIntermediate` and `CrossSignCA`

Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>
Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
2021-07-01 00:49:03 +00:00
..
ca Format certificates properly (rfc7468) with a trailing new line (#10411) 2021-07-01 00:49:03 +00:00
authz.go Replace CertURI.Authorize() calls. 2021-03-15 18:06:04 -06:00
authz_test.go Replace CertURI.Authorize() calls. 2021-03-15 18:06:04 -06:00
common_names.go Updates to Config Entries and Connect for Namespaces (#7116) 2020-01-24 10:04:58 -05:00
common_names_test.go Enable gofmt simplify 2020-06-16 13:21:11 -04:00
csr.go auto_encrypt: set dns and ip san for k8s and provide configuration (#6944) 2020-01-17 23:25:26 +01:00
generate.go connect: add validations around intermediate cert ttl (#7213) 2020-02-11 00:05:49 +01:00
generate_test.go testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
parsing.go Fix support for RSA CA keys in Connect. (#6638) 2019-11-01 13:20:26 +00:00
sni.go connect: generate the full SNI names for discovery targets in the compiler rather than in the xds package (#6340) 2019-08-19 13:03:03 -05:00
sni_test.go connect: generate the full SNI names for discovery targets in the compiler rather than in the xds package (#6340) 2019-08-19 13:03:03 -05:00
testing_ca.go Add CA server delegate interface for testing 2020-11-19 20:08:06 -08:00
testing_ca_test.go testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
testing_spiffe.go connect: Add logic for updating secondary DC intermediate on config set 2020-11-13 14:33:44 -08:00
uri.go Replace CertURI.Authorize() calls. 2021-03-15 18:06:04 -06:00
uri_agent.go Replace CertURI.Authorize() calls. 2021-03-15 18:06:04 -06:00
uri_agent_test.go Replace CertURI.Authorize() calls. 2021-03-15 18:06:04 -06:00
uri_service.go Replace CertURI.Authorize() calls. 2021-03-15 18:06:04 -06:00
uri_service_oss.go Fix a couple bugs regarding intentions with namespaces (#7169) 2020-01-29 17:30:38 -05:00
uri_signing.go Replace CertURI.Authorize() calls. 2021-03-15 18:06:04 -06:00
uri_signing_test.go Replace CertURI.Authorize() calls. 2021-03-15 18:06:04 -06:00
uri_test.go tls: auto_encrypt enables automatic RPC cert provisioning for consul clients (#5597) 2019-06-27 22:22:07 +02:00