Skip to content

Commit 8858f11

Browse files
committed
Remove legacy run-local helper; rebaseline docs and references; add DAB remediation CSV
1 parent 2f673c8 commit 8858f11

24 files changed

+451
-119
lines changed

SAMPLE_GALLERIES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A visual index of sample app galleries and the management portal. Click a thumbn
66

77
| Management Portal | TaskTracker |
88
|---|---|
9-
| [![Management Portal](management-portal/docs/thumbnails/ManagmentPortal-Dashboard-Screenshot-thumb.png)](management-portal/docs/SCREENSHOTS.md)<br>**Management Portal**<br>Overview dashboard, tenant and cell management screenshots. | [![TaskTracker](samples/tasktracker/docs/thumbnails/TaskTrack-HomePage-screenshot.png)](samples/tasktracker/docs/SCREENSHOTS.md)<br>**TaskTracker**<br>Home, New Task and Edit Task screenshots. |
9+
| [![Management Portal](management-portal/docs/thumbnails/ManagmentPortal-Dashboard-Screenshot-thumb.png)](management-portal/docs/SCREENSHOTS.md)<br>**Management Portal**<br>Overview dashboard, tenant and cell management screenshots. | [![TaskTracker](samples/TaskTracker/docs/thumbnails/TaskTrack-HomePage-screenshot-thumb.png)](samples/TaskTracker/docs/SCREENSHOTS.md)<br>**TaskTracker**<br>Home, New Task and Edit Task screenshots. |
1010

1111
---
1212

docs/CAPABILITIES_MATRIX.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ This matrix summarizes implemented, in-progress, and planned features across the
55
| Capability | Status | Notes |
66
|-----------:|:------:|:-----|
77
| Core infra (Bicep) | Implemented | Global/hub/regional layers and sample deployments. |
8-
| Management Portal | Implemented | Blazor UI with DAB GraphQL; currently migrating from mock data to DAB-backed live data. |
9-
| DAB (Data API Builder) | Deployed | Custom image and schema present; monitor container app health and ensure IaC aligns targetPort and image config. |
8+
| Management Portal | Implemented | Blazor UI with GraphQL backend (Hot Chocolate); older DAB references may remain in the repo. |
9+
| Data API Builder (DAB) | Legacy | Custom image and schema may remain as a legacy artifact; prefer Hot Chocolate for new deployments. |
1010
| Seeder (Cosmos) | Implemented | Seeder with AAD auth; required RBAC adjustments to seed data. |
1111
| CI (image build & push) | Implemented (basic) | GitHub Actions with image build; recommend OIDC federation for minimal secrets. |
1212
| Key Vault integration | Implemented | Secrets used; recommend migration from container-app secrets to KV references for production. |

docs/DEPLOYMENT_GUIDE.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ The template includes subscription-scope toggles to reduce Microsoft Defender fo
4646
These set Microsoft.Security/pricings resources to Free or Standard as appropriate. CSPM (Arm) remains Free to preserve secure score and policy evaluations.
4747

4848

49-
If you want the fastest, repeatable route to a working Management Portal backed by live Cosmos data, follow these steps. This path deploys the smoke sample, seeds representative baseline data using the Seeder (AAD RBAC), and verifies Portal ↔ DAB ↔ Cosmos connectivity.
49+
If you want the fastest, repeatable route to a working Management Portal backed by live Cosmos data, follow these steps. This path deploys the smoke sample, seeds representative baseline data using the Seeder (AAD RBAC), and verifies Portal ↔ GraphQL backend ↔ Cosmos connectivity. The GraphQL backend is implemented using Hot Chocolate.
50+
51+
Note: Hot Chocolate is the actively supported GraphQL backend used throughout this repository. User-facing documentation has been rebaselined to focus on Hot Chocolate so new developers see the current, supported stack.
5052

5153
1. Create a resource group and deploy the smoke sample (lab-friendly parameters):
5254

@@ -75,7 +77,7 @@ dotnet run
7577

7678
4. Verify the deployment and seeded data.
7779

78-
- Retrieve deployment outputs to get the Portal and DAB endpoints:
80+
- Retrieve deployment outputs to get the Portal and GraphQL backend endpoints (note: some deployment outputs retain legacy names like `dab-graphql-url`):
7981

