open-consul/agent
Chris S. Kim 8671448b73
Connect CA Primary Provider refactor (#16749)
* Rename Intermediate cert references to LeafSigningCert

Within the Consul CA subsystem, the term "Intermediate"
is confusing because the meaning changes depending on
provider and datacenter (primary vs secondary). For
example, when using the Consul CA the "ActiveIntermediate"
may return the root certificate in a primary datacenter.

At a high level, we are interested in knowing which
CA is responsible for signing leaf certs, regardless of
its position in a certificate chain. This rename makes
the intent clearer.

* Move provider state check earlier

* Remove calls to GenerateLeafSigningCert

GenerateLeafSigningCert (formerly known
as GenerateIntermediate) is vestigial in
non-Vault providers, as it simply returns
the root certificate in primary
datacenters.

By folding Vault's intermediate cert logic
into `GenerateRoot` we can encapsulate
the intermediate cert handling within
`newCARoot`.

* Move GenerateLeafSigningCert out of PrimaryProvidder

Now that the Vault Provider calls
GenerateLeafSigningCert within
GenerateRoot, we can remove the method
from all other providers that never
used it in a meaningful way.

* Add test for IntermediatePEM

* Rename GenerateRoot to GenerateCAChain

"Root" was being overloaded in the Consul CA
context, as different providers and configs
resulted in a single root certificate or
a chain originating from an external trusted
CA. Since the Vault provider also generates
intermediates, it seems more accurate to
call this a CAChain.
2023-04-03 11:40:33 -04:00
..
ae copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
auto-config copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
cache copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
cache-types add order by locality failover to Consul enterprise (#16791) 2023-03-30 10:08:38 -04:00
checks copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
config copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
configentry Add default resolvers to disco chains based on the default sameness group (#16837) 2023-03-31 14:35:56 -04:00
connect Connect CA Primary Provider refactor (#16749) 2023-04-03 11:40:33 -04:00
consul Connect CA Primary Provider refactor (#16749) 2023-04-03 11:40:33 -04:00
debug copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
dns copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
envoyextensions copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
exec copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
grpc-external storage: fix resource leak in Watch (#16817) 2023-03-31 13:24:19 +01:00
grpc-internal copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
grpc-middleware copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
hcp copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
local copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
log-drop copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
metadata copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
metrics copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
mock copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
pool copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
proxycfg Add default resolvers to disco chains based on the default sameness group (#16837) 2023-03-31 14:35:56 -04:00
proxycfg-glue copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
proxycfg-sources copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
router copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
routine-leak-checker copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
rpc copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
rpcclient/health copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
structs Add default resolvers to disco chains based on the default sameness group (#16837) 2023-03-31 14:35:56 -04:00
submatview copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
systemd copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
token copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
uiserver copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
xds add order by locality failover to Consul enterprise (#16791) 2023-03-30 10:08:38 -04:00
acl.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
acl_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
acl_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
acl_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
acl_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
agent.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
agent_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
agent_endpoint_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
agent_endpoint_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
agent_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
agent_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
agent_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
apiserver.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
apiserver_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
catalog_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
catalog_endpoint_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
catalog_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
check.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
config_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
config_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
connect_auth.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
connect_ca_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
connect_ca_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
coordinate_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
coordinate_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
delegate_mock_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
denylist.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
denylist_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
discovery_chain_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
discovery_chain_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
dns.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
dns_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
dns_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
dns_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
enterprise_delegate_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
event_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
event_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
federation_state_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
health_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
health_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
http.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
http_decode_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
http_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
http_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
http_register.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
http_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
intentions_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
intentions_endpoint_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
intentions_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
keyring.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
keyring_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
kvs_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
kvs_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
metrics.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
metrics_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
nodeid.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
nodeid_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
notify.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
notify_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
operator_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
operator_endpoint_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
operator_endpoint_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
operator_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
peering_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
peering_endpoint_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
peering_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
prepared_query_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
prepared_query_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
proxycfg_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
reload.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
remote_exec.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
remote_exec_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
retry_join.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
retry_join_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
service_checks_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
service_manager.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
service_manager_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
session_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
session_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
setup.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
setup_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
sidecar_service.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
sidecar_service_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
signal_unix.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
signal_windows.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
snapshot_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
snapshot_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
status_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
status_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
streaming_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
testagent.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
testagent_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
translate_addr.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
txn_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
txn_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
ui_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
ui_endpoint_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
ui_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
user_event.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
user_event_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
util.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
util_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
watch_handler.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
watch_handler_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00