Commit graph

20412 commits

Author SHA1 Message Date
hc-github-team-consul-core b2a57ae0fd
Backport of parse config protocol on write to optimize disco-chain compilation into release/1.16.x (#19858)
* parse config protocol on write to optimize disco-chain compilation (#19829)

* parse config protocol on write to optimize disco-chain compilation

* add changelog

* add test fixes from PR

* add missing config field

---------

Co-authored-by: Dhia Ayachi <dhia@hashicorp.com>
2023-12-07 15:37:52 -05:00
hc-github-team-consul-core c279233d2b
Backport of [NET-6650] Bump go version to 1.20.12 into release/1.16.x (#19845)
backport of commit af6045cdf1bfe8589d4ff5f03ffd327a39b62ced

Co-authored-by: Ronald Ekambi <ronekambi@gmail.com>
Co-authored-by: Ronald <roncodingenthusiast@users.noreply.github.com>
2023-12-07 14:00:25 -05:00
Michael Zalimeni 3a0b34b59e
chore: update version and changelog post-1.16.3 (#19853)
chore: update version to 1.16.4-dev
2023-12-07 17:35:07 +00:00
John Buonassisi 1a9f2944eb
Backport stats flush interval 1.16.x (#19849)
* Default "stats_flush_interval" to 1 minute for Consul Telemetry Collector (#19663)

* Set default of 1m for StatsFlushInterval when the collector is setup

* Add documentation on the stats_flush_interval value

* Do not default in two conditions 1) preconfigured sinks exist 2) preconfigured flush interval exists

* Fix wording of docs

* Add changelog

* Fix docs

(cherry picked from commit bfb3a43648634e117c8405d6a6e3cc837fb8e3dc)

* fix pr labeller

---------

Co-authored-by: Ashvitha <ashvitha.sridharan@hashicorp.com>
2023-12-06 13:18:36 -08:00
hc-github-team-consul-core 236ceb3b40
Backport of improve client RPC metrics consistency into release/1.16.x (#19842)
* backport of commit 06507fe053f8777b12c8a0a54e062df1fb111a52

* backport of commit 14e160573dbc9d644cb045af7eda5da0d03447d0

* backport of commit 088ec70f902e79a101669fbb76830fe356b23982

---------

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>
2023-12-06 14:05:34 -05:00
lornasong fa9de6f8b4
Manual Backport of [Cloud][CC-6925] Updates to pushing server state into release/1.16.x (#19818)
* [Cloud][CC-6925] Updates to pushing server state (#19682)

* Upgrade hcp-sdk-go to latest version v0.73

Changes:
- go get github.com/hashicorp/hcp-sdk-go
- go mod tidy

* From upgrade: regenerate protobufs for upgrade from 1.30 to 1.31

Ran: `make proto`

Slack: https://hashicorp.slack.com/archives/C0253EQ5B40/p1701105418579429

* From upgrade: fix mock interface implementation

After upgrading, there is the following compile error:

cannot use &mockHCPCfg{} (value of type *mockHCPCfg) as "github.com/hashicorp/hcp-sdk-go/config".HCPConfig value in return statement: *mockHCPCfg does not implement "github.com/hashicorp/hcp-sdk-go/config".HCPConfig (missing method Logout)

Solution: update the mock to have the missing Logout method

* From upgrade: Lint: remove usage of deprecated req.ServerState.TLS

Due to upgrade, linting is erroring due to usage of a newly deprecated field

22:47:56 [consul]: make lint
--> Running golangci-lint (.)
agent/hcp/testing.go:157:24: SA1019: req.ServerState.TLS is deprecated: use server_tls.internal_rpc instead. (staticcheck)
                time.Until(time.Time(req.ServerState.TLS.CertExpiry)).Hours()/24,
                                     ^

* From upgrade: adjust oidc error message

From the upgrade, this test started failing:

=== FAIL: internal/go-sso/oidcauth TestOIDC_ClaimsFromAuthCode/failed_code_exchange (re-run 2) (0.01s)
    oidc_test.go:393: unexpected error: Provider login failed: Error exchanging oidc code: oauth2: "invalid_grant" "unexpected auth code"

Prior to the upgrade, the error returned was:
```
Provider login failed: Error exchanging oidc code: oauth2: cannot fetch token: 401 Unauthorized\nResponse: {\"error\":\"invalid_grant\",\"error_description\":\"unexpected auth code\"}\n
```

Now the error returned is as below and does not contain "cannot fetch token"
```
Provider login failed: Error exchanging oidc code: oauth2: "invalid_grant" "unexpected auth code"

```

* Update AgentPushServerState structs with new fields

HCP-side changes for the new fields are in:
https://github.com/hashicorp/cloud-global-network-manager-service/pull/1195/files

* Minor refactor for hcpServerStatus to abstract tlsInfo into struct

This will make it easier to set the same tls-info information to both
 - status.TLS (deprecated field)
 - status.ServerTLSMetadata (new field to use instead)

* Update hcpServerStatus to parse out information for new fields

Changes:
 - Improve error message and handling (encountered some issues and was confused)
 - Set new field TLSInfo.CertIssuer
 - Collect certificate authority metadata and set on TLSInfo.CertificateAuthorities
 - Set TLSInfo on both server.TLS and server.ServerTLSMetadata.InternalRPC

* Update serverStatusToHCP to convert new fields to GNM rpc

* Add changelog

* Feedback: connect.ParseCert, caCerts

* Feedback: refactor and unit test server status

* Feedback: test to use expected struct

* Feedback: certificate with intermediate

* Feedback: catch no leaf, remove expectedErr

* Feedback: update todos with jira ticket

* Feedback: mock tlsConfigurator

* Run make proto for files in 1.16 not in main

* update licensing per 1.16 licensing
2023-12-06 13:35:03 -05:00
Ashesh Vidyut 5e640ac499
NET-3860 - [Supportability] consul troubleshoot CLI for verifying ports (#19836)
* NET-3860

* fix go mod

* remove license

* dummy commit to trigger ci

* fix go mod

* fix go mod tidy
2023-12-06 15:27:26 +05:30
Matt Keeler 8b3f1dcbdb
Pin lint-consul-retry to v1.3.0 (#19777)
The latest version finds more issues which are fixed on main and not being backported.
2023-11-29 21:37:51 +00:00
hc-github-team-consul-core 5507e9d798
Backport of Docs: FIPS - add cluster peering info into release/1.16.x (#19778)
* backport of commit 854ccee4d4f50852980468e6617dc7fc40ad3208

* backport of commit 812cf288bdb115fbfa2a8f84e7347d76e86a0c4c

* backport of commit af8aef88a50a09ef4462a7d7745162d29ecc26d3

* backport of commit 5111c406ecd0e12309bfc775c504258f085843ae

---------

Co-authored-by: Jeff-Apple <79924108+Jeff-Apple@users.noreply.github.com>
2023-11-29 13:16:59 -08:00
John Maguire 0cd190f8d9
[NET-5688] APIGateway UI Topology Fixes (#19657) Backport (#19763)
* [NET-5688] APIGateway UI Topology Fixes (#19657)

* Update catalog and ui endpoints to show APIGateway in gateway service
topology view

* Added initial implementation for service view

* updated ui

* Fix topology view for gateways

* Adding tests for gw controller

* remove unused args

* Undo formatting changes

* Fix call sites for upstream/downstream gw changes

* Add config entry tests

* Fix function calls again

* Move from ServiceKey to ServiceName, cleanup from PR review

* Add additional check for length of services in bound apigateway for
IsSame comparison

* fix formatting for proto

* gofmt

* Add DeepCopy for retrieved BoundAPIGateway

* gofmt

* gofmt

* Rename function to be more consistent

* Remove busl license
2023-11-29 11:22:56 -05:00
Michael Zalimeni 86cf809a62
[NET-6232] docs: Update consul-k8s Helm chart docs (1.2.x) (#19698)
docs: Update consul-k8s Helm chart docs (1.2.x)

Sync changes not yet represented in docs and relevant before the next
patch release.
2023-11-27 15:15:51 -08:00
hc-github-team-consul-core b3d1dd1493
Backport of ci: Run go mod tidy check on submodules into release/1.16.x (#19747)
backport of commit 5316676bb671a973d4a04a9d0fd1db7b922cea86

Co-authored-by: Michael Zalimeni <michael.zalimeni@hashicorp.com>
2023-11-27 21:41:53 +00:00
hc-github-team-consul-core 9192970c5d
Backport of [NET-6617] security: Bump github.com/golang-jwt/jwt/v4 to 4.5.0 into release/1.16.x (#19740)
backport of commit fbb8be55f53f5930663fafd2ba2268717ef2edf2

Co-authored-by: Michael Zalimeni <michael.zalimeni@hashicorp.com>
2023-11-27 16:20:00 +00:00
Valeriia Ruban dae785fe3e
chore: add suffix to consul version in sidenav (#19711) 2023-11-21 21:16:47 -07:00
hc-github-team-consul-core 0846916941
Backport of fix a panic in the CLI when deleting an acl policy with an unknown name into release/1.16.x (#19691)
* backport of commit e07f4da212b2957e90550b7de11f6a783e0c374b

* backport of commit eecf61b67f4bfe14007d3057ed174fe7c185fac9

---------

Co-authored-by: Dhia Ayachi <dhia@hashicorp.com>
2023-11-20 15:01:28 +00:00
hc-github-team-consul-core 6ccc8319c4
Backport of [Docs] Update admin-partitions.mdx into release/1.16.x (#19631)
* backport of commit 54ecfa6b93c4f66a05e87819cea6e6291dae1fd7

* backport of commit a5bc545f95b47c4c910e35ec21175cb443c2dd5d

---------

Co-authored-by: am-ak <114914687+am-ak@users.noreply.github.com>
2023-11-14 09:28:24 -08:00
hc-github-team-consul-core 4c10c7ef58
Backport of Fix parts of admin-partitions guide into release/1.16.x (#19625)
backport of commit d4ba678e656107cb568af968adccd3755b35681b

Co-authored-by: Joshua Timmons <joshua.timmons1@gmail.com>
2023-11-14 14:49:31 +00:00
hc-github-team-consul-core 2a7a87e67e
Backport of increasing unit tests timeout from 10m to 30m into release/1.16.x (#19425)
backport of commit 26cb1f6acfab3c3e35d06ae27683a2ac3399aa1f

Co-authored-by: Michael Zalimeni <michael.zalimeni@hashicorp.com>
2023-11-09 19:37:17 +00:00
hc-github-team-consul-core 7c080d5fa1
Backport of Fix typo in GatewayClassConfig docs into release/1.16.x (#19565)
* Fix typo in GatewayClassConfig docs

* Fix broken links

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
2023-11-08 20:52:22 +00:00
hc-github-team-consul-core 8c6005a245
Backport of test: update certs for 10 year expiry into release/1.16.x (#19560)
backport of commit d6283a9352fe46e20206a4ab9ed76ff0c04bde53

Co-authored-by: DanStough <dan.stough@hashicorp.com>
2023-11-07 20:12:16 +00:00
hc-github-team-consul-core fa78010b04
Backport of Fix more test flakes into release/1.16.x (#19545)
* backport of commit 5cb614ed7323303a5e55a2648410cbd9ec5099bd

* Fix flaky metrics tests.

---------

Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2023-11-07 10:46:58 -06:00
hc-github-team-consul-core d7a81cb144
Backport of [NET-6459] Fix issue with wanfed lan ip conflicts. into release/1.16.x (#19522)
backport of commit a47995f72dba14020cc50e69eaffdf6b131159ae

Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2023-11-06 15:14:59 +00:00
hc-github-team-consul-core de28b7fdce
Backport of Shuffle CICD tests to spread worker load. into release/1.16.x (#19519)
backport of commit b8a18c4fac7778028dd01c03783e7abf63d0e7c2

Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
2023-11-06 14:41:13 +00:00
Tyler Wendlandt 9860f68703
ui: 1.16.x Back to HCP link conditions (#19443)
Only show back to hcp link if CONSUL_HCP_URL is present
2023-11-03 15:51:59 -06:00
Ronald 6eca67fa81
changelog for consul-k8s 1.2.3 (#19497) 2023-11-02 19:03:08 -04:00
hc-github-team-consul-core 9569beb73d
Backport of build: ensure we pull through the hashicorp proxy instead of going directly to the docker hub into release/1.16.x (#19485)
backport of commit 5ab1e9888e96c8f0af46d5145031456e3a3dd461

Co-authored-by: R.B. Boyer <rb@hashicorp.com>
2023-11-02 18:13:25 +00:00
hc-github-team-consul-core 566b7c105a
Backport of Regen expired test certs into release/1.16.x (#19478)
backport of commit d399654096b534615ae6bdb62a13eae69107c9cc

Co-authored-by: Semir Patel <semir.patel@hashicorp.com>
2023-11-02 15:44:39 +00:00
John Maguire 3c3084d345
Update typo in l7-traffic service splitting example (#19468) 2023-11-01 15:22:52 -04:00
hc-github-team-consul-core 1a977a1439
Backport of NET-5186 Add NET_BIND_SERVICE capability to consul-dataplane requirements into release/1.16.x (#19451)
Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
2023-11-01 14:07:55 -04:00
Blake Covarrubias 588e108c51
Backport of docs: Fix Kubernetes CRD example configs into release/1.16.x (#19438)
docs: Fix Kubernetes CRD example configs (#18878)

Fixes configuration examples for several Consul Kubernetes CRDs. The
CRDs were missing required fields such as `apiVersion`, `metadata`,
and `spec`.

Co-authored-by: Tu Nguyen <im2nguyen@gmail.com>
2023-10-31 09:07:06 -04:00
hc-github-team-consul-core f0c23587e0
Backport of Golden File Tests for TermGW w/ Cluster Peering into release/1.16.x (#19192)
backport of commit 1fffd233b3eba4e1d85be58808e73f1daa412e4f

Co-authored-by: Thomas Eckert <teckert@hashicorp.com>
2023-10-30 11:04:47 -04:00
Michael Zalimeni 57265a06f0
Backport of [NET-6138] security: Bump google.golang.org/grpc to 1.56.3 (CVE-2023-44487) to release/1.16.x (#19420)
Bump google.golang.org/grpc to 1.56.3

This resolves [CVE-2023-44487](https://nvd.nist.gov/vuln/detail/CVE-2023-44487).

Co-authored-by: Chris Thain <chris.m.thain@gmail.com>
2023-10-30 08:58:11 -04:00
hc-github-team-consul-core 4c4677f24e
Backport of Use strict DNS for mesh gateways with hostnames into release/1.16.x (#19395)
Use strict DNS for mesh gateways with hostnames

Co-authored-by: Andrew Stucki <andrew.stucki@hashicorp.com>
2023-10-27 12:30:08 -04:00
hc-github-team-consul-core 3d7dc247fa
Backport of Fix casing in example yaml config into release/1.16.x (#19407)
backport of commit 2da2736c3c9df2b1888894d3d441768abe288efb

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
2023-10-27 14:22:30 +00:00
hc-github-team-consul-core f77d61aafc
Backport of Add note about service upstream env var dot broken into release/1.16.x (#19398)
backport of commit 8a0896d379abf684e82a8a1f436a5758402e94f6

Co-authored-by: Tu Nguyen <im2nguyen@gmail.com>
2023-10-26 20:52:45 +00:00
hc-github-team-consul-core 09bc2c41b7
Backport of chor: update rule to run frontend github tasks when changes are made … into release/1.16.x (#19065) 2023-10-26 12:36:52 -07:00
Derek Menteer 19f9de2224
Backport of Add grpc keepalive configuration into release/1.16.x (#19339) (#19346)
Add grpc keepalive configuration. (#19339)

Prior to the introduction of this configuration, grpc keepalive messages were
sent after 2 hours of inactivity on the stream. This posed issues in various
scenarios where the server-side xds connection balancing was unaware that envoy
instances were uncleanly killed / force-closed, since the connections would
only be cleaned up after ~5 minutes of TCP timeouts occurred. Setting this
config to a 30 second interval with a 20 second timeout ensures that at most,
it should take up to 50 seconds for a dead xds connection to be closed.
2023-10-24 08:52:05 -05:00
Chris S. Kim d547958f2c
[1.16.x] Vault CA bugfixes (#19285) (#19336)
Vault CA bugfixes (#19285)

* Re-add retry logic to Vault token renewal

* Fix goroutine leak

* Add test for detecting goroutine leak

* Add changelog

* Rename tests

* Add comment
2023-10-23 14:14:05 +00:00
hc-github-team-consul-core 11ee74d054
Backport of skip envoy version check in ci into release/1.16.x (#19316)
* no-op commit due to failed cherry-picking

* Update verify-envoy-version.yml

* Update verify-envoy-version.yml

---------

Co-authored-by: temp <temp@hashicorp.com>
Co-authored-by: Anita Akaeze <anita.akaeze@hashicorp.com>
2023-10-20 11:47:23 -07:00
Chris Thain 963f609b6d
release/1.16.x - Update supported Envoy versions (#19273) 2023-10-19 14:45:33 -07:00
hc-github-team-consul-core abb6ce3bc9
Backport of fix: allow snake case keys for ip based rate limit config entry into release/1.16.x (#19292)
* backport of commit 5c2deeb4c6b4b3bb1a1e5eadef52fd9ee7dda99a

* backport of commit e91fd9c7d7916db49c4976d29b42b29ba3ab2311

---------

Co-authored-by: Poonam Jadhav <poonam.jadhav@hashicorp.com>
2023-10-19 16:28:53 +00:00
hc-github-team-consul-core e61a635c67
Backport of build(docker): always publish full and minor version tags for dev images into release/1.16.x (#19281)
Backport of build(docker): always publish full and minor version tags for dev images into release/1.17.x (#19282)

backport of commit c6bb4a534106c169d74c15119e2f220f79953ae2

Co-authored-by: DanStough <dan.stough@hashicorp.com>
2023-10-18 17:07:27 -04:00
hc-github-team-consul-core 4b304d4934
Backport of docs: Fix example control-plane-request-limit HCL and JSON into release/1.16.x (#19254)
backport of commit e5b6120abb51d759c74c727bdb54f2f328367d0d

Co-authored-by: Blake Covarrubias <blake@covarrubi.as>
2023-10-17 19:54:32 +00:00
hc-github-team-consul-core adefe8d16a
Backport of [NET-5944] security: Update Go version to 1.20.10 and x/net to 0.17.0 into release/1.16.x (#19234)
* backport of commit d7d9de95642a625307fecc8cff29bda1c22fa983

* backport of commit 0794b1ce74d37623d50f5e52cb289a48e8558d18

---------

Co-authored-by: Michael Zalimeni <michael.zalimeni@hashicorp.com>
2023-10-17 00:12:24 +00:00
hc-github-team-consul-core 0833e8b50b
Backport of Fix BUSL license checker to skip >= 1.17.x target branches (#19152) into release/1.16.x (#19157)
backport of commit 02bfe1dd83d09db6d99c9200c67c8699dbea9aac

Co-authored-by: Semir Patel <semir.patel@hashicorp.com>
2023-10-11 22:38:50 +00:00
Nathan Coleman 7575004535
NET-5457 Support multiple virtual hosts for a single API gateway listener (#19120)
* Modify struct to support multiple routes for a given readyListener

* Rework route construction for API gateways

* Add changelog entry

* Add golden file test for API gateway w/ multiple hostnames on a single listener

* Build up routes with deterministic ordering

* Improve docstring
2023-10-10 14:21:25 -04:00
hc-github-team-consul-core 6b5734f4ee
Backport of Update vault ca provider namespace configuration into release/1.16.x (#19127)
* backport of commit 6d3a7fd9a286b4ff4fc7ff47054c1ba245f6f959

* backport of commit 8868f675fb50b5f9e1e6c303140ae1578a9421b1

---------

Co-authored-by: Chris Thain <chris.m.thain@gmail.com>
2023-10-10 14:12:43 +00:00
hc-github-team-consul-core b11f007fca
Backport of Replace hub with gh for member roles on JIRA sync checks into release/1.16.x (#19122)
backport of commit ff451f3897377544132c10c9a4a46c741b0042f6

Co-authored-by: David Yu <dyu@hashicorp.com>
2023-10-09 17:52:39 +00:00
hc-github-team-consul-core c7e3db2c60
Backport of NET-4135 - Fix NodeMeta filtering Catalog List Services API into release/1.16.x (#19113)
* backport of commit cef8e3d27b2bab062d44e8d55f40a2e97c8efe3b

* NET-4135 - Fix NodeMeta filtering Catalog List Services API (#18322)

* logs for debugging

* Init

* white spaces fix

* added change log

* Fix tests

* fix typo

* using queryoptionfilter to populate args.filter

* tests

* fix test

* fix tests

* fix tests

* fix tests

* fix tests

* fix variable name

* fix tests

* fix tests

* fix tests

* Update .changelog/18322.txt

Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com>

* fix change log

* address nits

* removed unused line

* doing join only when filter has nodemeta

* fix tests

* fix tests

* Update agent/consul/catalog_endpoint.go

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

* fix tests

* removed unwanted code

---------

Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com>
Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>

* removed unwanted log lines

* removed unwanted log lines

---------

Co-authored-by: absolutelightning <ashesh.vidyut@hashicorp.com>
Co-authored-by: Ashesh Vidyut <134911583+absolutelightning@users.noreply.github.com>
Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com>
Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>
2023-10-09 10:35:58 +05:30
hc-github-team-consul-core 2133fd40c6
Backport of Allow connections through Terminating Gateways from peered clusters NET-3463 into release/1.16.x (#19092)
Allow connections through Terminating Gateways from peered clusters NET-3463 (#18959)

* Add InboundPeerTrustBundle maps to Terminating Gateway

* Add notify and cancelation of watch for inbound peer trust bundles

* Pass peer trust bundles to the RBAC creation function

* Regenerate Golden Files

* add changelog, also adds another spot that needed peeredTrustBundles

* Add basic test for terminating gateway with peer trust bundle

* Add intention to cluster peered golden test

* rerun codegen

* update changelog

* really update the changelog

---------

Co-authored-by: Thomas Eckert <teckert@hashicorp.com>
Co-authored-by: Melisa Griffin <melisa.griffin@hashicorp.com>
2023-10-05 22:38:57 +00:00