8082
```powershell
8183
pwsh -Command "az deployment group show --resource-group rg-stamps-smoke --name $(az deployment group list --resource-group rg-stamps-smoke --query '[0].name' -o tsv) --query properties.outputs"
@@ -84,7 +86,7 @@ pwsh -Command "az deployment group show --resource-group rg-stamps-smoke --name
8486
- Open the Management Portal URL in a browser and confirm seeded tenants/cells are visible. Optionally test the GraphQL endpoint:
8587

8688
```powershell
87-
pwsh -Command "curl -s -X POST 'https://<DAB_GRAPHQL_URL>/graphql' -H 'Content-Type: application/json' -d '{\"query\":\"{ tenants { id name } }\"}'"
89+
pwsh -Command "curl -s -X POST 'https://<GRAPHQL_URL>/graphql' -H 'Content-Type: application/json' -d '{\"query\":\"{ tenants { id name } }\"}'"
8890
```
8991

9092
Notes:
@@ -153,7 +155,8 @@ Steps:
153155
1) Start local data stack (Cosmos Emulator, Portal, GraphQL API) [optional]
154156

155157
- PowerShell (Windows):
156-
- pwsh -File ./scripts/run-local.ps1
158+
- Note: `scripts/run-local.ps1` has been removed. To run locally, start the portal directly:
159+
`dotnet run --project ./management-portal/src/Portal/Portal.csproj`
157160
- Default ports: Cosmos Emulator 8085, Portal 8081, GraphQL API 8082
158161

159162
2) Ensure local.settings.json
@@ -181,7 +184,7 @@ Steps:
181184
Tips:
182185

183186
- Port busy? Run: func start --port 7072
184-
- Cosmos TLS trust: the run-local.ps1 script imports the emulator certificate into CurrentUser/Root; if calls fail, open <https://localhost:8085/_explorer/emulator.pem> once in a browser to trust the cert.
187+
-- Cosmos TLS trust: the legacy `run-local.ps1` previously imported the emulator certificate into CurrentUser/Root. If SSL calls fail, open <https://localhost:8085/_explorer/emulator.pem> in a browser and import/accept the cert manually, or run the sample import steps in `docs/DEVELOPER_QUICKSTART.md`.
185188
- Functions task in VS Code: use the default “build (functions)” task, then start with func start from the AzureArchitecture folder.
186189

187190
## 📖 Key Concepts Before You Start
@@ -1186,8 +1189,8 @@ Use this quick checklist before promoting a test deployment to production. Cross
11861189
- Authentication and authorization
11871190
- Enable built‑in auth for Azure Container Apps and Functions; require login for all endpoints.
11881191
- Map Entra ID groups to application roles (e.g., platform.admin). Disable anonymous access and lock down CORS.
1189-
- Propagate platform roles to DAB; ensure non‑admins have read‑only or least‑privilege permissions.
1190-
- API/DAB hardening
1192+
- Propagate platform roles to the GraphQL backend (or to legacy DAB deployments); ensure non‑admins have read‑only or least‑privilege permissions.
1193+
- API hardening for the GraphQL backend
11911194
- Disable public schema mutation where not needed; restrict filters/projections; rate‑limit externally exposed routes via APIM/App Gateway.
11921195
- Turn off development features in production (verbose errors, GraphQL introspection if policy requires).
11931196
- Data and Cosmos DB settings

docs/DEVELOPER_QUICKSTART.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,18 @@ cd StampsPattern
2323

2424
## 2) Start local data stack (scripted)
2525

26-
Recommended: use the helper to start Cosmos Emulator, DAB, and the portal.
26+
Recommended: use the helper to start Cosmos Emulator and the portal. The portal hosts a Hot Chocolate GraphQL endpoint by default; starting Data API Builder (DAB) is optional and only needed for legacy compatibility testing.
27+
28+
Note: Hot Chocolate is the active GraphQL backend. References and legacy names (for example `DAB_GRAPHQL_URL` or `ca-stamps-dab`) are being rebaselined across the documentation; before renaming or removing production secrets or resource identifiers, follow a staged verification and migration procedure to avoid service disruptions.
2729

2830
```powershell
29-
pwsh -File ./scripts/run-local.ps1
31+
Note: `scripts/run-local.ps1` has been removed. Start the portal locally with:
32+
`dotnet run --project ./management-portal/src/Portal/Portal.csproj`
33+
Seed sample data with:
34+
`dotnet run --project ./management-portal/Seeder/Seeder.csproj`
3035
```
3136

32-
Default ports: Cosmos 8085, DAB 8082, Portal 8081. The script also helps trust the emulator cert.
37+
Default ports: Cosmos 8085, Portal 8081. (Legacy DAB port: 8082) The script also helps trust the emulator cert.
3338

3439
Manual alternative (optional):
3540

@@ -64,7 +69,7 @@ At minimum set Cosmos and identity settings:
6469
// "B2C_POLICY": "your-policy"
6570
}
6671
}
67-
```jsonc
72+
```
6873

6974
Tip: The emulator account key shown above is the standard sample key; adjust if your emulator differs.
7075

@@ -79,11 +84,10 @@ If `func` isn’t found, ensure your npm global bin is on PATH.
7984

8085
## 5) Build and run the Functions app
8186

82-
```powershell
8387
```powershell
8488
cd ./AzureArchitecture
85-
dotnet build
86-
func start
89+
dotnet build
90+
func start
8791
```
8892

