Identity & Access Control
Haste Health's access control system uses three core resources to manage user identity and authorization across projects.
User
The User resource represents an authenticated identity at the tenant level.
Purpose: Stores authentication credentials and tenant-level role for individuals accessing the platform. Users exist in the System Project and can access multiple user projects through Memberships.
Key Properties:
- Email: Unique identifier for authentication
- Role: Tenant-level role (
adminormember) - Federated Identity: Optional link to external identity providers (SSO/OIDC)
Related Documentation:
Membership
The Membership resource connects Users to Projects and establishes project-level access.
Purpose: Links a User to a specific Project, granting project-level access. Without a Membership, users cannot access resources in a project (unless they are tenant owners or super-admins).
Key Properties:
- user: Reference to the User resource
- link: Reference to the clinical resource this membership represents (e.g., Patient, Practitioner)
- role: Project-level role (
adminormember)
Access Flow:
- User authenticates (System Project validates credentials)
- System queries for Memberships in target Project
- If Membership exists, access is granted to the project
- AccessPolicyV2 resources determine resource-level permissions
Related Documentation:
AccessPolicyV2
The AccessPolicyV2 resource defines fine-grained authorization rules for what resources a Member can access within a Project.
Purpose: Establishes attribute-based access control (ABAC) rules that determine which FHIR resources and operations a user can perform. Policies are associated with Users or Memberships.
Key Properties:
- engine: Policy evaluation engine (
full-access,rule-engine) - target: Reference to User or Membership this policy applies to
- rule: Array of authorization rules defining allowed actions, resources, and conditions
- name: Human-readable policy description
Policy Evaluation: During authentication, the system:
- Identifies user's Memberships in the target project
- Finds AccessPolicyV2 resources where
target.linkreferences those Memberships - Includes policy version IDs in the access token
- Evaluates policies on each API request to determine permissions
Related Documentation:
How They Work Together
User (System Project)
↓
Membership (User Project) ← links User to Project
↓
AccessPolicyV2 (User Project) ← defines permissions
↓
FHIR Resources (User Project) ← authorized access
Related Documentation:
- Authorization Overview: Complete authorization system
- Multi-Tenant Architecture: Tenant and project structure
- Authentication: OAuth 2.0 and OIDC flows