Multi-tenancy
Cephalon.MultiTenancy provides tenancy primitives (resolution, context, sharding). Cephalon.MultiTenancy.Governance adds the lifecycle flows: memberships, invitations, domain-ownership, approvals — each needing an email-delivery channel for outbound notifications.
Packages
Section titled “Packages”Click any package name to jump to its source-doc.
| Package | NuGet ID | Maturity | Capability |
|---|---|---|---|
| MultiTenancy (base) | Cephalon.MultiTenancy | M3 | Capability.Tenancy |
| Governance (base) | Cephalon.MultiTenancy.Governance | M3 | Capability.TenancyGovernance |
| Governance.AspNetCore | Cephalon.MultiTenancy.Governance.AspNetCore | M3 | — (host adapter) |
Email-delivery adapters
Section titled “Email-delivery adapters”| Package | NuGet ID | …:Delivery | Use when |
|---|---|---|---|
| SMTP | Cephalon.MultiTenancy.Governance.SmtpDelivery | "Smtp" | Generic SMTP — Postfix, Sendmail, on-prem mail server |
| HTTP webhook | Cephalon.MultiTenancy.Governance.HttpDelivery | "Http" | Posting to a webhook (Slack, Mattermost, generic listener) |
Amazon SES (+ .AspNetCore) | Cephalon.MultiTenancy.Governance.AmazonSesDelivery | "AmazonSes" | AWS-native deployments |
Mailgun (+ .AspNetCore) | Cephalon.MultiTenancy.Governance.MailgunDelivery | "Mailgun" | Mailgun-managed sending |
SendGrid (+ .AspNetCore) | Cephalon.MultiTenancy.Governance.SendgridDelivery | "Sendgrid" | SendGrid-managed sending |
Microsoft Graph (+ .AzureIdentity) | Cephalon.MultiTenancy.Governance.MicrosoftGraphDelivery | "MicrosoftGraph" | Sending via M365 mailbox |
Install matrix
Section titled “Install matrix”| Scenario | Packages |
|---|---|
| Tenant-aware app, no governance flows | Cephalon.MultiTenancy |
| + member/invitation flows | + Cephalon.MultiTenancy.Governance + Cephalon.MultiTenancy.Governance.AspNetCore |
| + outbound email via SMTP | + Cephalon.MultiTenancy.Governance.SmtpDelivery |
| + outbound email via Amazon SES (on AWS) | + Cephalon.MultiTenancy.Governance.AmazonSesDelivery.AspNetCore |
| + outbound email via Microsoft Graph (Azure AD identity) | + Cephalon.MultiTenancy.Governance.MicrosoftGraphDelivery.AzureIdentity |
Configuration shape
Section titled “Configuration shape”{ "Engine": { "Tenancy": { "Enabled": true, "Resolvers": ["subdomain", "claim"], "Sharding": { "default": "ConnectionStrings:DefaultShard", "acme": "ConnectionStrings:AcmeShard" }, "Governance": { "Enabled": true, "Delivery": "AmazonSes", "AmazonSes": { "Region": "us-east-1", "FromAddress": "no-reply@acme.example" } } } }}Full schema + 4 scenarios (subdomain, header, claim, multi-resolver): Reference → Configuration → Tenancy.
Governance flows
Section titled “Governance flows”Cephalon.MultiTenancy.Governance registers the following behaviors:
| Endpoint | Behavior |
|---|---|
POST /governance/invitations | Create + send invitation to email |
POST /governance/invitations/{id}/accept | Accept invitation, create membership |
POST /governance/domain-ownership | Request domain verification |
GET /governance/memberships | List memberships of current user |
POST /governance/approvals/{id} | Approve or reject pending action |
See also
Section titled “See also”- Technology → Multi-tenancy — resolver pipeline + sharding patterns.
- Reference → Configuration → Tenancy — full schema.
- Tutorial → Multi-tenant SaaS — end-to-end walkthrough.