← All posts

Identity, profile, and account

Separating authentication, user representation, and account context is established architecture. The interesting question is not whether to do it, but how those boundaries fit into the model foundation and what they have to carry.

What we built

Dawnshard separates account, profile, and identity into distinct parts of a hierarchy. An identity holds authentication credentials: email, password, verification status. A profile is the actor the rest of the system knows: the handle, the public presence, the thing that owns work and participates in the application. An account is the commercial context: the subscription, the tier, the jurisdiction the business operates under.

These are not three tables for one concept. They are three genuinely different things that happen to arrive together when someone signs up.

Authentication goes through the identity. Participation and ownership go through the profile, and RBAC governs what a profile can do against a given resource based on how that resource is owned and scoped. The account carries the commercial context: subscription tier, jurisdiction, and the business rules that apply to the work being done. None of those concerns bleeds into the others.

The problem it solves

The simpler starting point is a single user record with a subscription attached. It works until account-level context needs to govern behaviour independently of the individual.

Consider a business with employees in different locations. The individuals are wherever they are. But the business is a legal entity with its own jurisdiction, its own compliance obligations, its own subscription tier. When the system needs to evaluate what rules apply to a piece of work, the relevant context is the account, not the person doing the work. The account is the legal and commercial unit; the profile is just the actor operating within it.

That distinction needs somewhere to live in the architecture. Folding it into the user record means the boundary has to be maintained by convention rather than structure, and it tends not to survive contact with growing requirements. THis is built for policy, roles, permissions, access and scalability from day one.

The challenge

The separation is conceptually clean. The harder part is keeping the boundaries consistent when every operation in the system has to work across all three.

Authentication is straightforward. The interesting problem is keeping the other two boundaries clean. A profile acts and RBAC governs what it can do based on resource ownership and scope. Separately, the account carries the business context that governs what rules and tier limits apply to the work. These are different concerns that resolve differently, and they have to stay distinct without every domain having to manage that distinction independently.

The separation has to hold under the same ownership and enforcement model that the previous post described, without requiring every domain to rediscover where those boundaries are.

What makes this different

This is not an unusual architecture. Separating authentication identity, user representation, tenant membership, and scoped roles is a well-understood pattern.

What matters here is that these boundaries were in place from the beginning, built on the same model foundation described in the previous post. Account context has a clear owner in the data model, not just in the application logic. Business rule evaluation, tier enforcement, and compliance context all resolve against the account because the account is the object that carries those concerns. Not because a service happens to look them up in the right order.

With more teams moving towards AI-driven development, and AI’s general aversion to DRYness, structural rules and foundations are more important than ever. At least a grad normally knows what code they shouldn’t be touching.

What this unlocks

One identity can participate through different profiles in different account contexts, each with its own access rules and business context.

A business operating across jurisdictions, a platform hosting multiple independent accounts, a product enforcing different tier limits for different customers. The identity architecture already has somewhere for those requirements to belong. That does not mean every compliance or multi-jurisdiction problem is pre-solved. It means the structural foundation for handling them is in place rather than being retrofitted later.

What's next

The next post covers the state graph: how objects in Dawnshard move through defined lifecycles. Most real-world domains have natural states, and making those transitions explicit, enforced, and auditable turns out to be a significant capability. That is what the state system is for.

Liked this post? Tap the heart to let us know.

Get early access

Be the first to hear about early access, roadmap updates, and exclusive early adopter pricing.

Join the early access list