diff --git a/docs/service-mesh/ca/README.md b/docs/service-mesh/ca/README.md index 40861a851f..809dae8253 100644 --- a/docs/service-mesh/ca/README.md +++ b/docs/service-mesh/ca/README.md @@ -94,6 +94,9 @@ Periodic (or background) opeartions are started automatically by the Consul lead 3. called by Auto-Config to sign a leaf cert for a client agent ### detailed call flow -- sequence diagram for leader election +![CA Leader Sequence](./ca-leader-sequence.svg) + +[source](./ca-leader-sequence.mmd) + - sequence diagram for leaf signing - sequence diagram for CA cert rotation diff --git a/docs/service-mesh/ca/ca-leader-sequence.mmd b/docs/service-mesh/ca/ca-leader-sequence.mmd new file mode 100644 index 0000000000..f81e66b7ab --- /dev/null +++ b/docs/service-mesh/ca/ca-leader-sequence.mmd @@ -0,0 +1,19 @@ +sequenceDiagram +Participant Provider +Participant PL As Primary Leader +Participant SL As Secondary Leader +Alt Primary don't have a valid CA +PL->>Provider:initializeRootCA (fetch root and sign intermediate) +Provider->>PL:root + intermediate +PL->>PL:RPC ConnectCA.Roots (fetch primary root and store it) +end +SL->>PL: RPC ConnectCA.Roots (fetch primary root and store it) +PL->>SL: Root + intermediate +Alt Secondary needs a new intermediate (check if current intermediate is signed by primary root) +SL->>Provider: Generate CSR +Provider->>SL: CSR +SL->>PL: ConnectCA.SignIntermediate (CSR) +PL->>SL: Intermediate CA (secondary) +SL->>Provider: Set Intermediate (secondary CA) + root (primary CA) +SL->>SL: Store certs in RAFT (primary root + secondary intermediate) +end \ No newline at end of file diff --git a/docs/service-mesh/ca/ca-leader-sequence.svg b/docs/service-mesh/ca/ca-leader-sequence.svg new file mode 100644 index 0000000000..d19b957e44 --- /dev/null +++ b/docs/service-mesh/ca/ca-leader-sequence.svg @@ -0,0 +1 @@ +ProviderPrimary LeaderSecondary LeaderinitializeRootCA (fetch root and sign intermediate)root + intermediateRPC ConnectCA.Roots (fetch primary root and store it)alt[Primary don't have a valid CA]RPC ConnectCA.Roots (fetch primary root and store it)Root + intermediateGenerate CSRCSRConnectCA.SignIntermediate (CSR)Intermediate CA (secondary)Set Intermediate (secondary CA) + root (primary CA)Store certs in RAFT (primary root + secondary intermediate)alt[Secondary needs a new intermediate (check if current intermediate is signed by primary root)]ProviderPrimary LeaderSecondary Leader \ No newline at end of file