Commit Graph

4788 Commits (cc2950874026f226047703ebcd8a64706b07099f)

Author SHA1 Message Date
hc-github-team-consul-core c375dd2a79
backport of commit 817d85df12 (#16343)
Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2023-02-21 20:10:52 +00:00
hc-github-team-consul-core e2ec1f9718
backport of commit 49f7423ab8 (#16335)
Co-authored-by: cskh <hui.kang@hashicorp.com>
2023-02-21 10:33:43 -05:00
Dan Stough 0448e51cf5
Manual Backport of [OSS] security: update go to 1.20.1 into release/1.14.x (#16321)
* security: update go to 1.20.1 (#16263)

* changelog
2023-02-17 18:11:45 -05:00
hc-github-team-consul-core 0442ef1296
Backport of Fix mesh gateways incorrectly matching peer locality. into release/1.14.x (#16286)
* backport of commit 9bc7f6280a

* backport of commit 0c48c9a1e8

---------

Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2023-02-16 15:31:58 +00:00
Derek Menteer 6717f6c239
Fix nil-pointer panics from proxycfg package. (#16280)
Prior to this PR, servers / agents would panic and crash if an ingress
or api gateway were configured to use a discovery chain that both:

1. Referenced a peered service
2. Had a mesh gateway mode of local

This could occur, because code for handling upstream watches was shared
between both connect-proxy and the gateways. As a short-term fix, this
PR ensures that the maps are always initialized for these gateway services.

This PR also wraps the proxycfg execution and service
registration calls with recover statements to ensure that future issues
like this do not put the server into an unrecoverable state.
2023-02-15 12:30:17 -06:00
Derek Menteer 49154850b5
Fix peering acceptors in secondary datacenters. (#16233)
Prior to this commit, secondary datacenters could not be initialized
as peering acceptors if ACLs were enabled. This is due to the fact that
internal server-to-server API calls would fail because the management
token was not generated. This PR makes it so that both primary and
secondary datacenters generate their own management token whenever
a leader is elected in their respective clusters.
2023-02-10 13:06:40 -06:00
hc-github-team-consul-core e076fbb8f5
Backport of Apply agent partition to load services and agent api into release/1.14.x (#16041)
* backport of commit a42e86ffd8

* backport of commit 4ad0f7aff4

Co-authored-by: cskh <hui.kang@hashicorp.com>
2023-01-23 16:41:26 +00:00
hc-github-team-consul-core 1ad9c29dfe
backport of commit e522044bb3 (#16027)
Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2023-01-20 17:37:05 +00:00
Derek Menteer 0379dabe4e
Fix configuration merging for implicit tproxy upstreams. (#16000) (#16007)
Fix configuration merging for implicit tproxy upstreams.

Change the merging logic so that the wildcard upstream has correct proxy-defaults
and service-defaults values combined into it. It did not previously merge all fields,
and the wildcard upstream did not exist unless service-defaults existed (it ignored
proxy-defaults, essentially).

Change the way we fetch upstream configuration in the xDS layer so that it falls back
to the wildcard when no matching upstream is found. This is what allows implicit peer
upstreams to have the correct "merged" config.

Change proxycfg to always watch local mesh gateway endpoints whenever a peer upstream
is found. This simplifies the logic so that we do not have to inspect the "merged"
configuration on peer upstreams to extract the mesh gateway mode.
2023-01-19 10:55:27 -06:00
hc-github-team-consul-core 3e3ab25f9b
xds: don't attempt to load-balance sessions for local proxies (#15789) (#16004)
Previously, we'd begin a session with the xDS concurrency limiter
regardless of whether the proxy was registered in the catalog or in
the server's local agent state.

This caused problems for users who run `consul connect envoy` directly
against a server rather than a client agent, as the server's locally
registered proxies wouldn't be included in the limiter's capacity.

Now, the `ConfigSource` is responsible for beginning the session and we
only do so for services in the catalog.

Fixes: https://github.com/hashicorp/consul/issues/15753

Co-authored-by: Dan Upton <daniel@floppy.co>
2023-01-19 10:34:01 +00:00
hc-github-team-consul-core aa3f89496d
backport of commit 8cdb0e7fd2 (#16002)
Co-authored-by: Chris S. Kim <ckim@hashicorp.com>
2023-01-18 16:55:57 +00:00
hc-github-team-consul-core ff1f79dc2f
Backport of Enforce lowercase peer names. into release/1.14.x (#15977)
* backport of commit e1889324d0

* backport of commit 5382b39390

Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2023-01-13 20:30:50 +00:00
hc-github-team-consul-core 397a588ca7
backport of commit 822c3fea8a (#15907)
Co-authored-by: Daniel Upton <daniel@floppy.co>
2023-01-06 09:37:43 +00:00
hc-github-team-consul-core 4ccea91d96
backport of commit ae9b6a948e (#15893)
Co-authored-by: Daniel Upton <daniel@floppy.co>
2023-01-04 14:39:33 +00:00
hc-github-team-consul-core 64eafb312e
backport of commit 699d4b0bac (#15889)
Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2023-01-03 17:05:31 +00:00
hc-github-team-consul-core 48380a9840
Backport of Fix agent cache incorrectly notifying unchanged protobufs. into release/1.14.x (#15888)
* backport of commit cb2a978198

* backport of commit e9ac0df2db

Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2023-01-03 16:24:04 +00:00
hc-github-team-consul-core ddd12e6c1b
backport of commit 36891f355e (#15854)
Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2022-12-20 16:25:54 +00:00
hc-github-team-consul-core 0f52c25396
Backport of Add custom balancer to always remove subConns into release/1.14.x (#15836)
* backport of commit c37343dfcc

* backport of commit 27a0ffb6e8

* backport of commit ee5841db54

* backport of commit 35f72880ce

* backport of commit e8be8e4d55

* backport of commit 44d5c20f16

* backport of commit 5420eddfb0

* backport of commit ec1b87a98e

Co-authored-by: Chris S. Kim <ckim@hashicorp.com>
2022-12-19 17:50:52 +00:00
hc-github-team-consul-core 7c934a4bf9
Backport of agent: Fix assignment of error when auto-reloading cert and key file changes. into release/1.14.x (#15772)
* backport of commit 7d0cf566ca

* backport of commit 024c8a84a6

* removing unused reference to pboperator

Co-authored-by: John Murret <john.murret@hashicorp.com>
2022-12-15 21:26:43 +00:00
hc-github-team-consul-core 8843452d43
Backport of Fix DialedDirectly configuration for Consul dataplane. into release/1.14.x (#15779)
* backport of commit 1824f4428a

* backport of commit b9b929daaa

* backport of commit ea07eeb188

Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2022-12-13 15:31:26 +00:00
hc-github-team-consul-core 99c65982d4
backport of commit ee0ba0ef63 (#15756)
Co-authored-by: R.B. Boyer <rb@hashicorp.com>
2022-12-09 16:36:33 +00:00
hc-github-team-consul-core fd82c3fc46
Backport of Flakiness test: case-cfg-splitter-peering-ingress-gateways into release/1.14.x (#15725)
* backport of commit 1ac56cc5ac

* backport of commit 6d78f4b20e

* backport of commit 07054a70e4

* backport of commit 0c99f0df59

Co-authored-by: cskh <hui.kang@hashicorp.com>
2022-12-08 01:30:10 +00:00
hc-github-team-consul-core 17d6705c5a
Backport of Fix local mesh gateway with peering discovery chains. into release/1.14.x (#15715)
* backport of commit 8aff79edfe

* backport of commit 3ed9331e48

Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2022-12-07 13:20:57 -06:00
hc-github-team-consul-core afcffc2385
connect: use -dev-no-store-token for test vaults to reduce source of flakes (#15691) (#15694)
It turns out that by default the dev mode vault server will attempt to interact with the
filesystem to store the provided root token. If multiple vault instances are running
they'll all awkwardly share the filesystem and if timing results in one server stopping
while another one is starting then the starting one will error with:

    Error initializing Dev mode: rename /home/circleci/.vault-token.tmp /home/circleci/.vault-token: no such file or directory

This change uses `-dev-no-store-token` to bypass that source of flakes. Also the
stdout/stderr from the vault process is included if the test fails.

The introduction of more `t.Parallel` use in https://github.com/hashicorp/consul/pull/15669
increased the likelihood of this failure, but any of the tests with multiple vaults in use
(or running multiple package tests in parallel that all use vault) were eventually going
to flake on this.

Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>
2022-12-06 13:28:49 -06:00
hc-github-team-consul-core 8d4bcfb06f
connect: ensure all vault connect CA tests use limited privilege tokens (#15689)
All of the current integration tests where Vault is the Connect CA now use non-root tokens for the test. This helps us detect privilege changes in the vault model so we can keep our guides up to date.

One larger change was that the RenewIntermediate function got refactored slightly so it could be used from a test, rather than the large duplicated function we were testing in a test which seemed error prone.

Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>
2022-12-06 12:30:45 -06:00
hc-github-team-consul-core 9e25552415
Backport of Detect Vault 1.11+ import in secondary datacenters and update default issuer into release/1.14.x (#15683)
* backport of commit 97fcd595d4

* backport of commit fc847e4edf

* backport of commit 0207f1d54c

* backport of commit 38f1824817

* backport of commit 51f8e56fe0

* backport of commit 4c7c84292d

* backport of commit 5a2a1e5f13

* backport of commit e3b26c40b5

* backport of commit 0bf754af30

Co-authored-by: R.B. Boyer <rb@hashicorp.com>
2022-12-05 21:56:47 +00:00
hc-github-team-consul-core 18dffc51dc
Backport of peering: better represent non-passing states during peer check flattening into release/1.14.x (#15618)
* backport of commit 4deb066901

* backport of commit 65c70e84ec

* backport of commit 4372a5221c

Co-authored-by: R.B. Boyer <rb@hashicorp.com>
2022-11-30 18:14:26 +00:00
hc-github-team-consul-core 657616a744
Backport of Remove log line about server mgmt token init into release/1.14.x (#15612)
Co-authored-by: freddygv <freddy@hashicorp.com>
2022-11-29 16:21:42 -07:00
hc-github-team-consul-core 7c0eec4c1f
Add support for configuring Envoys route idle_timeout (#14340) (#15611)
* Add idleTimeout

Co-authored-by: James Oulman <oulman@users.noreply.github.com>
Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
Co-authored-by: Dhia Ayachi <dhia@hashicorp.com>
2022-11-29 17:58:00 -05:00
hc-github-team-consul-core e7f8505e1d
Backport of Add peering `.service` and `.node` DNS lookups. into release/1.14.x (#15599) 2022-11-29 13:18:48 -06:00
hc-github-team-consul-core 3a03f2697e
Backport of Fix Vault managed intermediate PKI bug into release/1.14.x (#15579) 2022-11-29 09:33:13 -05:00
hc-github-team-consul-core 2811464d56
Backport of fix(peering): increase the gRPC limit to 8MB into release/1.14.x (#15589)
* backport of commit 84b287cc3c

Co-authored-by: cskh <hui.kang@hashicorp.com>
2022-11-28 18:05:33 -05:00
hc-github-team-consul-core ab9e13c4e0
Backport of Use backport-compatible assertion into release/1.14.x (#15549)
This pull request was automerged via backport-assistant
2022-11-24 11:44:52 -05:00
hc-github-team-consul-core 8dcbee57e6
backport of commit b3f544a23b (#15545)
This pull request was automerged via backport-assistant
2022-11-24 10:13:31 -05:00
Chris S. Kim 84838e57f0
Detect Vault 1.11+ import, update default issuer (#15253) (#15437)
Consul used to rely on implicit issuer selection when calling Vault endpoints to issue new CSRs. Vault 1.11+ changed that behavior, which caused Consul to check the wrong (previous) issuer when renewing its Intermediate CA. This patch allows Consul to explicitly set a default issuer when it detects that the response from Vault is 1.11+.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Co-authored-by: Chris S. Kim <ckim@hashicorp.com>
2022-11-18 10:24:27 -05:00
hc-github-team-consul-core 2de3b807d0
Backport of fix: clarifying error message when acquiring a lock in remote dc into release/1.14.x (#15415)
This pull request was automerged via backport-assistant
2022-11-16 15:28:16 -05:00
hc-github-team-consul-core d9d0d925c3
Backport of auto-config: relax node name validation for JWT authorization into release/1.14.x (#15372)
This pull request was automerged via backport-assistant
2022-11-14 19:25:12 -05:00
hc-github-team-consul-core 6ca306f1a3
Backport of Ensure that NodeDump imported nodes are filtered into release/1.14.x (#15359)
This pull request was automerged via backport-assistant
2022-11-14 14:36:09 -05:00
hc-github-team-consul-core 54f7a79d69
Backport of Fixup authz for data imported from peers into release/1.14.x (#15355)
This pull request was automerged via backport-assistant
2022-11-14 13:36:51 -05:00
hc-github-team-consul-core 904aaf742d
Backport of connect: strip port from DNS SANs for ingress gateway leaf cert into release/1.14.x (#15354)
This pull request was automerged via backport-assistant
2022-11-14 13:27:50 -05:00
hc-github-team-consul-core ceb102f352
Backport of Prevent serving TLS via ports.grpc into release/1.14.x (#15342)
This pull request was automerged via backport-assistant
2022-11-11 15:29:50 -05:00
hc-github-team-consul-core 8c2e5e26ed
Backport of [OSS] fix: wait and try longer to peer through mesh gw into release/1.14.x (#15329)
This pull request was automerged via backport-assistant
2022-11-10 13:54:47 -05:00
hc-github-team-consul-core 6645e02c6c
update config defaults, add docs (#15302) (#15323)
* update config defaults, add docs

* update grpc tls port for non-default values

* add changelog

* Update website/content/docs/upgrading/upgrade-specific.mdx

Co-authored-by: Derek Menteer <105233703+hashi-derek@users.noreply.github.com>

* Update website/content/docs/agent/config/config-files.mdx

Co-authored-by: Derek Menteer <105233703+hashi-derek@users.noreply.github.com>

* update logic for setting grpc tls port value

* move default config to default.go, update changelog

* update docs

* Fix config tests.

* Fix linter error.

* Fix ConnectCA tests.

* Cleanup markdown on upgrade notes.

Co-authored-by: Derek Menteer <105233703+hashi-derek@users.noreply.github.com>
Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>

Co-authored-by: malizz <maliheh.monshizadeh@hashicorp.com>
Co-authored-by: Derek Menteer <105233703+hashi-derek@users.noreply.github.com>
Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2022-11-10 11:21:31 -06:00
hc-github-team-consul-core 3a8f6dddad
Backport of Avoid blocking child type updates on parent ack into release/1.14.x (#15321)
This pull request was automerged via backport-assistant
2022-11-09 18:22:06 -05:00
hc-github-team-consul-core 1151610ee1
Backport of update ACLs for cluster peering into release/1.14.x (#15318)
This pull request was automerged via backport-assistant
2022-11-09 16:04:17 -05:00
hc-github-team-consul-core 5843befad2
Backport of Log Warnings When Peering With Mesh Gateway Mode None into release/1.14.x (#15310)
This pull request was automerged via backport-assistant
2022-11-09 11:49:24 -05:00
hc-github-team-consul-core 11aaa9bcb3
Backport of Fix mesh gateway configuration with proxy-defaults into release/1.14.x (#15309)
This pull request was automerged via backport-assistant
2022-11-09 11:15:01 -05:00
hc-github-team-consul-core c896ae06bf
Backport of Bring back parameter ServerExternalAddresses in GenerateToken endpoint into release/1.14.x (#15296)
* backport of commit 4199a7c30a

* backport of commit 53be93fb90

* backport of commit 1b0ce4e96c

* backport of commit 1b4ee792cb

* backport of commit 98f3d5aa51

* backport of commit 1f3b30b768

* Fix gomod for merging.

Co-authored-by: Nitya Dhanushkodi <nitya@hashicorp.com>
Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2022-11-08 15:31:17 -06:00
hc-github-team-consul-core 0f05c4741e
Backport of fix(mesh-gateway): remove deregistered service from mesh gateway into release/1.14.x (#15284)
* backport of commit 8083bba320

Co-authored-by: cskh <hui.kang@hashicorp.com>
2022-11-07 20:43:39 -05:00
hc-github-team-consul-core 8071715461
backport of commit 7436a3feb7 (#15280)
This pull request was automerged via backport-assistant
2022-11-07 13:18:09 -05:00