ข้ามไปยังเนื้อหา

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.

Click any package name to jump to its source-doc.

PackageNuGet IDMaturityCapability
MultiTenancy (base)Cephalon.MultiTenancyM3Capability.Tenancy
Governance (base)Cephalon.MultiTenancy.GovernanceM3Capability.TenancyGovernance
Governance.AspNetCoreCephalon.MultiTenancy.Governance.AspNetCoreM3(host adapter)
PackageNuGet ID…:DeliveryUse when
SMTPCephalon.MultiTenancy.Governance.SmtpDelivery"Smtp"Generic SMTP — Postfix, Sendmail, on-prem mail server
HTTP webhookCephalon.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
ScenarioPackages
Tenant-aware app, no governance flowsCephalon.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
appsettings.json
{
"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.

Cephalon.MultiTenancy.Governance registers the following behaviors:

EndpointBehavior
POST /governance/invitationsCreate + send invitation to email
POST /governance/invitations/{id}/acceptAccept invitation, create membership
POST /governance/domain-ownershipRequest domain verification
GET /governance/membershipsList memberships of current user
POST /governance/approvals/{id}Approve or reject pending action