Authorization¶
Overview¶
Authorization determines what an authenticated user is allowed to do within the platform.
Authentication answers:
Who are you?
Authorization answers:
What are you allowed to do?
VitalBridge implements Role-Based Access Control (RBAC) combined with tenant isolation.
Authorization Layers¶
flowchart TB
REQUEST["Request"]
AUTH["Authentication"]
ROLE["Role Validation"]
TENANT["Tenant Validation"]
RESOURCE["Resource Ownership"]
EXECUTE["Business Operation"]
REQUEST --> AUTH
AUTH --> ROLE
ROLE --> TENANT
TENANT --> RESOURCE
RESOURCE --> EXECUTE
Hold "Alt" / "Option" to enable pan & zoom
Role-Based Access Control¶
flowchart TB
SUPER["ROLE_SUPER_ADMIN"]
TENANT["ROLE_TENANT_ADMIN"]
PROVIDER["ROLE_PROVIDER"]
PATIENT["ROLE_PATIENT"]
Hold "Alt" / "Option" to enable pan & zoom
Roles define platform-level permissions.
Tenant Isolation¶
Role validation alone is insufficient.
Users must also belong to the tenant that owns the requested resource.
flowchart LR
USER["User"]
TENANT["Tenant"]
RESOURCE["Resource"]
USER --> TENANT
TENANT --> RESOURCE
Hold "Alt" / "Option" to enable pan & zoom
Resource Ownership¶
flowchart LR
PATIENT["Patient"]
APPT1["Own Appointment"]
APPT2["Other Appointment"]
PATIENT --> APPT1
PATIENT -. Access Denied .-> APPT2
Hold "Alt" / "Option" to enable pan & zoom
The same principle applies to:
- Providers
- Tenant Administrators
- Patients
Service-Level Enforcement¶
flowchart LR
GATEWAY["API Gateway"]
SERVICE["Domain Service"]
GATEWAY --> SERVICE
SERVICE --> AUTHZ["Authorization Checks"]
Hold "Alt" / "Option" to enable pan & zoom
Every service performs authorization checks independently.
Authorization Principles¶
- Authentication is not authorization.
- Roles determine permissions.
- Tenant boundaries are always enforced.
- Resource ownership must be validated.
- Services must never trust gateway authorization alone.