Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

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.

Security & IAM

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

ComponentRoleProtocol / InterfacePersistence / StateNotes
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 docsPrimary user and API identity providerOAuth 2.0 / OIDC / JWT BearerExternal tenantLocal dev cert in run mode; federated MI in publish mode
Entra Agent IdentitiesFederated OBO agent blueprints & identitiesToken Exchange FICExternal tenant (single-tenant)Provisioned in publish mode only
Frontend SessionsBrowser session & OAuth2 callback handlingBetter Auth + Entra IDCookie / session stateCommerce shares the Storefront session
Quartz Dashboard AuthAdministrative UI authenticationOpenID Connect (/signin-oidc)Session cookieRequires Entra ID admin app role
Managed IdentitiesPasswordless service-to-Azure RBACAzure Workload IdentityAzure RBAC assignmentsEnvironment identity holds AcrPull

Configuration & Operational Defaults

App Roles & OAuth2 Scopes

Role valueDisplay nameAllowed member typesDescription
adminAdminUser, ApplicationManages all aspects of the application
business_userBusinessUserUser, ApplicationManages books and catalog reference data
customerCustomerUser, ApplicationBrowses and purchases books

Each protected .NET API registers read and write scopes (12 total):

ServiceRead scopeWrite 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 docscatalog_readcatalog_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 docsmcptools_readmcptools_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 docsbasket_readbasket_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 docsordering_readordering_write
Chat APIServicev1.0.0Chat APIInternal HTTP host for BookWorm's interactive multi-agent chat workflow, agent discovery, and session persistence. Ownerai-capabilities-teamDiagramRepositoryOpen docschatting_readchatting_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 docsrating_readrating_write

Managed Identity RBAC Matrix

ServicePostgreSQLAzure Managed RedisCosmos DBAzure StorageMicrosoft FoundryOther
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 docsCatalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docsYes—Storage Blob Data ContributorCognitive 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 docsCatalog 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 OwnerCognitive 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 docsOrder DatabaseContainerv1.0.0Order DatabaseAuthoritative PostgreSQL system of record owned by the Ordering bounded context for buyers, accepted orders, purchase-ti...Ownercommerce-fulfillment-teamDiagramOpen docsYes————
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 ContributorCognitive 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—YesRating 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 docsScheduler 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.

Guardrails & Constraints

Rotate Non-Entra Secrets Regularly

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 Identity Boundary

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.