12139 Commits

Author SHA1 Message Date
Daniel Nephin
fad658591c
Merge pull request #10642 from hashicorp/dnephin/backport-1.8-dns-truncate
[1.8.x] dns: properly trim response when EDNS is used
2021-07-19 16:48:45 -04:00
Daniel Nephin
6ccb6534b3 Merge pull request #10009 from hashicorp/dnephin/trim-dns-response-with-edns
dns: properly trim response when EDNS is used
2021-07-19 14:10:19 -04:00
Daniel Nephin
4acff77ea3 dns: remove goto INVALID and a naked return
This commit is one small step toward modernizing and making the DNSServer readable.
2021-07-19 14:00:01 -04:00
hc-github-team-consul-core
dd2699d49a Putting source back into Dev Mode 2021-07-15 19:27:38 +00:00
hc-github-team-consul-core
1061f92a96
Release v1.8.14 v1.8.14 2021-07-15 18:49:52 +00:00
hc-github-team-consul-core
dcfd6d121e
update bindata_assetfs.go 2021-07-15 18:49:51 +00:00
Dhia Ayachi
57c08d1ea0 add changelogs for 1.8.14 2021-07-15 13:33:14 -04:00
Mike Morris
05773941e0 ui: update Build-UI.dockerfile (#10543) 2021-07-15 17:25:35 +00:00
Freddy
6bd517cb70
Merge pull request #10624 from hashicorp/vuln/validate-sans-1.8 2021-07-15 09:43:23 -06:00
freddygv
db824b138a Add changelog entry 2021-07-15 09:30:27 -06:00
freddygv
283b989ba5 Validate SANs for failovers 2021-07-14 23:41:33 -06:00
freddygv
752f5ff961 Validate Subject Alternative Name for upstreams
These changes ensure that the identity of services dialed is
cryptographically verified.

For all upstreams we validate against SPIFFE IDs in the format used by
Consul's service mesh:

spiffe://<trust-domain>/ns/<namespace>/dc/<datacenter>/svc/<service>
2021-07-14 23:41:19 -06:00
Dhia Ayachi
e9a4aa8f76
Format certificates properly (rfc7468) with a trailing new line (#10411) (#10556)
* 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>

* fix compilation error

* fix failing test

Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>
Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
2021-07-06 12:40:39 -04:00
hc-github-team-consul-core
1612bb3646 Putting source back into Dev Mode 2021-06-22 14:34:33 +00:00
hc-github-team-consul-core
235653c7cb
Release v1.8.13 v1.8.13 2021-06-21 21:35:37 +00:00
hc-github-team-consul-core
c2149cd343
update bindata_assetfs.go 2021-06-21 21:35:37 +00:00
Mike Morris
be8b312030 changelog: add unreleased entries for 1.8.13 2021-06-21 17:27:17 -04:00
Matt Keeler
116b0ebc46
Add ability to load a license from the configuration/environment (#10442)
This is mainly for forwards compatibility with 1.10 and should not be relied on for a cluster staying on a 1.8.x/1.9.x version.
2021-06-21 16:38:21 -04:00
Matt Keeler
3609d903af
Hold onto the token store from the base deps in the Client (#10432) (#10433)
This is needed in order to access the agent token in some enterprise code.
2021-06-18 17:07:06 -04:00
Mike Morris
2868a14451
Merge pull request #10406 from hashicorp/revert/1.8.x-crypto
revert(1.8.x): golang crypto module
2021-06-15 17:31:50 -04:00
Mike Morris
6473501517 Revert "upgrade golang crypto from 0.0.0-20200930160638-afb6bcd081ae => v0.0.0-20210513164829-c07d793c2f9a (#10392)"
This reverts commit 7242f61b9c95adb186e0650ead1b8d83d0a4970f.
2021-06-15 16:41:13 -04:00
Dhia Ayachi
658ea0eef8 improve monitor performance (#10368)
* remove flush for each write to http response in the agent monitor endpoint

* fix race condition when we stop and start monitor multiple times, the doneCh is closed and never recover.

* start log reading goroutine before adding the sink to avoid filling the log channel before getting a chance of reading from it

* flush every 500ms to optimize log writing in the http server side.

* add changelog file

* add issue url to changelog

* fix changelog url

* Update changelog

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

* use ticker to flush and avoid race condition when flushing in a different goroutine

* stop the ticker when done

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

* Revert "fix race condition when we stop and start monitor multiple times, the doneCh is closed and never recover."

This reverts commit 1eeddf7a

* wait for log consumer loop to start before registering the sink

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
2021-06-15 16:23:29 +00:00
Dhia Ayachi
7242f61b9c
upgrade golang crypto from 0.0.0-20200930160638-afb6bcd081ae => v0.0.0-20210513164829-c07d793c2f9a (#10392) 2021-06-14 13:04:09 -04:00
Dhia Ayachi
9e4d7a3d26
generate a single debug file for a long duration capture (#10279) (#10360)
* debug: remove the CLI check for debug_enabled

The API allows collecting profiles even debug_enabled=false as long as
ACLs are enabled. Remove this check from the CLI so that users do not
need to set debug_enabled=true for no reason.

Also:
- fix the API client to return errors on non-200 status codes for debug
  endpoints
- improve the failure messages when pprof data can not be collected

Co-Authored-By: Dhia Ayachi <dhia@hashicorp.com>

* remove parallel test runs

parallel runs create a race condition that fail the debug tests

* snapshot the timestamp at the beginning of the capture

- timestamp used to create the capture sub folder is snapshot only at the beginning of the capture and reused for subsequent captures
- capture append to the file if it already exist

* Revert "snapshot the timestamp at the beginning of the capture"

This reverts commit c2d03346

* Refactor captureDynamic to extract capture logic for each item in a different func

* snapshot the timestamp at the beginning of the capture

- timestamp used to create the capture sub folder is snapshot only at the beginning of the capture and reused for subsequent captures
- capture append to the file if it already exist

* Revert "snapshot the timestamp at the beginning of the capture"

This reverts commit c2d03346

* Refactor captureDynamic to extract capture logic for each item in a different func

* extract wait group outside the go routine to avoid a race condition

* capture pprof in a separate go routine

* perform a single capture for pprof data for the whole duration

* add missing vendor dependency

* add a change log and fix documentation to reflect the change

* create function for timestamp dir creation and simplify error handling

* use error groups and ticker to simplify interval capture loop

* Logs, profile and traces are captured for the full duration. Metrics, Heap and Go routines are captured every interval

* refactor Logs capture routine and add log capture specific test

* improve error reporting when log test fail

* change test duration to 1s

* make time parsing in log line more robust

* refactor log time format in a const

* test on log line empty the earliest possible and return

Co-authored-by: Freddy <freddygv@users.noreply.github.com>

* rename function to captureShortLived

* more specific changelog

Co-authored-by: Paul Banks <banks@banksco.de>

* update documentation to reflect current implementation

* add test for behavior when invalid param is passed to the command

* fix argument line in test

* a more detailed description of the new behaviour

Co-authored-by: Paul Banks <banks@banksco.de>

* print success right after the capture is done

* remove an unnecessary error check

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

* upgraded github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57 => v0.0.0-20210601050228-01bbb1931b22

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
Co-authored-by: Freddy <freddygv@users.noreply.github.com>
Co-authored-by: Paul Banks <banks@banksco.de>

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
Co-authored-by: Freddy <freddygv@users.noreply.github.com>
Co-authored-by: Paul Banks <banks@banksco.de>
2021-06-07 15:51:57 -04:00
Dhia Ayachi
a73453e274 fix monitor to only start the monitor in json format when requested (#10358)
* fix monitor to only start the monitor in json format when requested

* add release notes

* add test to validate json format when requested
2021-06-07 16:09:40 +00:00
hc-github-team-consul-core
d0d47b318b Putting source back into Dev Mode 2021-06-04 17:58:06 +00:00
hc-github-team-consul-core
599b5a3bff
Release v1.8.12 v1.8.12 2021-06-04 02:02:11 +00:00
hc-github-team-consul-core
04e19838a9
update bindata_assetfs.go 2021-06-04 02:02:10 +00:00
Mike Morris
2b1d97b931 changelog: add unreleased entries for 1.8.12 2021-06-03 21:51:10 -04:00
hc-github-team-consul-core
10cf54e7a6 Merge branch 'release/1.8.11' into remote-x 2021-06-03 20:51:46 +00:00
hc-github-team-consul-core
f766e37178 Putting source back into Dev Mode 2021-06-03 20:51:43 +00:00
hc-github-team-consul-core
083d71fa03
Release v1.8.11 v1.8.11 2021-06-03 19:57:33 +00:00
hc-github-team-consul-core
3c4cea9158
update bindata_assetfs.go 2021-06-03 19:57:32 +00:00
Mike Morris
71fc46509a changelog: merge entries from 1.8.11-beta1 and 1.8.11-beta2 into unreleased 1.8.11 2021-06-03 15:44:55 -04:00
Daniel Nephin
1819976011 Merge pull request #10345 from hashicorp/dnephin/backport-logging-fix
[1.9.x] agent: remove leading whitespace from agent log lines
2021-06-03 18:43:21 +00:00
Mike Morris
ea6d6dd2ee Revert "Revert "Merge pull request #10277 from hashicorp/dnephin/backport-serf-tag-refactor""
This reverts commit 442a8efc7fc7eb0121e27339e5322efef5ea6418.
2021-06-03 14:24:30 -04:00
Daniel Nephin
8d49cc6585
Merge pull request #10332 from hashicorp/dnephin/backport-envoy-cli-fix
[1.8.x] envoy: fix deadlock when input is larger than named pipe buffer size
2021-06-03 13:00:51 -04:00
Daniel Nephin
68db7f2685 Merge pull request #10324 from hashicorp/dnephin/fix-envoy-bootstrap-exec
envoy: fix deadlock when input is larger than named pipe buffer size
2021-06-01 14:15:45 -04:00
Daniel Nephin
ee250d3113 Merge pull request #10321 from hashicorp/dnephin/backport-debug-cli-fix
[1.9.x] debug: remove the CLI check for debug_enabled
2021-05-31 20:10:45 +00:00
Daniel Nephin
655468ad88 Merge pull request #10196 from hashicorp/backport-ci-changes
[1.8.x] Backport CI changes
2021-05-27 12:01:45 -04:00
hc-github-team-consul-core
322bac84a1 Putting source back into Dev Mode 2021-05-26 14:29:48 +00:00
hc-github-team-consul-core
a772dbc37a
Release v1.8.11-beta2 v1.8.11-beta2 2021-05-26 02:18:24 +00:00
hc-github-team-consul-core
2195429f32
update bindata_assetfs.go 2021-05-26 02:18:23 +00:00
Mike Morris
34fc32e6ad changelog: add unreleased entries for v1.8.11-beta2 2021-05-25 21:25:31 -04:00
Mike Morris
b589604d92 changelog: add entry for network areas WAN config fix 2021-05-25 21:24:06 -04:00
Mike Morris
442a8efc7f Revert "Merge pull request #10277 from hashicorp/dnephin/backport-serf-tag-refactor"
This reverts commit f45ab674ceae1c0cb19b9ca0a8d36d38b59b34db, reversing
changes made to 985ca60d352ba14c274ba388fd9af191fab68263.
2021-05-25 21:15:19 -04:00
Daniel Nephin
f45ab674ce
Merge pull request #10277 from hashicorp/dnephin/backport-serf-tag-refactor
[1.8.x] Backport some ent changes for serf tags
2021-05-21 16:43:24 -04:00
Daniel Nephin
4bd66e0348 Merge pull request #10272 from hashicorp/dnephin/backport-namespace-license-fix
Backport some ent changes for serf tags
2021-05-21 12:54:51 -04:00
hc-github-team-consul-core
985ca60d35 Merge branch 'release/1.8.11-beta1' into remote-x 2021-05-18 20:55:05 +00:00
hc-github-team-consul-core
9360f453d3 Putting source back into Dev Mode 2021-05-18 20:55:00 +00:00