Solution Architecture · Version 1.0

Norvia Backoffice Architecture

A standalone .NET control plane integrating the development Azure SQL database with either a product platform API or the supplied sandbox API.

1. Architecture drivers

2. Logical architecture

BrowserRazor/MVC user interface
→
Norvia Backoffice.NET 10 web application
→
Azure SQLShared system of record
Application ServicesValidation, RBAC, audit, provisioning
→
Provisioning APIProduct-specific API or course sandbox

3. Component responsibilities

ComponentResponsibility
ASP.NET Core MVCServer-rendered UI, model validation, authentication, role authorization, anti-forgery protection, and error handling.
Application layerUse cases for products, roles, tenants, tenant admins, backoffice users, and provisioning orchestration.
Infrastructure layerAzure SQL repositories, provisioning HTTP client, password hashing, structured logging, and audit persistence.
Azure SQL DatabaseStores NorviaProducts, ProductUserRole, Tenant, UserExtended, and BackofficeUsers.
Provisioning APIEither the provider-documented product platform API or the standalone ProvisionTenantAdmin sandbox; returns a UserID.

4. Data model

NorviaProducts1
── has ──
ProductUserRolemany
Tenant1
── contains ──
UserExtendedmany

BackofficeUsers is intentionally independent of tenant identities because internal Norvia operators do not belong to customer tenants. ProductUserRole.ProductRoleID is an external identifier owned by the selected product platform.

TablePurposeKey controls
NorviaProductsTechnology-neutral product cataloguePrimary key; unique name enforced by application/migration
ProductUserRoleMaps Norvia role names to platform role IDsFK to product; unique ProductID + ProductRoleID
TenantCustomer organizationsActive flag; unique name
UserExtendedTenant users and OutSystems identity mappingFK to Tenant; nullable OutSystemsUserId until provisioned
BackofficeUsersInternal application identities and rolesUnique email; constrained roles/status; hashed password in production

5. Authorization design

CapabilitySuper AdminAdminUser
Products / Product RolesManageDeniedDenied
TenantsManageManageDenied
Tenant Admins / ProvisioningManageManageDenied
Backoffice UsersManageDeniedDenied

6. Workflow designs

6.1 Product and product-role management

  1. Authorized Super Admin opens the relevant list.
  2. Application loads records from Azure SQL.
  3. User submits create/update data.
  4. Server validates required fields, uniqueness, integer IDs, and product relationship.
  5. Repository commits the transaction and the audit service records the change.
  6. Updated list and confirmation are returned.

6.2 Tenant onboarding

  1. Super Admin or Admin creates the customer tenant.
  2. Application validates uniqueness and inserts an active Tenant record.
  3. Operator creates a Tenant Admin linked through Tenant_ID.
  4. UserExtended is saved with no OutSystemsUserId; status is Not Provisioned.
  5. Operator may review/edit the local record before provisioning.

6.3 Tenant-admin provisioning

Validate local user→Resolve product role→Call selected API→Persist returned UserID→Audit outcome
  1. Reject the request if the user is inactive, already provisioned, or lacks required tenant/email/role data.
  2. Select the provider-documented product platform API or the standalone ProvisionTenantAdmin sandbox.
  3. Call the selected API over TLS using server-held credentials.
  4. On a successful response, validate the returned UserID and update UserExtended.OutSystemsUserId transactionally.
  5. On product API timeout or failure, keep OutSystemsUserId null, store diagnostic status, and allow a safe retry.

6.4 Backoffice login and authorization

  1. User submits email and password over HTTPS.
  2. Application finds the normalized unique email and verifies the salted password hash.
  3. Inactive users are rejected.
  4. A secure, HttpOnly, SameSite cookie is issued with the role claim.
  5. Authorization policy checks every protected action; denied attempts are audited.

7. Security and operations