-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat : diagram as code boundary and vault workflow
add generate_diagrams job to wiki workflow changed styling accordingly
- Loading branch information
1 parent
f0d5530
commit 3b8f496
Showing
5 changed files
with
144 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
from diagrams import Diagram, Cluster, Edge, Node | ||
from diagrams.onprem.compute import Server | ||
from diagrams.onprem.auth import Boundary | ||
from diagrams.onprem.security import Vault | ||
from diagrams.onprem.database import PostgreSQL | ||
from diagrams.oci.governance import Audit, Logging | ||
|
||
|
||
graph_attr = { | ||
"fontname": "Roboto", | ||
"fontsize": "24" | ||
} | ||
|
||
with Diagram("Boundary server Workflow", show=False, direction="LR", graph_attr=graph_attr, filename="boundary"): | ||
boundary_controller = Boundary("Boundary Controller") | ||
boundary_worker = Boundary("Boundary Worker") | ||
vault = Vault("Vault Transit Engine") | ||
|
||
with Cluster("Listeners"): | ||
api_listener = Server("API Listener") | ||
cluster_listener = Server("Cluster Listener") | ||
proxy_listener = Server("Proxy Listener") | ||
Node(label="", width="2", height="0", style="invisible") | ||
|
||
|
||
with Cluster("Audit Event Sinks"): | ||
audit_file_sink = Audit("Controller") | ||
auth_sink = Audit("Auth Observation") | ||
session_sink = Audit("Session Authorization") | ||
Node(label="", width="2", height="0", style="invisible") | ||
stderr_sink = Logging("Stderr Sink") | ||
|
||
with Cluster("KMS Keys"): | ||
recovery_key = Boundary("recovery") | ||
worker_auth = Boundary("worker-ath") | ||
root_key = Boundary("root") | ||
|
||
postgres= PostgreSQL("Postgresql") | ||
|
||
# Controller connections | ||
boundary_controller >> Edge(label="TCP connection") >> cluster_listener | ||
boundary_controller >> Edge(label="Audit File Events") >> auth_sink | ||
boundary_controller >> Edge(label="All-events") >> stderr_sink | ||
|
||
# Worker connections | ||
boundary_worker >> Edge(label="Connected to Controller") >> boundary_controller | ||
|
||
# KMS connections | ||
worker_auth >> Edge() >> vault | ||
recovery_key >> Edge() >> vault | ||
root_key >> Edge() >> vault | ||
root_key << Edge(attrs="penwidth: 2.0") << boundary_controller | ||
|
||
# DB connections | ||
postgres << Edge(label="DB Connection") << boundary_controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from diagrams import Diagram, Cluster, Edge, Node | ||
from diagrams.onprem.security import Vault | ||
from diagrams.generic.storage import Storage | ||
from diagrams.onprem.client import Users | ||
|
||
with Diagram("\nVault Server Workflow", show=False, direction="RL", graph_attr={"fontname" : "arial", "fontsize": "28" }, filename="vault"): | ||
cluster_attr= { | ||
"margin" : "20", | ||
"fontsize": "16", | ||
"fontname" : "arial"} | ||
|
||
with Cluster("Vault Setup", graph_attr=cluster_attr): | ||
vault_listener = Vault("TCP Listener") | ||
storage_raft = Storage("\nRaft Storage") | ||
vault_ui = Vault("UI") | ||
|
||
with Cluster("User Management", graph_attr=cluster_attr): | ||
userpass_lockout = Users("\nUserpass Lockout") | ||
users = Users("\nUsers") | ||
|
||
# Vault connections | ||
vault_listener - Edge(label="0.0.0.0:8200\nTLS Disabled") >> [storage_raft, vault_ui] | ||
vault_listener >> Edge(label="Max Entry Size\n1MB") >> storage_raft | ||
|
||
# User Management connections | ||
users >> Edge(label="Lockout Threshold: 3\nLockout Duration: 10m") >> userpass_lockout | ||
|
||
# External connections | ||
api_addr = Vault("API Address\nhttp://localhost:8200") | ||
cluster_addr = Vault("Cluster Address\nhttp://127.0.0.1:8201") | ||
|
||
vault_listener >> Edge(label="API and Cluster Addresses") >> [api_addr, cluster_addr] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters