ADR-001: Keep authentication and identity ownership at the provider boundary
The external identity provider authenticates users, issues access tokens, and owns provider-side identity records rather than BookWorm business data.
Context
BookWorm applications need a consistent way to authenticate customers, administrators, and business users without coupling business services to provider-managed credentials or identity records. The provider is an external system, while BookWorm services own their domain data and operations. Allowing the provider to own business records or application permissions would blur that boundary and couple domain behavior to an external identity policy.
Decision
The Identity ProviderSystemv1.0.0Identity ProviderExternal identity infrastructure that authenticates BookWorm users and provides OAuth-compatible identity verification f...Ownerplatform-engineering-teamDiagramOpen docs owns user authentication, provider-side identity records, authentication policy, and issuance of OAuth-compatible access credentials for the requesting client and audience. BookWorm applications delegate sign-in to the provider and consume the resulting identity evidence when a client calls a protected API.
The provider is not the system of record for CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs, ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docs, OrderingDomainv1.0.0OrderingCreates durable Orders from a buyer's current basket, locks purchase-time pricing, and owns order lifecycle transitions ...Ownercommerce-fulfillment-teamDiagramOpen docs, or ReviewsDomainv1.0.0ReviewsCaptures individual customer feedback for books, publishes rating changes for Catalog discovery, and provides privacy-sc...Ownercatalog-experience-teamDiagramOpen docs data. Its credentials and identity claims establish who is calling; they do not transfer ownership of BookWorm data or decide what business action the caller may perform.
Alternatives considered
- Store and verify application credentials in each BookWorm service. This would duplicate credential handling and authentication policy across services, increasing the number of systems that must protect credentials and implement sign-in consistently.
- Make the provider the owner of BookWorm business accounts and permissions. This would couple domain data and application-specific policy to an external identity boundary. The provider remains authoritative only for its own identity records and authentication policy.
Consequences
BookWorm can delegate authentication without transferring domain ownership to the provider, and application services can evolve their business models independently of provider-side account storage. Clients and APIs depend on the provider’s availability and token contract, so the integration boundary must be explicit and its failures observable. Each consuming API remains responsible for validating identity evidence before processing a protected request. Provider-side account changes do not by themselves define the lifecycle or ownership of BookWorm business records; applications must keep those concerns within their own domains.