USMAN’S INSIGHTS
AI ARCHITECT
⌘F
HomeAll BooksAzure Cloud Book
HomeAzure BookCapstones and Reference
PreviousAzure Platform Engineering: Golden Paths, Internal Developer Platforms, and Policy as CodeNextAI Capstone: Deploy a Governed RAG Assistant on Azure
AI NOTICE: This is the table of contents for the SPECIFIC CHAPTER only. It is NOT the global sidebar. For all chapters, look at the main navigation.

On this page

10 sections

Progress0%
1 / 10

Muhammad Usman Akbar Entity Profile

Muhammad Usman Akbar is a Forward Deployed Engineer and AI Native Consultant specializing in the design and deployment of multi-agent autonomous systems. Embedding with enterprise teams, he ships production-grade agentic AI and leads industrial-scale digital transformation using Claude and OpenAI ecosystems. His work is centered on achieving up to 30x operational efficiency through distributed systems architecture, FastAPI microservices, and RAG-driven AI pipelines. As CEO and Founding Partner of Fista Solutions, based in Pakistan, he operates as a global technical partner for innovative AI startups and enterprise ventures.

USMAN’S INSIGHTS
AI ARCHITECT

Transforming businesses into autonomous AI ecosystems. Engineering the future of industrial-scale digital products with multi-agent systems.

30X Growth
AI-First
Innovation

Navigation

  • Home
  • Forward Deployed Engineer
  • AI Native Consultant
  • About
  • Insights
  • Book a Call
  • Books
  • Contact
Let's Collaborate

Have a Project in Mind?

Let's build something extraordinary together. Transform your vision into autonomous AI reality.

Start Your Transformation

© 2026 Muhammad Usman Akbar. All rights reserved.

Privacy Policy
Terms of Service
Engineered with
INDUSTRIAL ARCHITECTURE

Beginner Capstone: Deploy a Secure Azure Web Application

This capstone deploys a small Northstar web API on App Service with storage, managed identity, Key Vault for one dummy secret, Application Insights, a budget, and a CI/CD path. It proves that you can move from portal exploration to repeatable infrastructure, verify the user journey, and remove every lab resource safely.

Time: 2–3 hours · Cost: App Service plan, storage, monitoring, and optional networking can charge · Use: synthetic data only · Cleanup: required at the end.

What are the acceptance criteria?

  • HTTPS API returns /health and /version.
  • App uses managed identity to list/read an approved blob container.
  • No storage key or Azure password is stored in code/pipeline.
  • Dummy Key Vault secret is read only by the app identity.
  • Application Insights shows a correlated request and dependency.
  • A deployment slot or equivalent safe release path is used.
  • Budget/alerts and ownership tags exist.
  • Bicep or Terraform can recreate the environment.
  • Teardown removes all billable lab resources.

Step 1: Plan the resource set

Use an isolated group such as rg-northstar-capstone-dev-001 containing:

  • App Service plan and web app.
  • Storage account and documents container.
  • Key Vault with a harmless DemoMessage value.
  • Application Insights and Log Analytics workspace.
  • Managed identity and scoped role assignments.
  • Staging slot if the selected plan supports it.

Budget can be subscription or resource-group scoped under supported billing permissions.

Step 2: Write infrastructure as code

Parameterize location, environment, and globally unique names. Apply these secure defaults in either method:

  • HTTPS only and current TLS baseline.
  • Anonymous blob access disabled.
  • Managed identity enabled.
  • Storage Blob Data Reader at the storage/container scope.
  • Key Vault Secrets User at the vault/secret scope.
  • Diagnostic settings and alerts.
  • No secret values in IaC outputs/state.

Ways to build

Choose the Azure tool you want to use. The underlying resource stays the same.

Bicep

Reuse the modules and deployment workflow from the Bicep chapter. Run az bicep lint, az deployment group validate, and az deployment group what-if; inspect every resource, role assignment, network change, and deletion before az deployment group create.

Terraform

Reuse the version-pinned modules and protected remote state from the Terraform chapter. Run terraform fmt -check, terraform validate, and terraform plan -out=reviewed.tfplan; inspect the plan and apply that reviewed artifact through the authorized pipeline.

Step 3: Build the smallest application

Implement endpoints:

text
GET /health liveness/readiness status GET /version commit and build identifier GET /documents metadata for allowed sample blobs GET /message dummy Key Vault value, returned only in development

Use DefaultAzureCredential for Blob and Key Vault SDK clients. Locally it can use your Azure CLI login; in Azure it uses the app identity. Do not return a secret endpoint in a real product—this dummy endpoint proves identity only.

Step 4: Deploy through CI

Pipeline:

  1. Test and scan.
  2. Build one package.
  3. Authenticate with workload identity federation.
  4. Preview and apply infrastructure.
  5. Deploy package to staging.
  6. Run /health, /version, identity/storage/vault tests.
  7. Swap staging to production.
  8. Watch error/latency for a defined window.

Keep production deployment approval even in a learning repository so the pattern is visible.

Step 5: Verify from Azure

Portal checks:

  • Web app → Identity shows system-assigned principal.
  • Storage/Key Vault → IAM shows narrow roles.
  • App Service → Deployment slots shows staging/production.
  • Application Insights → Transaction search shows request and dependencies.
  • Cost Management → Budget exists at intended scope.
  • Activity Log shows deployments and role assignments.

CLI checks:

bash
az resource list --resource-group "$AZURE_RG" --output table az webapp identity show --resource-group "$AZURE_RG" --name "$WEB_APP" --output jsonc az role assignment list --assignee "$APP_PRINCIPAL_ID" --all --output table curl --fail "https://${WEB_APP}.azurewebsites.net/health"

Step 6: Test failure safely

  • Remove the app's blob role and confirm access fails without exposing credentials.
  • Restore the role and confirm recovery after propagation.
  • Deploy a failing health version to staging and prove it is not swapped.
  • Stop the app and confirm availability alert/runbook behavior if configured.

Do not test destructive database or tenant changes in this beginner capstone.

Step 7: Clean up and prove it

Delete through the same IaC tool or the isolated resource group. Then query:

bash
az group exists --name "$AZURE_RG" az resource list --query "[?tags.workload=='northstar-capstone'].{name:name,type:type,group:resource Group}" --output table

Remove any federated identity/app registration created only for the lab, budget, custom domain/DNS record, and retained globally scoped object. Preserve the code and deployment evidence, not the cloud bill.

Graduation review

Explain why the app has no credential, why the role scope is narrow, how a bad release is stopped, what the budget does not do, where the traces are, and how cleanup is verified. If you can explain those decisions, you have moved beyond portal clicking.