Default AccessPolicies

Learn where Ovok gets the default AccessPolicy for a new patient or practitioner, which routes use it, and what defaults do not do.

Default policies give newly created patients and practitioners a starting authorization policy. They are applied when an account or membership is created; they do not rewrite access for people who already belong to the project.

New memberWhere the default comes fromIf it is missing
PatientThe DEFAULT_PATIENT_ACCESS_POLICY project setting, stored as the project's defaultPatientAccessPolicy fieldPatient registration and invitation flows that require it refuse to create the patient.
PractitionerThe DEFAULT_PRACTITIONER_ACCESS_POLICY project settingRoutes that require it return a configuration error; some legacy routes create the practitioner without a policy.

Both policies must belong to the project where the new member is created. A policy ID from a parent project is not a substitute for the child project's own policy.

Default patient policy

Ovok reads defaultPatientAccessPolicy from the project when creating a patient through registration, invitation, and social sign-in flows. Set it with PUT /v1/project/settings/values/DEFAULT_PATIENT_ACCESS_POLICY; see DEFAULT_PATIENT_ACCESS_POLICY. Project-creation routes do not set it. Configure it before enabling patient onboarding. The patient registration switch does not replace the policy requirement.

New Google and Apple first sign-ins receive the project's default patient policy. Older affected social-sign-in memberships were backfilled where the project had a usable default policy; if an older project has no default configured, review those memberships before relying on patient scoping.

Patient invitation and registration flows have separate switches and route behavior. See patient registration, patient invitations, and set up your project.

Default practitioner policy

Set DEFAULT_PRACTITIONER_ACCESS_POLICY to AccessPolicy/<id> for an AccessPolicy in the same project. Use a policy that is safe for a newly registered practitioner before turning on practitioner self-registration or invitation flows that depend on it.

FlowPolicy behavior
Practitioner self-registrationAssigns the default practitioner policy. A missing or invalid policy blocks registration.
Business-email sign-up that becomes a clinician invitationAssigns the default practitioner policy. If required invitation configuration is missing, the flow can fall back to ordinary patient registration.
POST /auth/invite with type: PractitionerLegacy exception: does not read this setting and creates the practitioner without a policy.
POST /v1/slim/invite/practitionerUses the accessPolicyId supplied to that route.

The legacy CLINICIAN_INVITE_ACCESS_POLICY key may be read for older projects when the current key is absent or blank. New integrations should configure only DEFAULT_PRACTITIONER_ACCESS_POLICY.

Defaults are project-local and not retroactive

Child projects need their own patient and practitioner defaults. A child project may receive cloned AccessPolicies with new IDs, so read the child project's policies and configure references using those IDs. Defaults are not inherited from the parent.

Changing a default affects later account creation. It does not change existing memberships. To change an existing member's access, update that membership's policy assignment and review the resulting effective access.

Last updated on

On this page