Role-based access and facility scoping

Limit actions and data to the authorized user, role, organization, and facility

Use server-enforced permissions, subscription entitlements, organization scope, and facility scope while keeping web credentials in host-bound HttpOnly cookies.

The operational problem

A hidden menu is not an authorization boundary

CliviQue treats frontend visibility as a usability aid while the backend validates authenticated identity, permissions, subscription entitlements, organization scope, and facility scope on protected requests.

What CliviQue currently supports

Server-side authorization

Protected endpoints validate permissions and scope rather than trusting browser role hints.

Facility-aware access

Clinical and operational records are queried within the authorized facility context.

Secure web sessions

The same-origin BFF keeps access and refresh credentials in host-bound HttpOnly cookies in production.

Session and cache isolation

Login, logout, identity changes, and cross-tab events clear private cached state.

How the workflow progresses

A connected operational sequence

1

Authenticate centrally

Staff sign in through the configured HMIS application origin.

2

Resolve permissions and scope

The backend determines which roles, entitlements, organization, and facility apply.

3

Authorize every protected action

Each sensitive request is evaluated independently of the visible interface.

Current scope and limitations

What this feature does not claim

  • No security control can eliminate all risk; hospitals and operators must maintain secure devices, accounts, and procedures.
  • The public website does not claim a specific regulatory certification unless separately documented.
  • Patient timeline visibility is not a substitute for a comprehensive legal audit log.

Frequently asked questions

About role-based access and facility scoping

Are role codes in local storage used as backend authority?+

No. Browser role and permission values are UI hints; protected backend requests enforce authorization independently.

Are web tokens stored in local storage?+

No. The current web architecture keeps actual credentials in HttpOnly cookies through the same-origin BFF.

Can public pages access the clinical QueryClient?+

No. Only the authenticated workspace layout loads the private clinical QueryClient and workspace shell.

Guided implementation

Evaluate role-based access and facility scoping in your hospital context

A product walkthrough can cover the implemented workflow, roles, facility setup, subscription entitlements, deployment boundaries, and any requirements that remain outside the current MVP.