Commit Graph

13525 Commits

Author SHA1 Message Date
Dhia Ayachi 78368ad248 add changelogs for 1.9.8 2021-07-15 13:26:49 -04:00
Mike Morris dd8b1cad68
ui: update Build-UI.dockerfile (#10543) 2021-07-15 13:22:53 -04:00
Freddy 1028c2931a
Merge pull request #10623 from hashicorp/vuln/validate-sans-1.9 2021-07-15 09:43:01 -06:00
freddygv a29872a101 Add changelog entry 2021-07-15 09:28:51 -06:00
R.B. Boyer 3ca24425ef
(1.9.x) xds: ensure single L7 deny intention with default deny policy does not result in allow action (CVE-2021-36213) (#10620)
Backport of #10619 to 1.9.x
2021-07-15 10:10:03 -05:00
freddygv 0b4fe4b7a2 Validate SANs for failovers 2021-07-14 23:31:23 -06:00
freddygv 2bca52fa88 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:11:30 -06:00
Dhia Ayachi c10e036235
Format certificates properly (rfc7468) with a trailing new line (#10411) (#10555)
* 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>

Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>
Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
2021-07-06 12:34:57 -04:00
Kenia 8ffa9cecc0 Add changelog to backported bug fix for Topology Metrics (#10538) 2021-06-30 20:52:11 +00:00
Kenia f99612fac4
ui: [Backport 1.9.x] Send item name down to Stats to call endpoint (#10535) 2021-06-30 13:40:46 -04:00
hc-github-team-consul-core 692dc61f21 Putting source back into Dev Mode 2021-06-22 14:34:17 +00:00
hc-github-team-consul-core 01555fb292
Release v1.9.7 2021-06-21 21:38:01 +00:00
hc-github-team-consul-core 7431fbeda0
update bindata_assetfs.go 2021-06-21 21:38:00 +00:00
Mike Morris 874329461d changelog: add unreleased entries for 1.9.7 2021-06-21 17:29:47 -04:00
Matt Keeler 0242dcc5d2
Add ability to load a license from the configuration/environment (#10441)
This is mainly for forward compatibility with 1.10 where licensing requirements are changing.

For older releases we are adding the ability to load the license from a configuration/environment to facilitate a smoother upgrade process. For servers, we will allow the configuration to be set but it will not be used (a warning log is emitted saying as much). For client agents it will actually cause the license to be used in place of the auto-retrieval process.

Unlike with 1.10, client agents will not be able to update the license loaded via config with a reload. It is expected that this configuration is only used while on the path to upgrading to 1.10 and therefore the ability to reload the license should not be necessary.
2021-06-21 15:00:46 -04:00
John Cowen 4b081968f3
ui: Add resolution for xmlhttprequest-ssl at least 1.6.3 (#10370) (#10438)
Backport to 1.9.x of #10370
2021-06-21 17:48:26 +01:00
Matt Keeler 94e4ef0c17
Hold onto the token store from the base deps in the Client (#10432)
This is needed in order to access the agent token in some enterprise code.
2021-06-18 16:34:23 -04:00
Dhia Ayachi 796ebbe5f5 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:24 +00:00
Dhia Ayachi 9b0414ec62 upgrade golang crypto from 0.0.0-20200930160638-afb6bcd081ae => v0.0.0-20210513164829-c07d793c2f9a (#10390) 2021-06-14 16:39:42 +00:00
Dhia Ayachi d24156db14 generate a single debug file for a long duration capture (#10279)
* 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>
2021-06-07 17:12:54 +00:00
Dhia Ayachi 3084d16066 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:32 +00:00
hc-github-team-consul-core 3fb0aa5f82 Putting source back into Dev Mode 2021-06-04 22:02:41 +00:00
hc-github-team-consul-core bbcbb733b4
Release v1.9.6 2021-06-04 20:45:53 +00:00
hc-github-team-consul-core 980c99c988
update bindata_assetfs.go 2021-06-04 20:45:52 +00:00
Mike Morris 29f4615c39 changelog: add unreleased entries for v1.9.6 2021-06-03 21:55:22 -04:00
Daniel Nephin c43f3bda51
Merge pull request #10345 from hashicorp/dnephin/backport-logging-fix
[1.9.x] agent: remove leading whitespace from agent log lines
2021-06-03 14:42:30 -04:00
Paul Ewing ef533f7c33
usagemetrics: add cluster members to metrics API (#10340) (#10346)
This PR adds cluster members to the metrics API. The number of members per
segment are reported as well as the total number of members.

Tested by running a multi-node cluster locally and ensuring the numbers were
correct. Also added unit test coverage to add the new expected gauges to
existing test cases.
2021-06-03 10:35:45 -07:00
Daniel Nephin a3a0bf61a2 Merge pull request #10338 from hashicorp/dnephin/fix-logging-indent
agent: remove leading whitespace from agent log lines
2021-06-03 13:26:03 -04:00
Daniel Nephin e6aa0c567f 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 17:03:30 +00:00
Daniel Nephin 4afa17ba45
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 16:10:09 -04:00
Dhia Ayachi 4249ac9b0e debug: remove the CLI check for debug_enabled (#10273)
* 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

* Add changelog

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
2021-05-31 15:29:05 -04:00
Matt Keeler ada4d21285
Bump raft-autopilot to the latest version (#10310) 2021-05-27 13:23:18 -04:00
John Cowen 5beeb44eee ui: Move intention description field (#10292)
...from under the permissions widget to over the permissions widget
2021-05-27 14:56:23 +00:00
Mike Morris eabb421803 changelog: add entry for network areas WAN config fix 2021-05-26 21:50:01 +00:00
John Cowen 270e468caa
Revert "ui: change coloring of secondary navigation elements (#10259)" (#10284)
This reverts commit 08b31c107f.
2021-05-24 15:41:01 +01:00
John Cowen 08b31c107f ui: change coloring of secondary navigation elements (#10259) 2021-05-24 10:52:09 +00:00
Hector Simpson e0adb3f475
Update brand assets (1.9.x) (#10090)
* Update header logo and inline icon

* Update full logos + layout on loading screen

* Update favicon assets and strategy

- Switches to serve an ico file alongside an SVG file
- Introduces an apple-touch-icon

* Removes unused favicon/meta assets

* Changelog item for ui

* Component for logo, update brand color

* Restore data-enterprise-logo attribute
2021-05-24 11:43:27 +01:00
John Cowen 5b65f65f0a
ui: Miscellaneous Lock Session fixes (#10225) (backported #10257)
* ui: Miscellaneous Lock Session fixes (#10225)

* Remove usage of replace which isn't available on 1.9.x
2021-05-24 11:10:28 +01:00
Daniel Nephin c6b8815d5f Merge pull request #10272 from hashicorp/dnephin/backport-namespace-license-fix
Backport some ent changes for serf tags
2021-05-21 16:35:34 +00:00
Daniel Nephin 181621bd13 Merge pull request #8812 from jjshanks/GH-8728
GH-8728 add raft default values
2021-05-18 19:33:13 +00:00
R.B. Boyer 3357a14339
server: ensure that central service config flattening properly resets the state each time (#10245)
The prior solution to call reply.Reset() aged poorly since newer fields
were added to the reply, but not added to Reset() leading serial
blocking query loops on the server to blend replies.

This could manifest as a service-defaults protocol change from
default=>http not reverting back to default after the config entry
reponsible was deleted.

Backport of #10239 to 1.9.x
2021-05-14 13:20:49 -05:00
R.B. Boyer 89180eb281
agent: ensure we hash the non-deprecated upstream fields on ServiceConfigRequest (#10240) (#10244)
Backport of #10240 to 1.9.x
2021-05-14 10:49:18 -05:00
Freddy 235118c44d Add changelog entry for network area timeout updates (#10241) 2021-05-13 21:06:15 +00:00
R.B. Boyer a179607457
[1.9.x] connect: update supported envoy versions to 1.16.4, 1.15.5, 1.14.6, and 1.13.7 (#10232)
manual backport of #10231 to 1.9.x
2021-05-12 14:26:56 -05:00
Daniel Nephin ff6d4c75b4
Merge pull request #10218 from hashicorp/dnephin/backport-local-agent-fix
[1.9.x] agent/local: do not persist the agent or user token
2021-05-12 13:19:29 -04:00
Kenia fd255c48d6 ui: Add conditionals to Lock Session list items (#10121)
* Add conditionals to Lock Session list items

* Add changelog

* Show ID in details if there is a name to go in title

* Add copy-button if ID is in the title

* Update TTL conditional

* Update .changelog/10121.txt

Co-authored-by: John Cowen <johncowen@users.noreply.github.com>

Co-authored-by: John Cowen <johncowen@users.noreply.github.com>
2021-05-11 15:40:50 +00:00
Daniel Nephin 1aa15c7c61 agent/local: only fallback to agent token for deletes
Fallback to the default user token for synching registrations.
2021-05-10 16:04:05 -04:00
Daniel Nephin fb10c229e2 Add changelog 2021-05-10 16:03:51 -04:00
Daniel Nephin 3dc91798c6 agent/local: do not persist the agent tokens
Only default to the user token and agent token for the sync. Change the
exported methods to only return the stored tokens associated with a
specific check or service.
2021-05-10 16:03:30 -04:00
John Cowen b5eaabc0fb ui: Fix nspace spacing issue (#10157)
This fixes the spacing bug in nspaces only by only showing Description if the namespace has one, and removing the extra 2 pixel margin of dds for when dts aren't rendered/don't exist.
2021-05-10 10:20:13 +00:00