Identity, Entra Agent Identities & RBAC Matrix
Reference for Microsoft Entra ID app registrations, Agent Identities for OBO token exchange, and per-service Managed Identity RBAC assignments.
Microsoft Entra ID authenticates users and AI agents across BookWorm, while user-assigned Managed Identities authorize service-to-resource access in Azure without static passwords or connection keys. Frontends maintain user sessions with Better Auth backed by Entra ID, and AI agents exchange user assertions via On-Behalf-Of (OBO) federated credentials.
Identity, Agent OBO, and RBAC Boundaries
Loading graph...
Component & Responsibility
| Component | Role | Protocol / Interface | Persistence / State | Notes |
|---|---|---|---|---|
| OAuth APIServicev1.0.0OAuth APIExternal OAuth 2.0 and OIDC identity provider API used by BookWorm clients and services to authenticate users, issue tok...Ownerplatform-engineering-teamDiagramOpen docs | Primary user and API identity provider | OAuth 2.0 / OIDC / JWT Bearer | External tenant | Local dev cert in run mode; federated MI in publish mode |
| Entra Agent Identities | Federated OBO agent blueprints & identities | Token Exchange FIC | External tenant (single-tenant) | Provisioned in publish mode only |
| Frontend Sessions | Browser session & OAuth2 callback handling | Better Auth + Entra ID | Cookie / session state | Commerce shares the Storefront session |
| Quartz Dashboard Auth | Administrative UI authentication | OpenID Connect (/signin-oidc) | Session cookie | Requires Entra ID admin app role |
| Managed Identities | Passwordless service-to-Azure RBAC | Azure Workload Identity | Azure RBAC assignments | Environment identity holds AcrPull |
Configuration & Operational Defaults
App Roles & OAuth2 Scopes
| Role value | Display name | Allowed member types | Description |
|---|---|---|---|
admin | Admin | User, Application | Manages all aspects of the application |
business_user | BusinessUser | User, Application | Manages books and catalog reference data |
customer | Customer | User, Application | Browses and purchases books |
Each protected .NET API registers read and write scopes (12 total):
| Service | Read scope | Write scope |
|---|---|---|
| Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs | catalog_read | catalog_write |
| MCP ServerServicev1.0.0MCP ServerInternal stateless Streamable HTTP MCP service that exposes read-only Catalog lookup tools and reusable AI prompts. PublishesListBooksGrpc, GetBookDetailsGrpc +2Ownerai-capabilities-teamDiagramRepositoryOpen docs | mcptools_read | mcptools_write |
| Basket APIServicev1.0.0Basket APIInternal HTTP and gRPC service for managing customer-scoped shopping baskets, Catalog price enrichment, and post-checkou...PublishesGetBookGrpc, GetBooksGrpc +2SubscribesCreateBasket, UpdateBasket +4APIsOpenAPI, AsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs | basket_read | basket_write |
| Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs | ordering_read | ordering_write |
| Chat APIServicev1.0.0Chat APIInternal HTTP host for BookWorm's interactive multi-agent chat workflow, agent discovery, and session persistence. Ownerai-capabilities-teamDiagramRepositoryOpen docs | chatting_read | chatting_write |
| Rating APIServicev1.0.0Rating APIInternal HTTP and A2A gRPC service for collecting, listing, deleting, and summarizing customer feedback for Catalog book...PublishesFeedbackCreatedIntegrationEvent, FeedbackDeletedIntegrationEventSubscribesCreateFeedback, DeleteFeedback +3APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs | rating_read | rating_write |
Managed Identity RBAC Matrix
| Service | PostgreSQL | Azure Managed Redis | Cosmos DB | Azure Storage | Microsoft Foundry | Other |
|---|---|---|---|---|---|---|
| Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs | Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs | Yes | — | Storage Blob Data Contributor | Cognitive Services User | — |
| Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs | Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs | — | — | Storage Blob Data Owner | Cognitive Services User | — |
| Basket APIServicev1.0.0Basket APIInternal HTTP and gRPC service for managing customer-scoped shopping baskets, Catalog price enrichment, and post-checkou...PublishesGetBookGrpc, GetBooksGrpc +2SubscribesCreateBasket, UpdateBasket +4APIsOpenAPI, AsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs | — | Yes | — | — | — | — |
| Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs | Order DatabaseContainerv1.0.0Order DatabaseAuthoritative PostgreSQL system of record owned by the Ordering bounded context for buyers, accepted orders, purchase-ti...Ownercommerce-fulfillment-teamDiagramOpen docs | Yes | — | — | — | — |
| Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs | — | — | — | Storage Blob Data Owner | — | Durable Task Scheduler |
| Chat APIServicev1.0.0Chat APIInternal HTTP host for BookWorm's interactive multi-agent chat workflow, agent discovery, and session persistence. Ownerai-capabilities-teamDiagramRepositoryOpen docs | — | — | — | Storage Blob Data Contributor | Cognitive Services User | — |
| Rating APIServicev1.0.0Rating APIInternal HTTP and A2A gRPC service for collecting, listing, deleting, and summarizing customer feedback for Catalog book...PublishesFeedbackCreatedIntegrationEvent, FeedbackDeletedIntegrationEventSubscribesCreateFeedback, DeleteFeedback +3APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs | — | Yes | Rating DatabaseContainerv1.0.0Rating DatabaseAuthoritative Azure Cosmos DB system of record owned by the Reviews bounded context for customer feedback documents part...Ownercatalog-experience-teamDiagramOpen docs | — | Cognitive Services User | — |
| Notification APIServicev1.0.0Notification APIInternal background worker that consumes order commands from Kafka, renders MJML email templates, and submits mail over ...SubscribesPlaceOrderCommand, CancelOrderCommand +1APIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs | — | Yes | — | — | — | — |
| Scheduler ServiceServicev1.0.0Scheduler ServiceSingle-host Quartz.NET job execution engine and operational dashboard UI for scheduling recurring platform jobs and insp...PublishesProcessVectorBatchIntegrationEventAPIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs | Scheduler DatabaseContainerv1.0.0Scheduler DatabaseAuthoritative PostgreSQL database owned by the Platform bounded context for Quartz.NET job definitions, cluster locks, e...Ownerplatform-engineering-teamDiagramOpen docs | — | — | — | — | — |
| MCP ServerServicev1.0.0MCP ServerInternal stateless Streamable HTTP MCP service that exposes read-only Catalog lookup tools and reusable AI prompts. PublishesListBooksGrpc, GetBookDetailsGrpc +2Ownerai-capabilities-teamDiagramRepositoryOpen docs, Gateway, Frontends, Presidio APIServicev1.0.0Presidio APIExternal HTTP sidecar API for detecting PII in text and anonymizing detected entities in the Chat and Rating AI agent pi...SubscribesAnalyzeText, AnonymizeText +3APIsOpenAPIOwnerplatform-engineering-teamDiagramOpen docs | — | — | — | — | — | — |
| Environment identity | — | — | — | — | — | AcrPull on ACR |
PostgreSQL assigns each service principal as a Flexible Server administrator. Redis uses the default database access policy. Cosmos DB assigns the built-in Data Contributor role at the account scope.
| Client | Callback path |
|---|---|
| Storefront | /api/auth/oauth2/callback/microsoft-entra-id (via Gateway) |
| Backoffice | /backoffice/api/auth/oauth2/callback/microsoft-entra-id (via Gateway) |
| Commerce | — (shares Storefront session) |
| Quartz Dashboard | /signin-oidc (via Quartz Dashboard host) |
In local run mode, the gateway’s local HTTP endpoint is also registered as a redirect URI. Quartz Dashboard uses OpenID Connect against the tenant v2.0 authority and restricts access to the admin role.
Each Federated Identity Credential (FIC) trusts the parent Entra ID service principal (api://AzureADTokenExchange audience) and is scoped to the deployment environment.
| Identity | Purpose | Assigned workload |
|---|---|---|
| BookWorm Agent Identity Blueprint | Parent agent identity blueprint | Platform-wide |
| BookWorm Chat Agent | OBO token exchange for conversational discovery | Chat APIServicev1.0.0Chat APIInternal HTTP host for BookWorm's interactive multi-agent chat workflow, agent discovery, and session persistence. Ownerai-capabilities-teamDiagramRepositoryOpen docs |
| BookWorm Rating Agent | OBO token exchange for review intelligence | Rating APIServicev1.0.0Rating APIInternal HTTP and A2A gRPC service for collecting, listing, deleting, and summarizing customer feedback for Catalog book...PublishesFeedbackCreatedIntegrationEvent, FeedbackDeletedIntegrationEventSubscribesCreateFeedback, DeleteFeedback +3APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs |
| Azure built-in role | Role definition GUID | Assigned to |
|---|---|---|
| AcrPull | 7f951dda-4ed3-4680-a7ca-43fe172d538d | Environment identity |
| Cognitive Services User | a97b65f3-24c7-4388-baec-2e87135dc908 | Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs, Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs, Chat APIServicev1.0.0Chat APIInternal HTTP host for BookWorm's interactive multi-agent chat workflow, agent discovery, and session persistence. Ownerai-capabilities-teamDiagramRepositoryOpen docs, Rating APIServicev1.0.0Rating APIInternal HTTP and A2A gRPC service for collecting, listing, deleting, and summarizing customer feedback for Catalog book...PublishesFeedbackCreatedIntegrationEvent, FeedbackDeletedIntegrationEventSubscribesCreateFeedback, DeleteFeedback +3APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs |
| Storage Blob Data Owner | b7e6dc6d-f1e8-4753-8033-0f276bb0955b | Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs, Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs |
| Storage Blob Data Contributor | ba92f5b4-2d11-453d-a403-e96b0029c9fe | Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs, Chat APIServicev1.0.0Chat APIInternal HTTP host for BookWorm's interactive multi-agent chat workflow, agent discovery, and session persistence. Ownerai-capabilities-teamDiagramRepositoryOpen docs |
| Secret | Consumers | Origin |
|---|---|---|
| HMAC signing key | Basket APIServicev1.0.0Basket APIInternal HTTP and gRPC service for managing customer-scoped shopping baskets, Catalog price enrichment, and post-checkou...PublishesGetBookGrpc, GetBooksGrpc +2SubscribesCreateBasket, UpdateBasket +4APIsOpenAPI, AsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs, Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs, Notification APIServicev1.0.0Notification APIInternal background worker that consumes order commands from Kafka, renders MJML email templates, and submits mail over ...SubscribesPlaceOrderCommand, CancelOrderCommand +1APIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs | Generated (min length 32, alphanumeric) |
| Better Auth secret | Storefront, Backoffice | Generated (min length 32, alphanumeric) |
| Kafka credentials | Kafka consumers and producers | External |
| Qdrant Cloud credentials | Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs, Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs | External |
| SMTP password | Notification APIServicev1.0.0Notification APIInternal background worker that consumes order commands from Kafka, renders MJML email templates, and submits mail over ...SubscribesPlaceOrderCommand, CancelOrderCommand +1APIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs | External (SendGrid APIServicev1.0.0SendGrid APIExternal SMTP email delivery provider used by BookWorm to submit rendered order notification emails over authenticated S...Ownerplatform-engineering-teamDiagramOpen docs) |
Guardrails & Constraints
HMAC signing keys, Better Auth secrets, and external provider credentials (Kafka, Qdrant Cloud, and SMTP) sit outside Managed Identity coverage. Rotate them per Production Hardening & Compliance ChecklistCustom DocProduction Hardening & Compliance ChecklistPre-production SecOps and reliability checklist for locking down network perimeters, scaling limits, backup drills, and ...Ownerplatform-engineering-teamOpen doc.
Notification APIServicev1.0.0Notification APIInternal background worker that consumes order commands from Kafka, renders MJML email templates, and submits mail over ...SubscribesPlaceOrderCommand, CancelOrderCommand +1APIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs has a Managed Identity binding only for Azure Managed Redis. It authenticates to Kafka and the SendGrid SMTP relay using external credentials.
Related Documentation
- Azure Platform & Topology OverviewCustom DocAzure Platform & Topology OverviewReference architecture for BookWorm's subscription-scoped Azure deployment, shared platform services, and network ingres...Ownerplatform-engineering-teamOpen doc — Ingress boundary and Entra ID proxy route.
- Container Apps & Compute InventoryCustom DocContainer Apps & Compute InventoryReference inventory of all 16 Azure Container Apps, ingress ports, revision modes, and platform-owned runtime services.Ownerplatform-engineering-teamOpen doc — Workloads and their auth configuration.
- Stateful Data, AI & Messaging InfrastructureCustom DocStateful Data, AI & Messaging InfrastructureTechnical reference for Azure-managed databases, caches, storage, Durable Task Scheduler, Microsoft Foundry, and externa...Ownerplatform-engineering-teamOpen doc — Resources protected by these role assignments.
- Incident Triage & Health Check RunbookCustom DocIncident Triage & Health Check RunbookFirst-5-minutes triage commands and symptom-first recovery playbooks for Container Apps, passwordless RBAC, order orches...Ownerplatform-engineering-teamOpen doc — RBAC and On-Behalf-Of (OBO) failure runbooks.