8993
If the default port is busy, try `func start --port 7072`.
@@ -110,7 +114,7 @@ func start --verbose
110114
111115
# Check port conflicts, try another port
112116
func start --port 7072
113-
```bash
117+
```
114118

115119
See also: Known Issues → Functions host exits on startup or endpoints not reachable locally.
116120

docs/DOCS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Your single source of truth for the Azure Stamps Pattern - Architecture (ASPA),
55
## 🎯 Start Here — 60 second checklist
66

77
- Read `README.md` (project overview & prerequisites).
8-
- Run the Live Data Path: `docs/LIVE_DATA_PATH.md` to seed Cosmos and validate Management Portal ↔ DAB ↔ Cosmos.
8+
- Run the Live Data Path: `docs/LIVE_DATA_PATH.md` to seed Cosmos and validate Management Portal ↔ Hot Chocolate (GraphQL) ↔ Cosmos.
99
- For local development: follow `docs/DEVELOPER_QUICKSTART.md` (run Functions + Portal locally).
1010
- For deployments: open `docs/DEPLOYMENT_GUIDE.md` and use `scripts/deploy.ps1` or Bicep templates as documented.
1111
- Fast path: for a complete single-subscription deployment end-to-end, use the [Three-Step Deployment Guide](./THREE_STEP_DEPLOYMENT_GUIDE.md).

docs/GLOSSARY.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,13 @@ Secure store for secrets, keys, and certificates.
133133
- **Integration**: Managed identity; reference secrets in app settings and Bicep
134134
- **Docs**: <a href="https://learn.microsoft.com/azure/key-vault/general/overview" target="_blank" rel="noopener" title="Opens in a new tab">Key Vault overview</a>&nbsp;<sup>↗</sup>
135135

136-
### **Data API Builder (DAB)**
136+
### **GraphQL backend (Hot Chocolate) — Data API Builder (DAB) (legacy)**
137137

138-
Runtime that exposes databases as REST/GraphQL with role-based access.
138+
The Management Portal exposes a GraphQL API for control-plane data. The primary, actively maintained implementation uses Hot Chocolate (a .NET GraphQL server). Older references to Data API Builder (DAB) still exist in archive material and some operational scripts.
139139

140-
- **Use Cases**: Data plane for the Management Portal with Easy Auth headers
141-
- **Docs**: <a href="https://learn.microsoft.com/azure/data-api-builder/overview" target="_blank" rel="noopener" title="Opens in a new tab">Data API Builder overview</a>&nbsp;<sup>↗</sup>
140+
- **Use Cases**: Exposes control-plane data (tenants, cells, operations) via GraphQL with role-based access patterns
141+
- **Notes**: Hot Chocolate is the recommended GraphQL backend. References to Data API Builder (DAB) in the repo are legacy; we are rebaselining docs and examples to prefer Hot Chocolate. Some runtime names and secrets still include "DAB"; follow a staged verification and migration plan before renaming live secrets or resources.
142+
- **Docs**: Hot Chocolate: <https://chillicream.com/docs/hotchocolate> & DAB: <https://learn.microsoft.com/azure/data-api-builder/overview> (legacy)
142143

143144
## 🏠 **Tenancy Models**
144145

