Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure. https://www.consul.io
Go to file
Freddy e02ef16f02
Update HCP bootstrapping to support existing clusters (#16916)
* Persist HCP management token from server config

We want to move away from injecting an initial management token into
Consul clusters linked to HCP. The reasoning is that by using a separate
class of token we can have more flexibility in terms of allowing HCP's
token to co-exist with the user's management token.

Down the line we can also more easily adjust the permissions attached to
HCP's token to limit it's scope.

With these changes, the cloud management token is like the initial
management token in that iit has the same global management policy and
if it is created it effectively bootstraps the ACL system.

* Update SDK and mock HCP server

The HCP management token will now be sent in a special field rather than
as Consul's "initial management" token configuration.

This commit also updates the mock HCP server to more accurately reflect
the behavior of the CCM backend.

* Refactor HCP bootstrapping logic and add tests

We want to allow users to link Consul clusters that already exist to
HCP. Existing clusters need care when bootstrapped by HCP, since we do
not want to do things like change ACL/TLS settings for a running
cluster.

Additional changes:

* Deconstruct MaybeBootstrap so that it can be tested. The HCP Go SDK
  requires HTTPS to fetch a token from the Auth URL, even if the backend
  server is mocked. By pulling the hcp.Client creation out we can modify
  its TLS configuration in tests while keeping the secure behavior in
  production code.

* Add light validation for data received/loaded.

* Sanitize initial_management token from received config, since HCP will
  only ever use the CloudConfig.MangementToken.

* Add changelog entry
2023-04-27 22:27:39 +02:00
.changelog Update HCP bootstrapping to support existing clusters (#16916) 2023-04-27 22:27:39 +02:00
.github Merge pull request #5288 from hashicorp/NET-3648_fix (#17163) 2023-04-26 20:29:43 -04:00
.release Remove version bump from CRT workflow (#16728) 2023-03-23 11:21:27 -05:00
acl server: wire up in-process Resource Service (#16978) 2023-04-18 10:03:23 +01:00
agent Update HCP bootstrapping to support existing clusters (#16916) 2023-04-27 22:27:39 +02:00
api APIGW: Update how status conditions for certificates are handled (#17115) 2023-04-27 15:54:44 +00:00
bench
build-support [COMPLIANCE] Add Copyright and License Headers (#16854) 2023-04-20 12:40:22 +00:00
command Update HCP bootstrapping to support existing clusters (#16916) 2023-04-27 22:27:39 +02:00
connect Copyright headers for missing files/folders (#16708) 2023-03-28 18:48:58 -04:00
contributing Move contributing to docs 2021-08-30 16:17:09 -04:00
docs ci: remove test-integrations CircleCI workflow (#16928) 2023-04-19 16:19:29 +00:00
envoyextensions APIGW Normalize Status Conditions (#16994) 2023-04-24 16:22:55 -04:00
grafana add readme outlining how to edit and publish 2021-01-12 14:47:11 -08:00
internal Cleanup from unblocking the pipeline 🧹 (#17121) 2023-04-26 13:59:58 +01:00
ipaddr Copyright headers for missing files/folders (#16708) 2023-03-28 18:48:58 -04:00
lib Controller Supervision (#17016) 2023-04-25 12:52:35 +01:00
logging Controller Supervision (#17016) 2023-04-25 12:52:35 +01:00
proto Support Envoy's MaxEjectionPercent and BaseEjectionTime config entries for passive health checks (#15979) 2023-04-26 15:59:48 -07:00
proto-public proto-public: document resource service (#17119) 2023-04-26 16:26:54 +01:00
sdk Test: add noCleanup to TestServer stop (#16919) 2023-04-07 20:47:54 -04:00
sentinel Copyright headers for missing files/folders (#16708) 2023-03-28 18:48:58 -04:00
service_os Copyright headers for missing files/folders (#16708) 2023-03-28 18:48:58 -04:00
snapshot Copyright headers for missing files/folders (#16708) 2023-03-28 18:48:58 -04:00
test Support Envoy's MaxEjectionPercent and BaseEjectionTime config entries for passive health checks (#15979) 2023-04-26 15:59:48 -07:00
testrpc Copyright headers for missing files/folders (#16708) 2023-03-28 18:48:58 -04:00
tlsutil Copyright headers for missing files/folders (#16708) 2023-03-28 18:48:58 -04:00
tools/internal-grpc-proxy Copyright headers for missing files/folders (#16708) 2023-03-28 18:48:58 -04:00
troubleshoot APIGW Normalize Status Conditions (#16994) 2023-04-24 16:22:55 -04:00
types Copyright headers for missing files/folders (#16708) 2023-03-28 18:48:58 -04:00
ui ci: remove test-integrations CircleCI workflow (#16928) 2023-04-19 16:19:29 +00:00
version Copyright headers for missing files/folders (#16708) 2023-03-28 18:48:58 -04:00
website Support Envoy's MaxEjectionPercent and BaseEjectionTime config entries for passive health checks (#15979) 2023-04-26 15:59:48 -07:00
.copywrite.hcl Remove UI brand-loader copyright headers as they do not render appropriately (#16835) 2023-03-31 11:29:19 -04:00
.dockerignore
.gitignore grpc: `protoc` plugin for generating gRPC rate limit specifications (#15564) 2023-01-04 16:07:02 +00:00
.golangci.yml Add copyright headers for acl, api and bench folders (#16706) 2023-03-28 16:12:41 -04:00
CHANGELOG.md Fix broken link in changelog (#17093) 2023-04-25 01:32:22 +00:00
Dockerfile Copyright headers for missing files/folders (#16708) 2023-03-28 18:48:58 -04:00
GNUmakefile Support Envoy's MaxEjectionPercent and BaseEjectionTime config entries for passive health checks (#15979) 2023-04-26 15:59:48 -07: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
buf.work.yaml Copyright headers for missing files/folders (#16708) 2023-03-28 18:48:58 -04:00
fixup_acl_move.sh Copyright headers for missing files/folders (#16708) 2023-03-28 18:48:58 -04:00
go.mod Update HCP bootstrapping to support existing clusters (#16916) 2023-04-27 22:27:39 +02:00
go.sum Update HCP bootstrapping to support existing clusters (#16916) 2023-04-27 22:27:39 +02:00
main.go Copyright headers for missing files/folders (#16708) 2023-03-28 18:48:58 -04: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.