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
Nitya Dhanushkodi 78b170ad50
xds controller: setup watches for and compute leaf cert references in ProxyStateTemplate, and wire up leaf cert manager dependency (#18756)
* Refactors the leafcert package to not have a dependency on agent/consul and agent/cache to avoid import cycles. This way the xds controller can just import the leafcert package to use the leafcert manager.

The leaf cert logic in the controller:
* Sets up watches for leaf certs that are referenced in the ProxyStateTemplate (which generates the leaf certs too).
* Gets the leaf cert from the leaf cert cache
* Stores the leaf cert in the ProxyState that's pushed to xds
* For the cert watches, this PR also uses a bimapper + a thin wrapper to map leaf cert events to related ProxyStateTemplates

Since bimapper uses a resource.Reference or resource.ID to map between two resource types, I've created an internal type for a leaf certificate to use for the resource.Reference, since it's not a v2 resource.
The wrapper allows mapping events to resources (as opposed to mapping resources to resources)

The controller tests:
Unit: Ensure that we resolve leaf cert references
Lifecycle: Ensure that when the CA is updated, the leaf cert is as well

Also adds a new spiffe id type, and adds workload identity and workload identity URI to leaf certs. This is so certs are generated with the new workload identity based SPIFFE id.

* Pulls out some leaf cert test helpers into a helpers file so it
can be used in the xds controller tests.
* Wires up leaf cert manager dependency
* Support getting token from proxytracker
* Add workload identity spiffe id type to the authorize and sign functions



---------

Co-authored-by: John Murret <john.murret@hashicorp.com>
2023-09-12 12:56:43 -07:00
.changelog [NET-5574] Update Go version to 1.20.8 (#18742) 2023-09-12 11:40:51 -04:00
.github [NET-5574] Update Go version to 1.20.8 (#18742) 2023-09-12 11:40:51 -04:00
.release OSS -> CE (community edition) changes (#18517) 2023-08-22 09:46:03 -05:00
acl OSS -> CE (community edition) changes (#18517) 2023-08-22 09:46:03 -05:00
agent xds controller: setup watches for and compute leaf cert references in ProxyStateTemplate, and wire up leaf cert manager dependency (#18756) 2023-09-12 12:56:43 -07:00
api Net-4292/list command (#18649) 2023-09-11 10:06:00 -04:00
bench
build-support [NET-5574] Update Go version to 1.20.8 (#18742) 2023-09-12 11:40:51 -04:00
command Run copyright after running deep-copy as part of the Makefile/CI (#18741) 2023-09-11 13:50:52 -04:00
connect [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
contributing Move contributing to docs 2021-08-30 16:17:09 -04:00
docs update guide to reflect tenancy and scope (#18687) 2023-09-06 11:11:43 -04:00
envoyextensions Net-2713/resource apply command (#18610) 2023-09-08 12:20:14 -04:00
grafana grafana: add the panel resource usage of connect injector (#18247) 2023-07-24 13:10:22 -04:00
internal xds controller: setup watches for and compute leaf cert references in ProxyStateTemplate, and wire up leaf cert manager dependency (#18756) 2023-09-12 12:56:43 -07:00
ipaddr [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
lib OSS -> CE (community edition) changes (#18517) 2023-08-22 09:46:03 -05:00
logging Run copyright after running deep-copy as part of the Makefile/CI (#18741) 2023-09-11 13:50:52 -04:00
proto xds controller: setup watches for and compute leaf cert references in ProxyStateTemplate, and wire up leaf cert manager dependency (#18756) 2023-09-12 12:56:43 -07:00
proto-public mesh: create new routes-controller to reconcile xRoute types into a ComputedRoutes resource (#18460) 2023-09-12 12:08:51 -05:00
sdk feat: add experiments flag to testserver sdk (#18541) 2023-08-23 10:23:36 -04:00
sentinel OSS -> CE (community edition) changes (#18517) 2023-08-22 09:46:03 -05:00
service_os [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
snapshot [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
test added time stamps (#18757) 2023-09-12 09:22:31 +00:00
test-integ Run copyright after running deep-copy as part of the Makefile/CI (#18741) 2023-09-11 13:50:52 -04:00
testing/deployer ENT port: test-integ/peering: peer through mesh gateway [NET-4609] (#18605) 2023-09-08 12:04:56 -04:00
testrpc [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
tlsutil [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
tools/internal-grpc-proxy [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
troubleshoot Net-2713/resource apply command (#18610) 2023-09-08 12:20:14 -04:00
types [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
ui feat: copy edits for built-in policy alert (#18655) 2023-09-01 13:58:03 -07:00
version [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
website k8s: Update audit-logging docs to include K8s examples (#18721) 2023-09-10 11:10:28 -07:00
.copywrite.hcl chore: fix missing/incorrect license headers (#18555) 2023-08-22 17:23:54 -05:00
.dockerignore
.gitignore add peering_commontopo tests [NET-3700] (#17951) 2023-07-18 16:41:30 -07:00
.golangci.yml dataplane: Allow getting bootstrap parameters when using V2 APIs (#18504) 2023-09-06 16:46:25 -06:00
CHANGELOG.md Add known issue notice for #18636. (#18650) 2023-09-01 15:30:52 -05:00
Dockerfile [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
Dockerfile-windows Envoy Integration Test Windows (#18007) 2023-07-21 20:26:00 +05:30
LICENSE [COMPLIANCE] License update (#18479) 2023-08-16 09:42:07 -05:00
Makefile Run copyright after running deep-copy as part of the Makefile/CI (#18741) 2023-09-11 13:50:52 -04:00
NOTICE.md
README.md README - re-order badges and update hub link (#18498) 2023-08-16 18:41:43 -07:00
buf.work.yaml [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
fixup_acl_move.sh [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
go.mod mesh: create new routes-controller to reconcile xRoute types into a ComputedRoutes resource (#18460) 2023-09-12 12:08:51 -05:00
go.sum [NET-5325] ACL templated policies support in tokens and roles (#18708) 2023-09-08 12:45:24 +00:00
main.go [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00

README.md

Consul logo Consul

License: BUSL-1.1 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.

  • Dynamic App Configuration - An HTTP API that allows users to store indexed objects within Consul, for storing configuration parameters and application metadata.

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.