docs/KNOWN_ISSUES.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Practical fixes and workarounds for common issues across development, deployment
2222
>
2323
> 1. Bicep/template errors — run `bicep build <file>.bicep` and `az deployment group what-if` → see [Deployment Issues](#-deployment-issues).
2424
> 2. Name conflicts — change `resourceToken` or use uniqueString(resourceGroup().id) → [Deployment Issues](#-deployment-issues).
25-
> 3. DAB crashing / port mismatch — confirm `ASPNETCORE_URLS` vs Container App `targetPort`[Deployment Issues](#-deployment-issues).
26-
> 4. Portal timeouts to DAB — check `DAB_GRAPHQL_URL` secret and Container App logs → [Troubleshooting Playbooks](#portal-→-dab-connectivity-decision-tree).
25+
> 3. GraphQL backend crashing / port mismatch — confirm `ASPNETCORE_URLS` vs Container App `targetPort`[Deployment Issues](#-deployment-issues). # note: env var names like `ASPNETCORE_URLS` are still used by the image
26+
> 4. Portal timeouts to the GraphQL backend — check `DAB_GRAPHQL_URL` secret and Container App logs → [Troubleshooting Playbooks](#portal-→-dab-connectivity-decision-tree).
2727
> 5. Seeder 401/403 — grant Cosmos DB Data Contributor to the identity and use DefaultAzureCredential locally → [Development Issues](#-development-issues).
2828
> 6. Key Vault access denied — grant `get`/`list` or Key Vault Secrets User RBAC to the principal → [Security Issues](#-security-issues).
2929
> 7. Cosmos 429 throttling — implement retries/backoff and scale RU/s or enable autoscale → [Performance Issues](#-performance-issues).
@@ -150,7 +150,7 @@ flowchart LR
150150

151151
## 🔁 Troubleshooting Playbooks (decision trees)
152152

153-
Below are three focused decision trees that operators reach for frequently: Portal → DAB connectivity, DAB container startup, and AAD/authentication issues. Use these as quick visual playbooks during incidents.
153+
Below are three focused decision trees that operators reach for frequently: Portal → GraphQL backend connectivity, GraphQL container startup, and AAD/authentication issues. Use these as quick visual playbooks during incidents. Note: runtime names and secrets like `DAB_GRAPHQL_URL` may still be used for compatibility.
154154

155155
### 1) Portal → DAB connectivity decision tree
156156

@@ -166,7 +166,7 @@ flowchart TD
166166
P2 --> P4{Is DAB endpoint configured (DAB_GRAPHQL_URL)?}
167167
P3 --> P4
168168
169-
P4 -->|No| P5[Set secret `DAB_GRAPHQL_URL` to Container App ingress FQDN + /graphql]
169+
P4 -->|No| P5[Set secret `DAB_GRAPHQL_URL` (or GraphQL backend URL secret) to Container App ingress FQDN + /graphql]
170170
P4 -->|Yes| P6[Ping DAB endpoint from Portal (curl/postman) using managed identity header if required]
171171
172172
P6 -->|Connection refused / DNS| P7[Check Container App ingress FQDN, DNS CNAME, and firewall / private endpoint settings]
@@ -180,7 +180,7 @@ flowchart TD
180180
P10 --> P12
181181
P11 --> P12
182182
183-
P12 --> P13[If still failing: redeploy DAB with corrected targetPort and validate ACR pull permissions]
183+
P12 --> P13[If still failing: redeploy the GraphQL backend (or legacy DAB image) with corrected targetPort and validate ACR pull permissions]
184184
P13 --> P14[If redeploy fails: capture logs, open issue, escalate to infra on-call]
185185
```
186186

@@ -465,7 +465,7 @@ func start --port 7072
465465
466466
# 5) Ensure local.settings.json points to the emulator
467467
# - CosmosDbConnection: https://localhost:8085/
468-
# - The run-local.ps1 script imports the emulator cert; if SSL errors persist,
468+
# - The old `run-local.ps1` helper previously imported the emulator cert; it has been removed. If SSL errors persist,
469469
# open https://localhost:8085/_explorer/emulator.pem in a browser once to trust it.
470470
471471
# 6) Avoid overlapping builds/hosts

docs/LANDING_ZONES_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Practical guide to placing Azure Stamps Pattern components within Azure Landing
3535

3636
- Platform landing zones host shared enterprise services: Identity (process), Management, Connectivity, and Shared Services (global edge, shared gateways). Do not put all infra into the Management subscription.
3737
- Application (workload) landing zones host your CELLs (shared or dedicated) per region. Use one subscription per CELL for isolation, quotas, and billing clarity.
38-
- Control Plane (management portal, DAB GraphQL, control metadata): either a) Platform Shared-Services subscription if used by many apps/org-wide, or b) a dedicated “ControlPlane” workload subscription under Landing Zones for autonomy and SDLC separation.
38+
- Control Plane (management portal, GraphQL backend, control metadata): either a) Platform Shared-Services subscription if used by many apps/org-wide, or b) a dedicated “ControlPlane” workload subscription under Landing Zones for autonomy and SDLC separation.
3939

4040
### 🖼️ Visual: High-Level Placement
4141

docs/LIVE_DATA_PATH.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
11
---
2-
# Live Data Path — Portal → DAB → Cosmos (quick guide)
2+
# Live Data Path — Portal → GraphQL → Cosmos (quick guide)
33

44
Purpose
55

6-
- One-page smoke path and quick checks to validate the Management Portal consumes live data from Data API Builder (DAB) backed by Cosmos DB.
6+
- One-page smoke path and quick checks to validate the Management Portal consumes live data from the GraphQL backend (Hot Chocolate) backed by Cosmos DB.
77

88
Who this is for
99

1010
- Developers, platform engineers, and operators who need a fast, repeatable set of checks to confirm the live-data flow is healthy.
1111

1212
Overview
1313

14-
- Path: Management Portal (UI) → DAB (GraphQL) → Cosmos DB (control-plane containers: tenants, cells, operations)
15-
- Secrets and identity: Portal authenticates users via AAD; Portal calls DAB over internal network; DAB uses MI or connection string to read Cosmos.
14+
- Path: Management Portal (UI) → GraphQL backend (Hot Chocolate) → Cosmos DB (control-plane containers: tenants, cells, operations)
15+
- Secrets and identity: Portal authenticates users via AAD; Portal calls the GraphQL backend over the internal network; the GraphQL backend uses a managed identity or connection string to read Cosmos.
1616

1717
Quick diagram
1818

1919
```mermaid
2020
flowchart LR
2121
Portal[Management Portal]
22-
DAB[Data API Builder (Container App)]
22+
GraphQL[GraphQL (Hot Chocolate) (Container App)]
2323
Cosmos[Cosmos DB - stamps-control-plane]
2424
25-
Portal -->|HTTP GraphQL POST| DAB
26-
DAB -->|Cosmos SDK / REST| Cosmos
25+
Portal -->|HTTP GraphQL POST| GraphQL
26+
GraphQL -->|Cosmos SDK / REST| Cosmos
2727
```mermaid
2828

2929
Essential variables
3030

31-
- DAB GraphQL URL (secret): DAB_GRAPHQL_URL — e.g. https://<internal-fqdn>/graphql
32-
- Portal secret/setting: ensure Portal reads `DAB_GRAPHQL_URL` from container-app secrets or Key Vault
31+
- GraphQL URL (secret): DAB_GRAPHQL_URL — e.g. https://<internal-fqdn>/graphql (kept for backwards compatibility)
32+
- Portal secret/setting: ensure Portal reads `DAB_GRAPHQL_URL` from container-app secrets or Key Vault. Note: the portal uses Hot Chocolate as the GraphQL implementation; `DAB_*` runtime names are retained for compatibility and should not be renamed without an infra/secret migration plan.
33+
34+
Note: The GraphQL backend used in this project is Hot Chocolate. `DAB_*` names and references in this document are legacy compatibility artifacts. Runtime identifiers such as `DAB_GRAPHQL_URL` and `ca-stamps-dab` are intentionally preserved — do not rename them without a coordinated infra/secrets migration.
3335
- Seeder location: `AzureArchitecture/Seeder` (uses DefaultAzureCredential)
3436

3537
Smoke checks (fast)
3638

37-
1) Validate DAB is healthy (Container Apps)
39+
1) Validate GraphQL backend is healthy (Container Apps)
3840

39-
# ```powershell
4041
# List revisions and health
41-
az containerapp revision list -g rg-stamps-mgmt -n ca-stamps-dab -o table
42+
az containerapp revision list -g rg-stamps-mgmt -n ca-stamps-dab -o table # resource name retained for compatibility
4243

4344
# Show ingress configuration (confirm targetPort matches container)
4445
az containerapp show -g rg-stamps-mgmt -n ca-stamps-dab --query properties.configuration.ingress
45-
```bash
4646

47-
2) Tail DAB logs (look for startup errors and GraphQL listening)
47+
2) Tail GraphQL backend logs (look for startup errors and GraphQL listening). The Container App resource may still be named `ca-stamps-dab` for backward compatibility.
4848

4949
```powershell
5050
az containerapp logs show -g rg-stamps-mgmt -n ca-stamps-dab --container dab --tail 200
5151
```
5252

5353
1) Quick GraphQL introspection / simple query
5454

55-
Using PowerShell (Invoke-RestMethod) — replace `$DAB` with the DAB GraphQL URL (from secret/outputs):
55+
Using PowerShell (Invoke-RestMethod) — replace `$DAB` with the GraphQL backend URL (from secret/outputs). Legacy secret names like `DAB_GRAPHQL_URL` may still be used:
5656

5757
```powershell
58-
$DAB = 'https://<dab-fqdn>/graphql'
58+
$DAB = 'https://<graphql-backend-fqdn>/graphql'
5959
$body = @{ query = 'query { __schema { queryType { name } } }' } | ConvertTo-Json
6060
6161
# Use -UseBasicParsing if needed in older PowerShell

0 commit comments

Comments
 (0)