From 8a7fa35fc6c28b7523f3828169c0f29bf0818878 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Tue, 6 May 2025 15:01:03 -0700 Subject: [PATCH] Establish shared ownership of root bitwarden system workspace This is a first pass at structure that will undoubtedly evolve. It's likely further systems will be identified and linked in as we go forward --- .github/CODEOWNERS | 10 + docs/.gitignore | 1 + docs/admin_console/models.dsl | 14 + docs/admin_console/relationships.dsl | 0 .../views.dsl} | 2 +- docs/auth/models.dsl | 8 + docs/auth/relationships.dsl | 0 docs/auth/views.dsl | 0 docs/billing/models.dsl | 14 + docs/billing/relationships.dsl | 4 + docs/billing/views.dsl | 0 docs/bitwarden_system.dsl | 47 + docs/bitwarden_system.json | 1447 +++++++++++++++++ docs/common.models.dsl | 15 - docs/general.dsl | 64 - docs/general.json | 285 ---- docs/key_management/models.dsl | 0 docs/key_management/relationships.dsl | 1 + docs/key_management/views.dsl | 0 docs/platform/icons/models.dsl | 36 + docs/platform/models.dsl | 1 + docs/platform/relationships.dsl | 0 docs/platform/views.dsl | 0 docs/shared.models.dsl | 76 + docs/shared.relationships.dsl | 29 + docs/shared.views.dsl | 32 + docs/tools/models.dsl | 0 docs/tools/relationships.dsl | 0 docs/tools/views.dsl | 0 docs/vault/models.dsl | 0 docs/vault/relationships.dsl | 0 docs/vault/views.dsl | 0 32 files changed, 1721 insertions(+), 365 deletions(-) create mode 100644 docs/admin_console/models.dsl create mode 100644 docs/admin_console/relationships.dsl rename docs/{common.views.dsl => admin_console/views.dsl} (83%) create mode 100644 docs/auth/models.dsl create mode 100644 docs/auth/relationships.dsl create mode 100644 docs/auth/views.dsl create mode 100644 docs/billing/models.dsl create mode 100644 docs/billing/relationships.dsl create mode 100644 docs/billing/views.dsl create mode 100644 docs/bitwarden_system.dsl create mode 100644 docs/bitwarden_system.json delete mode 100644 docs/common.models.dsl delete mode 100644 docs/general.dsl delete mode 100644 docs/general.json create mode 100644 docs/key_management/models.dsl create mode 100644 docs/key_management/relationships.dsl create mode 100644 docs/key_management/views.dsl create mode 100644 docs/platform/icons/models.dsl create mode 100644 docs/platform/models.dsl create mode 100644 docs/platform/relationships.dsl create mode 100644 docs/platform/views.dsl create mode 100644 docs/shared.models.dsl create mode 100644 docs/shared.relationships.dsl create mode 100644 docs/shared.views.dsl create mode 100644 docs/tools/models.dsl create mode 100644 docs/tools/relationships.dsl create mode 100644 docs/tools/views.dsl create mode 100644 docs/vault/models.dsl create mode 100644 docs/vault/relationships.dsl create mode 100644 docs/vault/views.dsl diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 973405dea5..2a3b9207c9 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -39,15 +39,20 @@ bitwarden_license/src/Sso @bitwarden/team-auth-dev src/Identity @bitwarden/team-auth-dev src/Core/Identity @bitwarden/team-auth-dev src/Core/IdentityServer @bitwarden/team-auth-dev +docs/auth/* @bitwarden/team-auth-dev # Key Management team **/KeyManagement @bitwarden/team-key-management-dev +docs/key_management/* @bitwarden/team-key-management-dev +# Tools **/Tools @bitwarden/team-tools-dev +docs/tools/* @bitwarden/team-tools-dev # Vault team **/Vault @bitwarden/team-vault-dev **/Vault/AuthorizationHandlers @bitwarden/team-vault-dev @bitwarden/team-admin-console-dev # joint ownership over authorization handlers that affect organization users +docs/vault/* @bitwarden/team-vault-dev # Admin Console team **/AdminConsole @bitwarden/team-admin-console-dev @@ -56,6 +61,7 @@ bitwarden_license/src/test/Scim.IntegrationTest @bitwarden/team-admin-console-de bitwarden_license/src/test/Scim.ScimTest @bitwarden/team-admin-console-dev src/Events @bitwarden/team-admin-console-dev src/EventsProcessor @bitwarden/team-admin-console-dev +docs/admin_console/* @bitwarden/team-admin-console-dev # Billing team **/*billing* @bitwarden/team-billing-dev @@ -72,6 +78,7 @@ src/EventsProcessor @bitwarden/team-admin-console-dev **/Billing @bitwarden/team-billing-dev src/Admin/Controllers/ToolsController.cs @bitwarden/team-billing-dev src/Admin/Views/Tools @bitwarden/team-billing-dev +docs/billing/* @bitwarden/team-billing-dev # Platform team .github/workflows/build.yml @bitwarden/team-platform-dev @@ -82,7 +89,10 @@ src/Admin/Views/Tools @bitwarden/team-billing-dev .github/workflows/test-database.yml @bitwarden/team-platform-dev .github/workflows/test.yml @bitwarden/team-platform-dev **/*Platform* @bitwarden/team-platform-dev +docs/platform/* @bitwarden/team-platform-dev # Multiple owners - DO NOT REMOVE (BRE) **/packages.lock.json Directory.Build.props + +docs/ @bitwarden/dept-architecture diff --git a/docs/.gitignore b/docs/.gitignore index e82c382f09..b9b49a68c8 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1 +1,2 @@ .structurizr +export diff --git a/docs/admin_console/models.dsl b/docs/admin_console/models.dsl new file mode 100644 index 0000000000..e13c454752 --- /dev/null +++ b/docs/admin_console/models.dsl @@ -0,0 +1,14 @@ +admin = person "Organization Admin" "An administrator of an organization" { + tags "Admin" +} +provider = person "MSP" "And employee of a managed service provider" { + tags "MSP" +} + +!element server { + scim = container "SCIM" { + tags "SCIM" + } +} + +directory_connector -> server.api "Syncs users and groups to Bitwarden" diff --git a/docs/admin_console/relationships.dsl b/docs/admin_console/relationships.dsl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/common.views.dsl b/docs/admin_console/views.dsl similarity index 83% rename from docs/common.views.dsl rename to docs/admin_console/views.dsl index bf5e7b2f4b..f7c9ae969f 100644 --- a/docs/common.views.dsl +++ b/docs/admin_console/views.dsl @@ -1,6 +1,6 @@ styles { element "Person" { - background #d34407 + background #3107d3 shape person } element "MSP" { diff --git a/docs/auth/models.dsl b/docs/auth/models.dsl new file mode 100644 index 0000000000..eddb79138e --- /dev/null +++ b/docs/auth/models.dsl @@ -0,0 +1,8 @@ +!element server { + identity = container "Identity" { + tags "Auth" + } + sso = container "SSO" { + tags "Auth" + } +} diff --git a/docs/auth/relationships.dsl b/docs/auth/relationships.dsl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/auth/views.dsl b/docs/auth/views.dsl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/billing/models.dsl b/docs/billing/models.dsl new file mode 100644 index 0000000000..94c2b6d276 --- /dev/null +++ b/docs/billing/models.dsl @@ -0,0 +1,14 @@ +# External vendors +group "Payment Systems" { + stripe = softwareSystem "Stripe" { + tags "External" + tags "Billing" + description "Handles credit cards and subscriptions." + } + braintree = softwareSystem "Braintree" { + tags "External" + tags "Billing" + description "Handles PayPal and cryptocurrency." + } +} + diff --git a/docs/billing/relationships.dsl b/docs/billing/relationships.dsl new file mode 100644 index 0000000000..45a5ce355b --- /dev/null +++ b/docs/billing/relationships.dsl @@ -0,0 +1,4 @@ +# High-level provider relationships +server.api.billing -> stripe "Requests payments for customers" +server.api.billing -> braintree "Requests payments for customers" +stripe -> server.api.billing "Sends subscription events to" diff --git a/docs/billing/views.dsl b/docs/billing/views.dsl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/bitwarden_system.dsl b/docs/bitwarden_system.dsl new file mode 100644 index 0000000000..d96b561055 --- /dev/null +++ b/docs/bitwarden_system.dsl @@ -0,0 +1,47 @@ +workspace "Bitwarden" "General Bitwarden System" { + + !identifiers hierarchical + + model { + properties { + "structurizr.groupSeparator" "/" + } + + # Include shared level models + !include "shared.models.dsl" + + # Include team level models + !include "admin_console/models.dsl" + !include "auth/models.dsl" + !include "billing/models.dsl" + !include "key_management/models.dsl" + !include "platform/models.dsl" + !include "tools/models.dsl" + !include "vault/models.dsl" + + # Include shared level relationships + !include "shared.relationships.dsl" + + + !include "admin_console/relationships.dsl" + !include "auth/relationships.dsl" + !include "billing/relationships.dsl" + !include "key_management/relationships.dsl" + !include "platform/relationships.dsl" + !include "tools/relationships.dsl" + !include "vault/relationships.dsl" + } + + views { + !include "admin_console/views.dsl" + !include "auth/views.dsl" + !include "billing/views.dsl" + !include "key_management/views.dsl" + !include "platform/views.dsl" + !include "tools/views.dsl" + !include "vault/views.dsl" + + // This is last to override team styles with common styles + !include "shared.views.dsl" + } +} diff --git a/docs/bitwarden_system.json b/docs/bitwarden_system.json new file mode 100644 index 0000000000..85f366a4c0 --- /dev/null +++ b/docs/bitwarden_system.json @@ -0,0 +1,1447 @@ +{ + "configuration" : { }, + "description" : "General Bitwarden System", + "documentation" : { }, + "id" : 1, + "lastModifiedAgent" : "structurizr-ui", + "lastModifiedDate" : "2025-05-06T21:58:53Z", + "model" : { + "people" : [ { + "description" : "An end user of the Bitwarden System", + "id" : "1", + "location" : "Unspecified", + "name" : "Bitwarden User", + "properties" : { + "structurizr.dsl.identifier" : "user" + }, + "relationships" : [ { + "description" : "Uses", + "destinationId" : "16", + "id" : "47", + "sourceId" : "1", + "tags" : "Relationship" + }, { + "description" : "Uses", + "destinationId" : "15", + "id" : "48", + "linkedRelationshipId" : "47", + "sourceId" : "1" + }, { + "description" : "Uses", + "destinationId" : "17", + "id" : "49", + "sourceId" : "1", + "tags" : "Relationship" + }, { + "description" : "Uses", + "destinationId" : "18", + "id" : "50", + "sourceId" : "1", + "tags" : "Relationship" + }, { + "description" : "Uses", + "destinationId" : "19", + "id" : "51", + "sourceId" : "1", + "tags" : "Relationship" + }, { + "description" : "Uses", + "destinationId" : "20", + "id" : "52", + "sourceId" : "1", + "tags" : "Relationship" + }, { + "description" : "Uses", + "destinationId" : "21", + "id" : "53", + "sourceId" : "1", + "tags" : "Relationship" + } ], + "tags" : "Element,Person" + }, { + "description" : "Either a Bitwarden site-reliability engineer or administrator of a self-hosted instance", + "id" : "2", + "location" : "Unspecified", + "name" : "System Admin", + "properties" : { + "structurizr.dsl.identifier" : "system_admin" + }, + "relationships" : [ { + "description" : "Administers System", + "destinationId" : "9", + "id" : "62", + "sourceId" : "2", + "tags" : "Relationship" + }, { + "description" : "Administers System", + "destinationId" : "4", + "id" : "63", + "linkedRelationshipId" : "62", + "sourceId" : "2" + } ], + "tags" : "Element,Person,Bitwarden Employee,Self-Host Admin" + }, { + "description" : "A customer success engineer. Inspects bitwarden state through the admin portal and internal tools", + "group" : "Bitwarden Controlled", + "id" : "3", + "location" : "Unspecified", + "name" : "Customer Success", + "properties" : { + "structurizr.dsl.identifier" : "customer_success" + }, + "relationships" : [ { + "description" : "Inspects and supports", + "destinationId" : "9", + "id" : "60", + "sourceId" : "3", + "tags" : "Relationship" + }, { + "description" : "Inspects and supports", + "destinationId" : "4", + "id" : "61", + "linkedRelationshipId" : "60", + "sourceId" : "3" + } ], + "tags" : "Element,Person,Bitwarden Employee" + }, { + "description" : "An administrator of an organization", + "id" : "24", + "location" : "Unspecified", + "name" : "Organization Admin", + "properties" : { + "structurizr.dsl.identifier" : "admin" + }, + "relationships" : [ { + "description" : "Administers Organizations", + "destinationId" : "16", + "id" : "54", + "sourceId" : "24", + "tags" : "Relationship" + }, { + "description" : "Administers Organizations", + "destinationId" : "15", + "id" : "55", + "linkedRelationshipId" : "54", + "sourceId" : "24" + } ], + "tags" : "Element,Person,Admin" + }, { + "description" : "And employee of a managed service provider", + "id" : "25", + "location" : "Unspecified", + "name" : "MSP", + "properties" : { + "structurizr.dsl.identifier" : "provider" + }, + "relationships" : [ { + "description" : "Completes Provider registration with", + "destinationId" : "9", + "id" : "56", + "sourceId" : "25", + "tags" : "Relationship" + }, { + "description" : "Completes Provider registration with", + "destinationId" : "4", + "id" : "57", + "linkedRelationshipId" : "56", + "sourceId" : "25" + }, { + "description" : "Administers Providers and Organizations", + "destinationId" : "16", + "id" : "58", + "sourceId" : "25", + "tags" : "Relationship" + }, { + "description" : "Administers Providers and Organizations", + "destinationId" : "15", + "id" : "59", + "linkedRelationshipId" : "58", + "sourceId" : "25" + } ], + "tags" : "Element,Person,MSP" + } ], + "properties" : { + "structurizr.groupSeparator" : "/" + }, + "softwareSystems" : [ { + "containers" : [ { + "components" : [ { + "documentation" : { }, + "id" : "6", + "name" : "Billing", + "properties" : { + "structurizr.dsl.identifier" : "server.api.billing" + }, + "relationships" : [ { + "description" : "Requests payments for customers", + "destinationId" : "31", + "id" : "85", + "sourceId" : "6", + "tags" : "Relationship" + }, { + "description" : "Requests payments for customers", + "destinationId" : "32", + "id" : "88", + "sourceId" : "6", + "tags" : "Relationship" + } ], + "tags" : "Element,Component,Billing" + } ], + "documentation" : { }, + "id" : "5", + "name" : "API", + "properties" : { + "structurizr.dsl.identifier" : "server.api" + }, + "relationships" : [ { + "description" : "Validates JWTs with", + "destinationId" : "29", + "id" : "84", + "sourceId" : "5", + "tags" : "Relationship", + "url" : "https://bitwarden.com" + }, { + "description" : "Requests payments for customers", + "destinationId" : "31", + "id" : "86", + "linkedRelationshipId" : "85", + "sourceId" : "5" + }, { + "description" : "Requests payments for customers", + "destinationId" : "32", + "id" : "89", + "linkedRelationshipId" : "88", + "sourceId" : "5" + } ], + "tags" : "Element,Container,API" + }, { + "documentation" : { }, + "id" : "7", + "name" : "Events", + "properties" : { + "structurizr.dsl.identifier" : "server.events" + }, + "tags" : "Element,Container,Events" + }, { + "documentation" : { }, + "id" : "8", + "name" : "Notifications", + "properties" : { + "structurizr.dsl.identifier" : "server.notifications" + }, + "tags" : "Element,Container" + }, { + "documentation" : { }, + "id" : "9", + "name" : "Bitwarden Portal", + "properties" : { + "structurizr.dsl.identifier" : "server.portal" + }, + "tags" : "Element,Container,Web" + }, { + "documentation" : { }, + "id" : "10", + "name" : "Events Processor", + "properties" : { + "structurizr.dsl.identifier" : "server.events_processor" + }, + "tags" : "Element,Container,Events" + }, { + "documentation" : { }, + "id" : "11", + "name" : "Database", + "properties" : { + "structurizr.dsl.identifier" : "server.database" + }, + "tags" : "Element,Container,Database" + }, { + "documentation" : { }, + "id" : "12", + "name" : "Events Queue", + "properties" : { + "structurizr.dsl.identifier" : "server.events_queue" + }, + "tags" : "Element,Container,Queue,Azure" + }, { + "documentation" : { }, + "id" : "13", + "name" : "Mail Queue", + "properties" : { + "structurizr.dsl.identifier" : "server.mail_queue" + }, + "tags" : "Element,Container,Queue,Azure" + }, { + "documentation" : { }, + "id" : "14", + "name" : "Notifications Queue", + "properties" : { + "structurizr.dsl.identifier" : "server.notifications_queue" + }, + "tags" : "Element,Container,Queue,Azure" + }, { + "documentation" : { }, + "id" : "26", + "name" : "SCIM", + "properties" : { + "structurizr.dsl.identifier" : "server.scim" + }, + "tags" : "Element,Container,SCIM" + }, { + "documentation" : { }, + "id" : "29", + "name" : "Identity", + "properties" : { + "structurizr.dsl.identifier" : "server.identity" + }, + "tags" : "Element,Container,Auth" + }, { + "documentation" : { }, + "id" : "30", + "name" : "SSO", + "properties" : { + "structurizr.dsl.identifier" : "server.sso" + }, + "tags" : "Element,Container,Auth" + }, { + "components" : [ { + "description" : "IconsController", + "documentation" : { }, + "id" : "34", + "name" : "IconsController", + "properties" : { + "structurizr.dsl.identifier" : "server.icons.icons_controller" + }, + "relationships" : [ { + "description" : "Requests icons from", + "destinationId" : "36", + "id" : "41", + "sourceId" : "34", + "tags" : "Relationship" + }, { + "description" : "Caches icons in", + "destinationId" : "37", + "id" : "42", + "sourceId" : "34", + "tags" : "Relationship" + } ], + "tags" : "Element,Component", + "technology" : "C# ASP.NET Core" + }, { + "description" : "Provides information about the deployed icon service. Allow for health checks.", + "documentation" : { }, + "id" : "35", + "name" : "InfoController", + "properties" : { + "structurizr.dsl.identifier" : "server.icons.info_controller" + }, + "tags" : "Element,Component,Info,HealthCheck", + "technology" : "C# ASP.NET Core" + }, { + "description" : "Resolves a single source for a website icon and downloads it.", + "documentation" : { }, + "id" : "36", + "name" : "IconDetermination", + "perspectives" : [ { + "description" : "Internal network exposure", + "name" : "Security", + "value" : "5" + } ], + "properties" : { + "structurizr.dsl.identifier" : "server.icons.icon_retrieval" + }, + "relationships" : [ { + "description" : "Retrieves icons from", + "destinationId" : "43", + "id" : "44", + "sourceId" : "36", + "tags" : "Relationship" + } ], + "tags" : "Element,Component" + }, { + "description" : "Caches icons for a given domain", + "documentation" : { }, + "id" : "37", + "name" : "IconCache", + "properties" : { + "structurizr.dsl.identifier" : "server.icons.icon_cache" + }, + "tags" : "Element,Component,Cache", + "technology" : "C# MemoryCache" + } ], + "documentation" : { }, + "id" : "33", + "name" : "Icons", + "properties" : { + "structurizr.dsl.identifier" : "server.icons" + }, + "relationships" : [ { + "description" : "Retrieves icons from", + "destinationId" : "43", + "id" : "45", + "linkedRelationshipId" : "44", + "sourceId" : "33" + } ], + "tags" : "Element,Container" + } ], + "documentation" : { }, + "group" : "Bitwarden Controlled", + "id" : "4", + "location" : "Unspecified", + "name" : "Bitwarden Server", + "properties" : { + "structurizr.dsl.identifier" : "server" + }, + "relationships" : [ { + "description" : "Retrieves icons from", + "destinationId" : "43", + "id" : "46", + "linkedRelationshipId" : "44", + "sourceId" : "4" + }, { + "description" : "Requests payments for customers", + "destinationId" : "31", + "id" : "87", + "linkedRelationshipId" : "85", + "sourceId" : "4" + }, { + "description" : "Requests payments for customers", + "destinationId" : "32", + "id" : "90", + "linkedRelationshipId" : "88", + "sourceId" : "4" + } ], + "tags" : "Element,Software System" + }, { + "containers" : [ { + "documentation" : { }, + "id" : "16", + "name" : "Web Application", + "properties" : { + "structurizr.dsl.identifier" : "clients.web" + }, + "relationships" : [ { + "description" : "Makes requests to", + "destinationId" : "5", + "id" : "64", + "sourceId" : "16", + "tags" : "Relationship" + }, { + "description" : "Makes requests to", + "destinationId" : "4", + "id" : "65", + "linkedRelationshipId" : "64", + "sourceId" : "16" + }, { + "description" : "Authenticates with", + "destinationId" : "29", + "id" : "77", + "sourceId" : "16", + "tags" : "Relationship" + } ], + "tags" : "Element,Container,Web" + }, { + "documentation" : { }, + "id" : "17", + "name" : "iOS Application", + "properties" : { + "structurizr.dsl.identifier" : "clients.ios" + }, + "relationships" : [ { + "description" : "Makes requests to", + "destinationId" : "5", + "id" : "67", + "sourceId" : "17", + "tags" : "Relationship" + }, { + "description" : "Makes requests to", + "destinationId" : "4", + "id" : "68", + "linkedRelationshipId" : "67", + "sourceId" : "17" + }, { + "description" : "Authenticates With", + "destinationId" : "29", + "id" : "79", + "sourceId" : "17", + "tags" : "Relationship" + } ], + "tags" : "Element,Container,Mobile" + }, { + "documentation" : { }, + "id" : "18", + "name" : "Android Application", + "properties" : { + "structurizr.dsl.identifier" : "clients.android" + }, + "relationships" : [ { + "description" : "Makes requests to", + "destinationId" : "5", + "id" : "69", + "sourceId" : "18", + "tags" : "Relationship" + }, { + "description" : "Makes requests to", + "destinationId" : "4", + "id" : "70", + "linkedRelationshipId" : "69", + "sourceId" : "18" + }, { + "description" : "Authenticates With", + "destinationId" : "29", + "id" : "80", + "sourceId" : "18", + "tags" : "Relationship" + } ], + "tags" : "Element,Container,Mobile" + }, { + "documentation" : { }, + "id" : "19", + "name" : "Browser Extension", + "properties" : { + "structurizr.dsl.identifier" : "clients.browser_extension" + }, + "relationships" : [ { + "description" : "Makes requests to", + "destinationId" : "5", + "id" : "71", + "sourceId" : "19", + "tags" : "Relationship" + }, { + "description" : "Makes requests to", + "destinationId" : "4", + "id" : "72", + "linkedRelationshipId" : "71", + "sourceId" : "19" + }, { + "description" : "Authenticates With", + "destinationId" : "29", + "id" : "81", + "sourceId" : "19", + "tags" : "Relationship" + } ], + "tags" : "Element,Container,Browser" + }, { + "documentation" : { }, + "id" : "20", + "name" : "CLI", + "properties" : { + "structurizr.dsl.identifier" : "clients.cli" + }, + "relationships" : [ { + "description" : "Makes requests to", + "destinationId" : "5", + "id" : "73", + "sourceId" : "20", + "tags" : "Relationship" + }, { + "description" : "Makes requests to", + "destinationId" : "4", + "id" : "74", + "linkedRelationshipId" : "73", + "sourceId" : "20" + }, { + "description" : "Authenticates With", + "destinationId" : "29", + "id" : "82", + "sourceId" : "20", + "tags" : "Relationship" + } ], + "tags" : "Element,Container,CLI" + }, { + "documentation" : { }, + "id" : "21", + "name" : "Desktop Application", + "properties" : { + "structurizr.dsl.identifier" : "clients.desktop" + }, + "relationships" : [ { + "description" : "Makes requests to", + "destinationId" : "5", + "id" : "75", + "sourceId" : "21", + "tags" : "Relationship" + }, { + "description" : "Makes requests to", + "destinationId" : "4", + "id" : "76", + "linkedRelationshipId" : "75", + "sourceId" : "21" + }, { + "description" : "Authenticates With", + "destinationId" : "29", + "id" : "83", + "sourceId" : "21", + "tags" : "Relationship" + } ], + "tags" : "Element,Container,Desktop" + } ], + "documentation" : { }, + "group" : "Bitwarden Controlled", + "id" : "15", + "location" : "Unspecified", + "name" : "Clients", + "properties" : { + "structurizr.dsl.identifier" : "clients" + }, + "relationships" : [ { + "description" : "Requests icons for cleartext urls from", + "destinationId" : "34", + "id" : "38", + "sourceId" : "15", + "tags" : "Relationship" + }, { + "description" : "Requests icons for cleartext urls from", + "destinationId" : "33", + "id" : "39", + "linkedRelationshipId" : "38", + "sourceId" : "15" + }, { + "description" : "Requests icons for cleartext urls from", + "destinationId" : "4", + "id" : "40", + "linkedRelationshipId" : "38", + "sourceId" : "15" + }, { + "description" : "Makes requests to", + "destinationId" : "5", + "id" : "66", + "linkedRelationshipId" : "64", + "sourceId" : "15" + }, { + "description" : "Authenticates with", + "destinationId" : "29", + "id" : "78", + "linkedRelationshipId" : "77", + "sourceId" : "15" + } ], + "tags" : "Element,Software System" + }, { + "documentation" : { }, + "group" : "Bitwarden Controlled", + "id" : "22", + "location" : "Unspecified", + "name" : "Directory Connector", + "properties" : { + "structurizr.dsl.identifier" : "directory_connector" + }, + "relationships" : [ { + "description" : "Syncs users and groups to Bitwarden", + "destinationId" : "5", + "id" : "27", + "sourceId" : "22", + "tags" : "Relationship" + }, { + "description" : "Syncs users and groups to Bitwarden", + "destinationId" : "4", + "id" : "28", + "linkedRelationshipId" : "27", + "sourceId" : "22" + } ], + "tags" : "Element,Software System,Directory,LDAP,Self-Hosted" + }, { + "documentation" : { }, + "group" : "Bitwarden Controlled", + "id" : "23", + "location" : "Unspecified", + "name" : "Key Connector", + "properties" : { + "structurizr.dsl.identifier" : "key_connector" + }, + "relationships" : [ { + "description" : "Validates JWTs with", + "destinationId" : "29", + "id" : "94", + "sourceId" : "23", + "tags" : "Relationship" + }, { + "description" : "Validates JWTs with", + "destinationId" : "4", + "id" : "95", + "linkedRelationshipId" : "94", + "sourceId" : "23" + } ], + "tags" : "Element,Software System" + }, { + "description" : "Handles credit cards and subscriptions.", + "documentation" : { }, + "group" : "Payment Systems", + "id" : "31", + "location" : "Unspecified", + "name" : "Stripe", + "properties" : { + "structurizr.dsl.identifier" : "stripe" + }, + "relationships" : [ { + "description" : "Sends subscription events to", + "destinationId" : "6", + "id" : "91", + "sourceId" : "31", + "tags" : "Relationship" + }, { + "description" : "Sends subscription events to", + "destinationId" : "5", + "id" : "92", + "linkedRelationshipId" : "91", + "sourceId" : "31" + }, { + "description" : "Sends subscription events to", + "destinationId" : "4", + "id" : "93", + "linkedRelationshipId" : "91", + "sourceId" : "31" + } ], + "tags" : "Element,Software System,External,Billing" + }, { + "description" : "Handles PayPal and cryptocurrency.", + "documentation" : { }, + "group" : "Payment Systems", + "id" : "32", + "location" : "Unspecified", + "name" : "Braintree", + "properties" : { + "structurizr.dsl.identifier" : "braintree" + }, + "tags" : "Element,Software System,External,Billing" + }, { + "documentation" : { }, + "id" : "43", + "location" : "Unspecified", + "name" : "External Websites", + "properties" : { + "structurizr.dsl.identifier" : "external_websites" + }, + "tags" : "Element,Software System,External,Icons" + } ] + }, + "name" : "Bitwarden", + "properties" : { + "structurizr.dsl" : "d29ya3NwYWNlICJCaXR3YXJkZW4iICJHZW5lcmFsIEJpdHdhcmRlbiBTeXN0ZW0iIHsKCiAgIWlkZW50aWZpZXJzIGhpZXJhcmNoaWNhbAoKICBtb2RlbCB7CiAgICBwcm9wZXJ0aWVzIHsKICAgICAgInN0cnVjdHVyaXpyLmdyb3VwU2VwYXJhdG9yIiAiLyIKICAgIH0KCiAgICAjIEluY2x1ZGUgcm9vdCBsZXZlbCBtb2RlbHMKICAgICMgUGVyc29uIHR5cGVzCiAgICB1c2VyID0gcGVyc29uICJCaXR3YXJkZW4gVXNlciIgIkFuIGVuZCB1c2VyIG9mIHRoZSBCaXR3YXJkZW4gU3lzdGVtIgogICAgc3lzdGVtX2FkbWluID0gcGVyc29uICJTeXN0ZW0gQWRtaW4iICJFaXRoZXIgYSBCaXR3YXJkZW4gc2l0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gZXZlbnRzX3Byb2Nlc3NvciA9IGNvbnRhaW5lciAiRXZlbnRzIFByb2Nlc3NvciIgewogICAgICAgICAgdGFncyAiRXZlbnRzIgogICAgICAgIH0KICAgIAogICAgICAgICMgRGF0YSBzdG9yZXMKICAgICAgICBkYXRhYmFzZSA9IGNvbnRhaW5lciAiRGF0YWJhc2UiIHsKICAgICAgICAgIHRhZ3MgIkRhdGFiYXNlIgogICAgICAgIH0KICAgICAgICBldmVudHNfcXVldWUgPSBjb250YWluZXIgIkV2ZW50cyBRdWV1ZSIgewogICAgICAgICAgdGFncyAiUXVldWUiCiAgICAgICAgICB0YWdzICJBenVyZSIKICAgICAgICB9CiAgICAgICAgbWFpbF9xdWV1ZSA9IGNvbnRhaW5lciAiTWFpbCBRdWV1ZSIgewogICAgICAgICAgdGFncyAiUXVldWUiCiAgICAgICAgICB0YWdzICJBenVyZSIKICAgICAgICB9CiAgICAgICAgbm90aWZpY2F0aW9uc19xdWV1ZSA9IGNvbnRhaW5lciAiTm90aWZpY2F0aW9ucyBRdWV1ZSIgewogICAgICAgICAgdGFncyAiUXVldWUiCiAgICAgICAgICB0YWdzICJBenVyZSIKICAgICAgICB9CiAgICAgIH0KICAgICAgY2xpZW50cyA9IHNvZnR3YXJlU3lzdGVtICJDbGllbnRzIiB7CiAgICAgICAgd2ViID0gY29udGFpbmVyICJXZWIgQXBwbGljYXRpb24iIHsKICAgICAgICAgIHRhZ3MgIldlYiIKICAgICAgICB9CiAgICAgICAgaW9zID0gY29udGFpbmVyICJpT1MgQXBwbGljYXRpb24iIHsKICAgICAgICAgIHRhZ3MgIk1vYmlsZSIKICAgICAgICB9CiAgICAgICAgYW5kcm9pZCA9IGNvbnRhaW5lciAiQW5kcm9pZCBBcHBsaWNhdGlvbiIgewogICAgICAgICAgdGFncyAiTW9iaWxlIgogICAgICAgIH0KICAgICAgICBicm93c2VyX2V4dGVuc2lvbiA9IGNvbnRhaW5lciAiQnJvd3NlciBFeHRlbnNpb24iIHsKICAg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iAgICAgIGlkZW50aXR5ID0gY29udGFpbmVyICJJZGVudGl0eSIgewogICAgICAgIHRhZ3MgIkF1dGgiCiAgICAgIH0KICAgICAgc3NvID0gY29udGFpbmVyICJTU08iIHsKICAgICAgICB0YWdzICJBdXRoIgogICAgICB9CiAgICB9CiAgICAjIEV4dGVybmFsIHZlbmRvcnMKICAgIGdyb3VwICJQYXltZW50IFN5c3RlbXMiIHsKICAgICAgc3RyaXBlID0gc29mdHdhcmVTeXN0ZW0gIlN0cmlwZSIgewogICAgICAgIHRhZ3MgIkV4dGVybmFsIgogICAgICAgIHRhZ3MgIkJpbGxpbmciCiAgICAgICAgZGVzY3JpcHRpb24gIkhhbmRsZXMgY3JlZGl0IGNhcmRzIGFuZCBzdWJzY3JpcHRpb25zLiIKICAgICAgfQogICAgICBicmFpbnRyZWUgPSBzb2Z0d2FyZVN5c3RlbSAiQnJhaW50cmVlIiB7CiAgICAgICAgdGFncyAiRXh0ZXJuYWwiCiAgICAgICAgdGFncyAiQmlsbGluZyIKICAgICAgICBkZXNjcmlwdGlvbiAiSGFuZGxlcyBQYXlQYWwgYW5kIGNyeXB0b2N1cnJlbmN5LiIKICAgICAgfQogICAgfQogICAgCiAgICAhZWxlbWVudCBzZXJ2ZXIgewogICAgICBpY29ucyA9IGNvbnRhaW5lciAiSWNvbnMiIHsKICAgICAgICBpY29uc19jb250cm9sbGVyID0gY29tcG9uZW50ICJJY29uc0NvbnRyb2xsZXIiIHsKICAgICAgICAgIGRlc2NyaXB0aW9uICJJY29uc0NvbnRyb2xsZXIiCiAgICAgICAgICB0ZWNobm9sb2d5ICJDIyBBU1AuTkVUIENvcmUiCiAgICAgICAgICAKICAgICAgICB9CiAgICAgICAgaW5mb19jb250cm9sbGVyID0gY29tcG9uZW50ICJJbmZvQ29udHJvbGxlciIgewogICAgICAgICAgZGVzY3JpcHRpb24gIlByb3ZpZGVzIGluZm9ybWF0aW9uIGFib3V0IHRoZSBkZXBsb3llZCBpY29uIHNlcnZpY2U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cnZlci5hcGkuYmlsbGluZyAtPiBicmFpbnRyZWUgIlJlcXVlc3RzIHBheW1lbnRzIGZvciBjdXN0b21lcnMiCiAgICBzdHJpcGUgLT4gc2VydmVyLmFwaS5iaWxsaW5nICJTZW5kcyBzdWJzY3JpcHRpb24gZXZlbnRzIHRvIgogICAga2V5X2Nvbm5lY3RvciAtPiBzZXJ2ZXIuaWRlbnRpdHkgIlZhbGlkYXRlcyBKV1RzIHdpdGgiCiAgfQoKICB2aWV3cyB7CiAgICBzdHlsZXMgewogICAgICBlbGVtZW50ICJQZXJzb24iIHsKICAgICAgICBiYWNrZ3JvdW5kICMzMTA3ZDMKICAgICAgICBzaGFwZSBwZXJzb24KICAgICAgfQogICAgICBlbGVtZW50ICJNU1AiIHsKICAgICAgICBiYWNrZ3JvdW5kICMzMTA3ZDMKICAgICAgICBzaGFwZSBwZXJzb24KICAgICAgfQogICAgfQoKICAgIC8vIFRoaXMgaXMgbGFzdCB0byBvdmVycmlkZSB0ZWFtIHN0eWxlcyB3aXRoIGNvbW1vbiBzdHlsZXMKICAgIHN0eWxlcyB7CiAgICAgIHRoZW1lIGRlZmF1bHQKICAgICAgZWxlbWVudCAiRWxlbWVudCIgewogICAgICAgIGNvbG9yICMzYzNiM2IKICAgICAgfQogICAgICBlbGVtZW50ICJQZXJzb24iIHsKICAgICAgICBiYWNrZ3JvdW5kICNkMzQ0MDcKICAgICAgICBzaGFwZSBwZXJzb24KICAgICAgfQogICAgICBlbGVtZW50ICJDb250YWluZXIiIHsKICAgICAgICBiYWNrZ3JvdW5kICNmODg3MjgKICAgICAgfQogICAgICBlbGVtZW50ICJNU1AiIHsKICAgICAgICBiYWNrZ3JvdW5kICMzMTA3ZDMKICAgICAgfQogICAgICBlbGVtZW50ICJRdWV1ZSIgewogICAgICAgIHNoYXBlIHBpcGUKICAgICAgfQogICAgICBlbGVtZW50ICJNb2JpbGUiIHsKICAgICAgICBzaGFwZSBtb2JpbGVEZXZpY2VQb3J0cmFpdAogICAgICB9CiAgICAgIGVsZW1lbnQgIldlYiIgewogICAgICAgIHNoYXBlIHdlYkJyb3dzZXIKICAgICAgfQogICAgICBlbGVtZW50ICJEYXRhYmFzZSIgewogICAgICAgIHNoYXBlIGN5bGluZGVyCiAgICAgIH0KICAgICAgZWxlbWVudCAiRXh0ZXJuYWwiIHsKICAgICAgICBjb2xvciAjMDAwMDAwCiAgICAgICAgYmFja2dyb3VuZCAjYjViNWI1CiAgICAgIH0KICAgIH0KICB9Cn0=" + }, + "views" : { + "componentViews" : [ { + "automaticLayout" : { + "applied" : false, + "edgeSeparation" : 0, + "implementation" : "Graphviz", + "nodeSeparation" : 300, + "rankDirection" : "TopBottom", + "rankSeparation" : 300, + "vertices" : false + }, + "containerId" : "5", + "elements" : [ { + "id" : "6", + "x" : 0, + "y" : 0 + }, { + "id" : "31", + "x" : 0, + "y" : 0 + }, { + "id" : "32", + "x" : 0, + "y" : 0 + } ], + "externalContainerBoundariesVisible" : false, + "generatedKey" : true, + "key" : "Component-001", + "order" : 4, + "relationships" : [ { + "id" : "85" + }, { + "id" : "88" + }, { + "id" : "91" + } ] + }, { + "automaticLayout" : { + "applied" : false, + "edgeSeparation" : 0, + "implementation" : "Graphviz", + "nodeSeparation" : 300, + "rankDirection" : "TopBottom", + "rankSeparation" : 300, + "vertices" : false + }, + "containerId" : "33", + "elements" : [ { + "id" : "15", + "x" : 0, + "y" : 0 + }, { + "id" : "34", + "x" : 0, + "y" : 0 + }, { + "id" : "35", + "x" : 0, + "y" : 0 + }, { + "id" : "36", + "x" : 0, + "y" : 0 + }, { + "id" : "37", + "x" : 0, + "y" : 0 + }, { + "id" : "43", + "x" : 0, + "y" : 0 + } ], + "externalContainerBoundariesVisible" : false, + "generatedKey" : true, + "key" : "Component-002", + "order" : 5, + "relationships" : [ { + "id" : "38" + }, { + "id" : "41" + }, { + "id" : "42" + }, { + "id" : "44" + } ] + } ], + "configuration" : { + "branding" : { }, + "lastSavedView" : "SystemLandscape-001", + "metadataSymbols" : "SquareBrackets", + "styles" : { + "elements" : [ { + "background" : "#d34407", + "shape" : "Person", + "tag" : "Person" + }, { + "background" : "#3107d3", + "shape" : "Person", + "tag" : "MSP" + }, { + "color" : "#3c3b3b", + "tag" : "Element" + }, { + "background" : "#f88728", + "tag" : "Container" + }, { + "shape" : "Pipe", + "tag" : "Queue" + }, { + "shape" : "MobileDevicePortrait", + "tag" : "Mobile" + }, { + "shape" : "WebBrowser", + "tag" : "Web" + }, { + "shape" : "Cylinder", + "tag" : "Database" + }, { + "background" : "#b5b5b5", + "color" : "#000000", + "tag" : "External" + } ] + }, + "terminology" : { }, + "themes" : [ "https://static.structurizr.com/themes/default/theme.json" ] + }, + "containerViews" : [ { + "automaticLayout" : { + "applied" : false, + "edgeSeparation" : 0, + "implementation" : "Graphviz", + "nodeSeparation" : 300, + "rankDirection" : "TopBottom", + "rankSeparation" : 300, + "vertices" : false + }, + "elements" : [ { + "id" : "2", + "x" : 0, + "y" : 0 + }, { + "id" : "3", + "x" : 0, + "y" : 0 + }, { + "id" : "5", + "x" : 0, + "y" : 0 + }, { + "id" : "7", + "x" : 0, + "y" : 0 + }, { + "id" : "8", + "x" : 0, + "y" : 0 + }, { + "id" : "9", + "x" : 0, + "y" : 0 + }, { + "id" : "10", + "x" : 0, + "y" : 0 + }, { + "id" : "11", + "x" : 0, + "y" : 0 + }, { + "id" : "12", + "x" : 0, + "y" : 0 + }, { + "id" : "13", + "x" : 0, + "y" : 0 + }, { + "id" : "14", + "x" : 0, + "y" : 0 + }, { + "id" : "15", + "x" : 0, + "y" : 0 + }, { + "id" : "22", + "x" : 0, + "y" : 0 + }, { + "id" : "23", + "x" : 0, + "y" : 0 + }, { + "id" : "25", + "x" : 0, + "y" : 0 + }, { + "id" : "26", + "x" : 0, + "y" : 0 + }, { + "id" : "29", + "x" : 0, + "y" : 0 + }, { + "id" : "30", + "x" : 0, + "y" : 0 + }, { + "id" : "31", + "x" : 0, + "y" : 0 + }, { + "id" : "32", + "x" : 0, + "y" : 0 + }, { + "id" : "33", + "x" : 0, + "y" : 0 + }, { + "id" : "43", + "x" : 0, + "y" : 0 + } ], + "externalSoftwareSystemBoundariesVisible" : false, + "generatedKey" : true, + "key" : "Container-001", + "order" : 3, + "relationships" : [ { + "id" : "27" + }, { + "id" : "39" + }, { + "id" : "45" + }, { + "id" : "56" + }, { + "id" : "59" + }, { + "id" : "60" + }, { + "id" : "62" + }, { + "id" : "66" + }, { + "id" : "78" + }, { + "id" : "84" + }, { + "id" : "86" + }, { + "id" : "89" + }, { + "id" : "92" + }, { + "id" : "94" + } ], + "softwareSystemId" : "4" + }, { + "automaticLayout" : { + "applied" : false, + "edgeSeparation" : 0, + "implementation" : "Graphviz", + "nodeSeparation" : 300, + "rankDirection" : "TopBottom", + "rankSeparation" : 300, + "vertices" : false + }, + "elements" : [ { + "id" : "1", + "x" : 0, + "y" : 0 + }, { + "id" : "4", + "x" : 0, + "y" : 0 + }, { + "id" : "16", + "x" : 0, + "y" : 0 + }, { + "id" : "17", + "x" : 0, + "y" : 0 + }, { + "id" : "18", + "x" : 0, + "y" : 0 + }, { + "id" : "19", + "x" : 0, + "y" : 0 + }, { + "id" : "20", + "x" : 0, + "y" : 0 + }, { + "id" : "21", + "x" : 0, + "y" : 0 + }, { + "id" : "24", + "x" : 0, + "y" : 0 + }, { + "id" : "25", + "x" : 0, + "y" : 0 + } ], + "externalSoftwareSystemBoundariesVisible" : false, + "generatedKey" : true, + "key" : "Container-002", + "order" : 8, + "relationships" : [ { + "id" : "47" + }, { + "id" : "49" + }, { + "id" : "50" + }, { + "id" : "51" + }, { + "id" : "52" + }, { + "id" : "53" + }, { + "id" : "54" + }, { + "id" : "57" + }, { + "id" : "58" + }, { + "id" : "65" + }, { + "id" : "68" + }, { + "id" : "70" + }, { + "id" : "72" + }, { + "id" : "74" + }, { + "id" : "76" + } ], + "softwareSystemId" : "15" + } ], + "systemContextViews" : [ { + "automaticLayout" : { + "applied" : false, + "edgeSeparation" : 0, + "implementation" : "Graphviz", + "nodeSeparation" : 300, + "rankDirection" : "TopBottom", + "rankSeparation" : 300, + "vertices" : false + }, + "elements" : [ { + "id" : "2", + "x" : 0, + "y" : 0 + }, { + "id" : "3", + "x" : 0, + "y" : 0 + }, { + "id" : "4", + "x" : 0, + "y" : 0 + }, { + "id" : "15", + "x" : 0, + "y" : 0 + }, { + "id" : "22", + "x" : 0, + "y" : 0 + }, { + "id" : "23", + "x" : 0, + "y" : 0 + }, { + "id" : "25", + "x" : 0, + "y" : 0 + }, { + "id" : "31", + "x" : 0, + "y" : 0 + }, { + "id" : "32", + "x" : 0, + "y" : 0 + }, { + "id" : "43", + "x" : 0, + "y" : 0 + } ], + "enterpriseBoundaryVisible" : true, + "generatedKey" : true, + "key" : "SystemContext-001", + "order" : 2, + "relationships" : [ { + "id" : "28" + }, { + "id" : "40" + }, { + "id" : "46" + }, { + "id" : "57" + }, { + "id" : "59" + }, { + "id" : "61" + }, { + "id" : "63" + }, { + "id" : "87" + }, { + "id" : "90" + }, { + "id" : "93" + }, { + "id" : "95" + } ], + "softwareSystemId" : "4" + }, { + "automaticLayout" : { + "applied" : false, + "edgeSeparation" : 0, + "implementation" : "Graphviz", + "nodeSeparation" : 300, + "rankDirection" : "TopBottom", + "rankSeparation" : 300, + "vertices" : false + }, + "elements" : [ { + "id" : "4", + "x" : 0, + "y" : 0 + }, { + "id" : "32", + "x" : 0, + "y" : 0 + } ], + "enterpriseBoundaryVisible" : true, + "generatedKey" : true, + "key" : "SystemContext-002", + "order" : 6, + "relationships" : [ { + "id" : "90" + } ], + "softwareSystemId" : "32" + }, { + "automaticLayout" : { + "applied" : false, + "edgeSeparation" : 0, + "implementation" : "Graphviz", + "nodeSeparation" : 300, + "rankDirection" : "TopBottom", + "rankSeparation" : 300, + "vertices" : false + }, + "elements" : [ { + "id" : "1", + "x" : 0, + "y" : 0 + }, { + "id" : "4", + "x" : 0, + "y" : 0 + }, { + "id" : "15", + "x" : 0, + "y" : 0 + }, { + "id" : "24", + "x" : 0, + "y" : 0 + }, { + "id" : "25", + "x" : 0, + "y" : 0 + } ], + "enterpriseBoundaryVisible" : true, + "generatedKey" : true, + "key" : "SystemContext-003", + "order" : 7, + "relationships" : [ { + "id" : "40" + }, { + "id" : "48" + }, { + "id" : "55" + }, { + "id" : "57" + }, { + "id" : "59" + } ], + "softwareSystemId" : "15" + }, { + "automaticLayout" : { + "applied" : false, + "edgeSeparation" : 0, + "implementation" : "Graphviz", + "nodeSeparation" : 300, + "rankDirection" : "TopBottom", + "rankSeparation" : 300, + "vertices" : false + }, + "elements" : [ { + "id" : "4", + "x" : 0, + "y" : 0 + }, { + "id" : "22", + "x" : 0, + "y" : 0 + } ], + "enterpriseBoundaryVisible" : true, + "generatedKey" : true, + "key" : "SystemContext-004", + "order" : 9, + "relationships" : [ { + "id" : "28" + } ], + "softwareSystemId" : "22" + }, { + "automaticLayout" : { + "applied" : false, + "edgeSeparation" : 0, + "implementation" : "Graphviz", + "nodeSeparation" : 300, + "rankDirection" : "TopBottom", + "rankSeparation" : 300, + "vertices" : false + }, + "elements" : [ { + "id" : "4", + "x" : 0, + "y" : 0 + }, { + "id" : "43", + "x" : 0, + "y" : 0 + } ], + "enterpriseBoundaryVisible" : true, + "generatedKey" : true, + "key" : "SystemContext-005", + "order" : 10, + "relationships" : [ { + "id" : "46" + } ], + "softwareSystemId" : "43" + }, { + "automaticLayout" : { + "applied" : false, + "edgeSeparation" : 0, + "implementation" : "Graphviz", + "nodeSeparation" : 300, + "rankDirection" : "TopBottom", + "rankSeparation" : 300, + "vertices" : false + }, + "elements" : [ { + "id" : "4", + "x" : 0, + "y" : 0 + }, { + "id" : "23", + "x" : 0, + "y" : 0 + } ], + "enterpriseBoundaryVisible" : true, + "generatedKey" : true, + "key" : "SystemContext-006", + "order" : 11, + "relationships" : [ { + "id" : "95" + } ], + "softwareSystemId" : "23" + }, { + "automaticLayout" : { + "applied" : false, + "edgeSeparation" : 0, + "implementation" : "Graphviz", + "nodeSeparation" : 300, + "rankDirection" : "TopBottom", + "rankSeparation" : 300, + "vertices" : false + }, + "elements" : [ { + "id" : "4", + "x" : 0, + "y" : 0 + }, { + "id" : "31", + "x" : 0, + "y" : 0 + } ], + "enterpriseBoundaryVisible" : true, + "generatedKey" : true, + "key" : "SystemContext-007", + "order" : 12, + "relationships" : [ { + "id" : "87" + }, { + "id" : "93" + } ], + "softwareSystemId" : "31" + } ], + "systemLandscapeViews" : [ { + "automaticLayout" : { + "applied" : true, + "edgeSeparation" : 0, + "implementation" : "Graphviz", + "nodeSeparation" : 300, + "rankDirection" : "TopBottom", + "rankSeparation" : 300, + "vertices" : false + }, + "dimensions" : { + "height" : 2774, + "width" : 4417 + }, + "elements" : [ { + "id" : "1", + "x" : 2417, + "y" : 165 + }, { + "id" : "2", + "x" : 200, + "y" : 865 + }, { + "id" : "3", + "x" : 900, + "y" : 865 + }, { + "id" : "4", + "x" : 1625, + "y" : 1565 + }, { + "id" : "15", + "x" : 3100, + "y" : 915 + }, { + "id" : "22", + "x" : 2350, + "y" : 915 + }, { + "id" : "23", + "x" : 1600, + "y" : 915 + }, { + "id" : "24", + "x" : 3117, + "y" : 165 + }, { + "id" : "25", + "x" : 3817, + "y" : 165 + }, { + "id" : "31", + "x" : 1625, + "y" : 2165 + }, { + "id" : "32", + "x" : 875, + "y" : 2165 + }, { + "id" : "43", + "x" : 2375, + "y" : 2165 + } ], + "enterpriseBoundaryVisible" : true, + "generatedKey" : true, + "key" : "SystemLandscape-001", + "order" : 1, + "relationships" : [ { + "id" : "28" + }, { + "id" : "40", + "vertices" : [ { + "x" : 2950, + "y" : 1265 + } ] + }, { + "id" : "46" + }, { + "id" : "48" + }, { + "id" : "55" + }, { + "id" : "57", + "vertices" : [ { + "x" : 3700, + "y" : 1265 + } ] + }, { + "id" : "59" + }, { + "id" : "61" + }, { + "id" : "63", + "vertices" : [ { + "x" : 721, + "y" : 1265 + } ] + }, { + "id" : "87", + "vertices" : [ { + "x" : 1700, + "y" : 2015 + } ] + }, { + "id" : "90" + }, { + "id" : "93", + "vertices" : [ { + "x" : 2000, + "y" : 2015 + } ] + }, { + "id" : "95" + } ] + } ] + } +} \ No newline at end of file diff --git a/docs/common.models.dsl b/docs/common.models.dsl deleted file mode 100644 index 97b8c73083..0000000000 --- a/docs/common.models.dsl +++ /dev/null @@ -1,15 +0,0 @@ -user = person "User" "An end user of the application" -admin = person "Organization Admin" "An administrator of an organization" { - tags "Admin" -} -provider = person "MSP" "And employee of a managed service provider" { - tags "MSP" -} -customer_success = person "Customer Success" "A customer success engineer. Inspects bitwarden state through the admin portal and internal tools" { - tags "Bitwarden Employee" -} -system_admin = person "System Admin" "Either a Bitwarden site-reliability engineer or administrator of a self-hosted instance" { - tags "Bitwarden Employee" "Self-Host Admin" -} -api = softwareSystem "API" { -} diff --git a/docs/general.dsl b/docs/general.dsl deleted file mode 100644 index 10223ceeb5..0000000000 --- a/docs/general.dsl +++ /dev/null @@ -1,64 +0,0 @@ -workspace "Bitwarden" "General Bitwarden System" { - - !identifiers hierarchical - - model { - !include "common.models.dsl" - payment_systems = softwareSystem "Payment Systems" { - tags "External" - } - - bitwarden_pm = softwareSystem "Bitwarden System" { - wa = container "Web Application" - db = container "Database Schema" { - tags "Database" - } - } - - identity = softwareSystem "Identity" { - tags "Auth" - # This would point to a production on-prem instance hosting an auth-owned workspace defining an Identity system - url "http://localhost:8085/workspace/3/diagrams#Identity" - } - - user -> bitwarden_pm "Uses" - user -> identity "Authenticates with" - bitwarden_pm -> identity "validates tokens with" - admin -> bitwarden_pm "Administers Organizations" - provider -> bitwarden_pm "Administers Providers and Organizations" - customer_success -> bitwarden_pm "Inspects and supports" - system_admin -> bitwarden_pm "Administers System" - bitwarden_pm.wa -> bitwarden_pm.db "Reads from and writes to" - } - - views { - !include "common.views.dsl" - systemContext bitwarden_pm "Diagram1" { - include * - } - - container bitwarden_pm "Diagram2" { - include * - } - - styles { - element "Element" { - color #ffffff - } - element "Software System" { - background #f86628 - } - element "Container" { - background #f88728 - } - element "Database" { - shape cylinder - } - } - } - - configuration { - scope softwaresystem - } - -} diff --git a/docs/general.json b/docs/general.json deleted file mode 100644 index e3ca13ce32..0000000000 --- a/docs/general.json +++ /dev/null @@ -1,285 +0,0 @@ -{ - "configuration" : { - "scope" : "SoftwareSystem" - }, - "description" : "General Bitwarden System", - "documentation" : { }, - "id" : 1, - "lastModifiedDate" : "2025-05-01T16:54:52Z", - "model" : { - "people" : [ { - "description" : "An end user of the application", - "id" : "1", - "location" : "Unspecified", - "name" : "User", - "properties" : { - "structurizr.dsl.identifier" : "user" - }, - "relationships" : [ { - "description" : "Uses", - "destinationId" : "8", - "id" : "12", - "sourceId" : "1", - "tags" : "Relationship" - }, { - "description" : "Authenticates with", - "destinationId" : "11", - "id" : "13", - "sourceId" : "1", - "tags" : "Relationship" - } ], - "tags" : "Element,Person" - }, { - "description" : "An administrator of an organization", - "id" : "2", - "location" : "Unspecified", - "name" : "Organization Admin", - "properties" : { - "structurizr.dsl.identifier" : "admin" - }, - "relationships" : [ { - "description" : "Administers Organizations", - "destinationId" : "8", - "id" : "15", - "sourceId" : "2", - "tags" : "Relationship" - } ], - "tags" : "Element,Person,Admin" - }, { - "description" : "And employee of a managed service provider", - "id" : "3", - "location" : "Unspecified", - "name" : "MSP", - "properties" : { - "structurizr.dsl.identifier" : "provider" - }, - "relationships" : [ { - "description" : "Administers Providers and Organizations", - "destinationId" : "8", - "id" : "16", - "sourceId" : "3", - "tags" : "Relationship" - } ], - "tags" : "Element,Person,MSP" - }, { - "description" : "A customer success engineer. Inspects bitwarden state through the admin portal and internal tools", - "id" : "4", - "location" : "Unspecified", - "name" : "Customer Success", - "properties" : { - "structurizr.dsl.identifier" : "customer_success" - }, - "relationships" : [ { - "description" : "Inspects and supports", - "destinationId" : "8", - "id" : "17", - "sourceId" : "4", - "tags" : "Relationship" - } ], - "tags" : "Element,Person,Bitwarden Employee" - }, { - "description" : "Either a Bitwarden site-reliability engineer or administrator of a self-hosted instance", - "id" : "5", - "location" : "Unspecified", - "name" : "System Admin", - "properties" : { - "structurizr.dsl.identifier" : "system_admin" - }, - "relationships" : [ { - "description" : "Administers System", - "destinationId" : "8", - "id" : "18", - "sourceId" : "5", - "tags" : "Relationship" - } ], - "tags" : "Element,Person,Bitwarden Employee,Self-Host Admin" - } ], - "softwareSystems" : [ { - "documentation" : { }, - "id" : "6", - "location" : "Unspecified", - "name" : "API", - "properties" : { - "structurizr.dsl.identifier" : "api" - }, - "tags" : "Element,Software System" - }, { - "documentation" : { }, - "id" : "7", - "location" : "Unspecified", - "name" : "Payment Systems", - "properties" : { - "structurizr.dsl.identifier" : "payment_systems" - }, - "tags" : "Element,Software System,External" - }, { - "containers" : [ { - "documentation" : { }, - "id" : "9", - "name" : "Web Application", - "properties" : { - "structurizr.dsl.identifier" : "bitwarden_pm.wa" - }, - "relationships" : [ { - "description" : "Reads from and writes to", - "destinationId" : "10", - "id" : "19", - "sourceId" : "9", - "tags" : "Relationship" - } ], - "tags" : "Element,Container" - }, { - "documentation" : { }, - "id" : "10", - "name" : "Database Schema", - "properties" : { - "structurizr.dsl.identifier" : "bitwarden_pm.db" - }, - "tags" : "Element,Container,Database" - } ], - "documentation" : { }, - "id" : "8", - "location" : "Unspecified", - "name" : "Bitwarden System", - "properties" : { - "structurizr.dsl.identifier" : "bitwarden_pm" - }, - "relationships" : [ { - "description" : "validates tokens with", - "destinationId" : "11", - "id" : "14", - "sourceId" : "8", - "tags" : "Relationship" - } ], - "tags" : "Element,Software System" - }, { - "documentation" : { }, - "id" : "11", - "location" : "Unspecified", - "name" : "Identity", - "properties" : { - "structurizr.dsl.identifier" : "identity" - }, - "tags" : "Element,Software System,Auth", - "url" : "http://localhost:8085/workspace/3/diagrams#Identity" - } ] - }, - "name" : "Bitwarden", - "properties" : { - "structurizr.dsl" : "d29ya3NwYWNlICJCaXR3YXJkZW4iICJHZW5lcmFsIEJpdHdhcmRlbiBTeXN0ZW0iIHsKCiAgICAhaWRlbnRpZmllcnMgaGllcmFyY2hpY2FsCgogIC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ICAgICAgIHN5c3RlbV9hZG1pbiAtPiBiaXR3YXJkZW5fcG0gIkFkbWluaXN0ZXJzIFN5c3RlbSIKICAgICAgICBiaXR3YXJkZW5fcG0ud2EgLT4gYml0d2FyZGVuX3BtLmRiICJSZWFkcyBmcm9tIGFuZCB3cml0ZXMgdG8iCiAgICB9CgogICAgdmlld3MgewogICAgICAgIHN0eWxlcyB7CiAgICAgICAgICBlbGVtZW50ICJQZXJzb24iIHsKICAgICAgICAgICAgYmFja2dyb3VuZCAjZDM0NDA3CiAgICAgICAgICAgIHNoYXBlIHBlcnNvbgogICAgICAgICAgfQogICAgICAgICAgZWxlbWVudCAiTVNQIiB7CiAgICAgICAgICAgIGJhY2tncm91bmQgIzMxMDdkMwogICAgICAgICAgICBzaGFwZSBwZXJzb24KICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgc3lzdGVtQ29udGV4dCBiaXR3YXJkZW5fcG0gIkRpYWdyYW0xIiB7CiAgICAgICAgICAgIGluY2x1ZGUgKgogICAgICAgIH0KCiAgICAgICAgY29udGFpbmVyIGJpdHdhcmRlbl9wbSAiRGlhZ3JhbTIiIHsKICAgICAgICAgICAgaW5jbHVkZSAqCiAgICAgICAgfQoKICAgICAgICBzdHlsZXMgewogICAgICAgICAgICBlbGVtZW50ICJFbGVtZW50IiB7CiAgICAgICAgICAgICAgICBjb2xvciAjZmZmZmZmCiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxlbWVudCAiU29mdHdhcmUgU3lzdGVtIiB7CiAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kICNmODY2MjgKICAgICAgICAgICAgfQogICAgICAgICAgICBlbGVtZW50ICJDb250YWluZXIiIHsKICAgICAgICAgICAgICAgIGJhY2tncm91bmQgI2Y4ODcyOAogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsZW1lbnQgIkRhdGFiYXNlIiB7CiAgICAgICAgICAgICAgICBzaGFwZSBjeWxpbmRlcgogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIGNvbmZpZ3VyYXRpb24gewogICAgICAgIHNjb3BlIHNvZnR3YXJlc3lzdGVtCiAgICB9Cgp9" - }, - "views" : { - "configuration" : { - "branding" : { }, - "lastSavedView" : "Diagram2", - "styles" : { - "elements" : [ { - "background" : "#d34407", - "shape" : "Person", - "tag" : "Person" - }, { - "background" : "#3107d3", - "shape" : "Person", - "tag" : "MSP" - }, { - "color" : "#ffffff", - "tag" : "Element" - }, { - "background" : "#f86628", - "tag" : "Software System" - }, { - "background" : "#f88728", - "tag" : "Container" - }, { - "shape" : "Cylinder", - "tag" : "Database" - } ] - }, - "terminology" : { } - }, - "containerViews" : [ { - "dimensions" : { - "height" : 1926, - "width" : 2835 - }, - "elements" : [ { - "id" : "9", - "x" : 817, - "y" : 742 - }, { - "id" : "10", - "x" : 1567, - "y" : 742 - } ], - "externalSoftwareSystemBoundariesVisible" : false, - "key" : "Diagram2", - "order" : 2, - "relationships" : [ { - "id" : "19" - } ], - "softwareSystemId" : "8" - } ], - "systemContextViews" : [ { - "dimensions" : { - "height" : 1400, - "width" : 3600 - }, - "elements" : [ { - "id" : "1", - "x" : 210, - "y" : 790 - }, { - "id" : "2", - "x" : 900, - "y" : 165 - }, { - "id" : "3", - "x" : 1600, - "y" : 165 - }, { - "id" : "4", - "x" : 2300, - "y" : 165 - }, { - "id" : "5", - "x" : 3000, - "y" : 165 - }, { - "id" : "8", - "x" : 1575, - "y" : 865 - }, { - "id" : "11", - "x" : 0, - "y" : 0 - } ], - "enterpriseBoundaryVisible" : true, - "key" : "Diagram1", - "order" : 1, - "relationships" : [ { - "id" : "12", - "vertices" : [ { - "x" : 750, - "y" : 565 - } ] - }, { - "id" : "13" - }, { - "id" : "14" - }, { - "id" : "15" - }, { - "id" : "16" - }, { - "id" : "17" - }, { - "id" : "18", - "vertices" : [ { - "x" : 2850, - "y" : 565 - } ] - } ], - "softwareSystemId" : "8" - } ] - } -} \ No newline at end of file diff --git a/docs/key_management/models.dsl b/docs/key_management/models.dsl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/key_management/relationships.dsl b/docs/key_management/relationships.dsl new file mode 100644 index 0000000000..8b987094ad --- /dev/null +++ b/docs/key_management/relationships.dsl @@ -0,0 +1 @@ +key_connector -> server.identity "Validates JWTs with" diff --git a/docs/key_management/views.dsl b/docs/key_management/views.dsl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/platform/icons/models.dsl b/docs/platform/icons/models.dsl new file mode 100644 index 0000000000..ad9fe2ec4f --- /dev/null +++ b/docs/platform/icons/models.dsl @@ -0,0 +1,36 @@ +!element server { + icons = container "Icons" { + icons_controller = component "IconsController" { + description "IconsController" + technology "C# ASP.NET Core" + + } + info_controller = component "InfoController" { + description "Provides information about the deployed icon service. Allow for health checks." + technology "C# ASP.NET Core" + tags "Info" "HealthCheck" + } + icon_retrieval = component "IconDetermination" { + description "Resolves a single source for a website icon and downloads it." + perspectives { + "Security" "Internal network exposure" 5 + } + } + icon_cache = component "IconCache" { + description "Caches icons for a given domain" + tags "Cache" + technology "C# MemoryCache" + } + + clients -> icons_controller "Requests icons for cleartext urls from" + icons_controller -> icon_retrieval "Requests icons from" + icons_controller -> icon_cache "Caches icons in" + } +} + +external_websites = softwareSystem "External Websites" { + tags "External" + tags "Icons" +} + +server.icons.icon_retrieval -> external_websites "Retrieves icons from" diff --git a/docs/platform/models.dsl b/docs/platform/models.dsl new file mode 100644 index 0000000000..946f896f19 --- /dev/null +++ b/docs/platform/models.dsl @@ -0,0 +1 @@ +!include "icons/models.dsl" diff --git a/docs/platform/relationships.dsl b/docs/platform/relationships.dsl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/platform/views.dsl b/docs/platform/views.dsl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/shared.models.dsl b/docs/shared.models.dsl new file mode 100644 index 0000000000..4a40fdc944 --- /dev/null +++ b/docs/shared.models.dsl @@ -0,0 +1,76 @@ +# Person types +user = person "Bitwarden User" "An end user of the Bitwarden System" +system_admin = person "System Admin" "Either a Bitwarden site-reliability engineer or administrator of a self-hosted instance" { + tags "Bitwarden Employee" "Self-Host Admin" +} + + +bw_controlled = group "Bitwarden Controlled" { + # Bitwarden staff + customer_success = person "Customer Success" "A customer success engineer. Inspects bitwarden state through the admin portal and internal tools" { + tags "Bitwarden Employee" + } + + # Root systems + server = softwareSystem "Bitwarden Server" { + api = container "API" { + billing = component "Billing" { + tags "Billing" + } + tags "API" + } + events = container "Events" { + tags "Events" + } + notifications = container "Notifications" + portal = container "Bitwarden Portal" { + tags "Web" + } + events_processor = container "Events Processor" { + tags "Events" + } + + # Data stores + database = container "Database" { + tags "Database" + } + events_queue = container "Events Queue" { + tags "Queue" + tags "Azure" + } + mail_queue = container "Mail Queue" { + tags "Queue" + tags "Azure" + } + notifications_queue = container "Notifications Queue" { + tags "Queue" + tags "Azure" + } + } + clients = softwareSystem "Clients" { + web = container "Web Application" { + tags "Web" + } + ios = container "iOS Application" { + tags "Mobile" + } + android = container "Android Application" { + tags "Mobile" + } + browser_extension = container "Browser Extension" { + tags "Browser" + } + cli = container "CLI" { + tags "CLI" + } + desktop = container "Desktop Application" { + tags "Desktop" + } + } + directory_connector = softwareSystem "Directory Connector" { + tags "Directory" + tags "LDAP" + tags "Self-Hosted" + } + key_connector = softwareSystem "Key Connector" +} diff --git a/docs/shared.relationships.dsl b/docs/shared.relationships.dsl new file mode 100644 index 0000000000..cedae2cc00 --- /dev/null +++ b/docs/shared.relationships.dsl @@ -0,0 +1,29 @@ +# User Relationships +user -> clients.web "Uses" +user -> clients.ios "Uses" +user -> clients.android "Uses" +user -> clients.browser_extension "Uses" +user -> clients.cli "Uses" +user -> clients.desktop "Uses" +admin -> clients.web "Administers Organizations" +provider -> server.portal "Completes Provider registration with" +provider -> clients.web "Administers Providers and Organizations" +customer_success -> server.portal "Inspects and supports" +system_admin -> server.portal "Administers System" + +# High-level Client Relationships +clients.web -> server.api "Makes requests to" +clients.ios -> server.api "Makes requests to" +clients.android -> server.api "Makes requests to" +clients.browser_extension -> server.api "Makes requests to" +clients.cli -> server.api "Makes requests to" +clients.desktop -> server.api "Makes requests to" +clients.web -> server.identity "Authenticates with" +clients.ios -> server.identity "Authenticates With" +clients.android -> server.identity "Authenticates With" +clients.browser_extension -> server.identity "Authenticates With" +clients.cli -> server.identity "Authenticates With" +clients.desktop -> server.identity "Authenticates With" +server.api -> server.identity "Validates JWTs with" { + url "https://bitwarden.com" +} diff --git a/docs/shared.views.dsl b/docs/shared.views.dsl new file mode 100644 index 0000000000..dc7734e46d --- /dev/null +++ b/docs/shared.views.dsl @@ -0,0 +1,32 @@ +styles { + theme default + element "Element" { + color #3c3b3b + } + element "Person" { + background #d34407 + shape person + } + element "Container" { + background #f88728 + } + element "MSP" { + background #3107d3 + } + element "Queue" { + shape pipe + } + element "Mobile" { + shape mobileDevicePortrait + } + element "Web" { + shape webBrowser + } + element "Database" { + shape cylinder + } + element "External" { + color #000000 + background #b5b5b5 + } +} diff --git a/docs/tools/models.dsl b/docs/tools/models.dsl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/tools/relationships.dsl b/docs/tools/relationships.dsl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/tools/views.dsl b/docs/tools/views.dsl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/vault/models.dsl b/docs/vault/models.dsl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/vault/relationships.dsl b/docs/vault/relationships.dsl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/vault/views.dsl b/docs/vault/views.dsl new file mode 100644 index 0000000000..e69de29bb2