Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
 
 
 
 
 
 
Go to file
hc-github-team-consul-core fbfe9c435f
Backport of [NET-4897] net/http host header is now verified and request.host that contains socked now error into release/1.15.x (#18144)
## Backport

This PR is auto-generated from #18129 to be assessed for backporting due
to the inclusion of the label backport/1.15.


🚨
>**Warning** automatic cherry-pick of commits failed. If the first
commit failed,
you will see a blank no-op commit below. If at least one commit
succeeded, you
will see the cherry-picked commits up to, _not including_, the commit
where
the merge conflict occurred.

The person who merged in the original PR is:
@jmurret
This person should manually cherry-pick the original PR into a new
backport PR,
and close this one when the manual backport PR is merged in.

> merge conflict error: POST
https://api.github.com/repos/hashicorp/consul/merges: 409 Merge conflict
[]



The below text is copied from the body of the original PR.

---

### Description

This is related to https://github.com/hashicorp/consul/pull/18124 where
we pinned the go versions in CI to 1.20.5 and 1.19.10.

go 1.20.6 and 1.19.11 now validate request host headers for validity,
including the hostname cannot be prefixed with slashes.

For local communications (npipe://, unix://), the hostname is not used,
but we need valid and meaningful hostname. Prior versions go Go would
clean the host header, and strip slashes in the process, but go1.20.6
and go1.19.11 no longer do, and reject the host header. Around the
community we are seeing that others are intercepting the req.host and if
it starts with a slash or ends with .sock, they changing the host to
localhost or another dummy value.

[client: define a "dummy" hostname to use for local connections by
thaJeztah · Pull Request #45942 ·
moby/moby](https://github.com/moby/moby/pull/45942)

### Testing & Reproduction steps

Check CI tests.

### Links
* [ ] updated test coverage
* [ ] external facing docs updated
* [ ] appropriate backport labels added
* [ ] not a security concern


---

<details>
<summary> Overview of commits </summary>

- 747195f7aa -
516492420b -
f4d6ca19f8 -
a47407115e -
8c03b36e00 -
c50b17c46e -
cc8eaf8213 -
ce10138d07 -
133c7ecbf5 -
b0bd440d8f -
8f223080c0 -
f8578b0749 -
4452224d6a -
19634a4b3b

</details>

---------

Co-authored-by: temp <temp@hashicorp.com>
Co-authored-by: John Murret <john.murret@hashicorp.com>
2023-07-17 09:36:51 -06:00
.changelog Backport of Passes configured role name to Vault for AWS auth in Connect CA into release/1.15.x (#18098) 2023-07-12 16:36:28 +00:00
.github Backport of [NET-4897] net/http host header is now verified and request.host that contains socked now error into release/1.15.x (#18144) 2023-07-17 09:36:51 -06:00
.release backport of commit a717be7c75 (#17563) 2023-06-02 17:23:28 +00:00
acl Synthesize anonymous token pre-bootstrap when needed (#16200) 2023-02-09 20:34:02 +00:00
agent Backport of Passes configured role name to Vault for AWS auth in Connect CA into release/1.15.x (#18098) 2023-07-12 16:36:28 +00:00
api Backport of [NET-4897] net/http host header is now verified and request.host that contains socked now error into release/1.15.x (#18144) 2023-07-17 09:36:51 -06:00
bench
build-support Backport of Reference hashicorp/consul instead of consul for Docker image into release/1.15.x (#17919) 2023-06-28 00:43:29 +00:00
command Backport of [OSS] Fix initial_fetch_timeout to wait for all xDS resources into release/1.15.x (#18064) 2023-07-10 17:43:45 -04:00
connect emit metrics for global rate limiting (#15891) 2023-01-06 17:49:33 -06:00
contributing Move contributing to docs 2021-08-30 16:17:09 -04:00
docs ci: remove test-integrations CircleCI workflow (#16928) (#17049) 2023-04-19 11:28:59 -06:00
envoyextensions Include changes from v1.15.4 in 1.15.x (#17892) 2023-06-27 15:45:35 -06:00
grafana add readme outlining how to edit and publish 2021-01-12 14:47:11 -08:00
internal Backport of [OSS] gRPC Blocking Queries into release/1.15.x (#17441) 2023-05-24 11:35:45 -04:00
ipaddr Ensure Consul is IPv6 compliant (#5468) 2019-06-04 10:02:38 -04:00
lib Backport of hoststats: add package for collecting host statistics including cpu memory and disk usage into release/1.15.x (#17532) 2023-05-31 18:09:13 +00:00
logging Run config entry controller routines on leader (#16054) 2023-01-25 12:21:46 -06:00
proto Backport of [OSS] gRPC Blocking Queries into release/1.15.x (#17441) 2023-05-24 11:35:45 -04:00
proto-public Backport of [OSS] security: update go to 1.20.1 into release/1.15.x (#16314) 2023-02-17 21:00:25 +00:00
sdk backport of commit 9862a83324 (#16930) 2023-04-08 01:12:41 +00:00
sentinel re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
service_os re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
snapshot Backport of snapshot: some improvments to the snapshot process into release/1.15.x (#17277) 2023-05-09 21:18:38 +00:00
test Backport of [OSS] Fix initial_fetch_timeout to wait for all xDS resources into release/1.15.x (#18064) 2023-07-10 17:43:45 -04:00
testrpc Pass remote addr of incoming HTTP requests through to RPC(..) calls (#15700) 2022-12-14 09:24:22 -06:00
tlsutil Backport of [OSS] security: update go to 1.20.1 into release/1.15.x (#16314) 2023-02-17 21:00:25 +00:00
tools/internal-grpc-proxy grpc: rename public/private directories to external/internal (#13721) 2022-07-13 16:33:48 +01:00
troubleshoot Backport of APIGW Normalize Status Conditions into release/1.15.x (#17844) 2023-06-23 14:05:11 -04:00
types agent: convert listener config to TLS types (#12522) 2022-03-24 15:32:25 -04:00
ui backport of commit 4669c09db2 (#18073) 2023-07-12 12:43:18 +03:00
version Include changes from v1.15.4 in 1.15.x (#17892) 2023-06-27 15:45:35 -06:00
website Backport of Docs: fix unmatched bracket for health checks page into release/1.15.x (#18136) 2023-07-14 14:13:59 +00:00
.dockerignore Update the scripting 2018-06-14 21:42:47 -04:00
.gitignore grpc: `protoc` plugin for generating gRPC rate limit specifications (#15564) 2023-01-04 16:07:02 +00:00
.golangci.yml Backport of Sync .golangci.yml from ENT into release/1.15.x (#17182) 2023-04-28 13:14:27 -05:00
CHANGELOG.md Include changes from v1.15.4 in 1.15.x (#17892) 2023-06-27 15:45:35 -06:00
Dockerfile backport of commit 87e1f04178 (#17516) 2023-05-30 17:06:08 +00:00
GNUmakefile Backport of Reference hashicorp/consul instead of consul for Docker image into release/1.15.x (#17919) 2023-06-28 00:43:29 +00:00
LICENSE [COMPLIANCE] Update MPL-2.0 LICENSE (#14964) 2022-11-09 12:24:14 -06:00
NOTICE.md add copyright notice file 2018-07-09 10:58:26 -07:00
README.md Fixed broken links referring to tutorials running as local agent (#14954) 2022-10-11 13:01:29 -07:00
Vagrantfile Adds a basic Linux Vagrant setup, stolen from Nomad. 2017-10-06 08:10:12 -07:00
fixup_acl_move.sh Fixup script 2 2022-04-05 14:52:43 -07:00
go.mod deps: coredns v1.10.1 (#17933) 2023-06-28 17:02:29 +00:00
go.sum deps: coredns v1.10.1 (#17933) 2023-06-28 17:02:29 +00:00
main.go Backport of [OSS] security: update go to 1.20.1 into release/1.15.x (#16314) 2023-02-17 21:00:25 +00:00

README.md

Consul logo Consul

Docker Pulls Go Report Card

Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.

Consul provides several key features:

  • Multi-Datacenter - Consul is built to be datacenter aware, and can support any number of regions without complex configuration.

  • Service Mesh - Consul Service Mesh enables secure service-to-service communication with automatic TLS encryption and identity-based authorization. Applications can use sidecar proxies in a service mesh configuration to establish TLS connections for inbound and outbound connections with Transparent Proxy.

  • Service Discovery - Consul makes it simple for services to register themselves and to discover other services via a DNS or HTTP interface. External services such as SaaS providers can be registered as well.

  • Health Checking - Health Checking enables Consul to quickly alert operators about any issues in a cluster. The integration with service discovery prevents routing traffic to unhealthy hosts and enables service level circuit breakers.

  • Key/Value Storage - A flexible key/value store enables storing dynamic configuration, feature flagging, coordination, leader election and more. The simple HTTP API makes it easy to use anywhere.

Consul runs on Linux, macOS, FreeBSD, Solaris, and Windows and includes an optional browser based UI. A commercial version called Consul Enterprise is also available.

Please note: We take Consul's security and our users' trust very seriously. If you believe you have found a security issue in Consul, please responsibly disclose by contacting us at security@hashicorp.com.

Quick Start

A few quick start guides are available on the Consul website:

Documentation

Full, comprehensive documentation is available on the Consul website: https://consul.io/docs

Contributing

Thank you for your interest in contributing! Please refer to CONTRIBUTING.md for guidance. For contributions specifically to the browser based UI, please refer to the UI's README.md for guidance.