Skip to content

Week 46 · 9 – 15 November 2026 ​

Three access-control fixes lead the week, and each needs something from you if you run a multi-tenant deployment. Creating a tenant was open to any valid management token and now requires create:tenants. A tenant running in its own worker accepted control-plane tokens scoped to a different tenant's organization and now refuses them. And the control-plane template allowed browser calls from every origin. Beyond that: a new trigger lets an action redirect or refuse self-service account changes, a cluster can restrict which kind of tenant it hosts, and the admin UI guides a new user from an empty account to a working tenant.

Multi-tenant access control ​

Creating a tenant requires create:tenants. POST /tenants declared no scope, so any valid management token could create a tenant, while updating and deleting already required their scopes. A token without the scope now gets 403 before any hook or provisioning runs. Grant create:tenants to whoever creates tenants — if you run a self-service flow where any signed-in user can create one, their role needs it. If you mount the multi-tenancy routes in your own application rather than under AuthHero's management API, enforcing the declared scopes is still your job.

A tenant worker refuses another tenant's token. On Workers for Platforms the control plane forwards a tenant's management calls to that tenant's worker without checking them, which makes the worker the only gate — and it asked only whether the token came from the control plane, not which tenant it was for. A member of one tenant's organization could therefore reach another tenant's worker. A worker built with createWfpTenantApp now requires the token's organization to be its own tenant. A control-plane token with no organization — an operator, or a machine client — still passes.

Tenant IDs cannot differ only by case. An organization name reaches a token in lower case and is matched against the tenant ID ignoring case, so tenants ACME and acme could not be told apart by their members' tokens. POST /tenants now answers 409 for an ID that collides with an existing one that way. Existing tenants are not touched; if you have such a pair, rename one.

The control-plane template allowed every origin. It put the Origin of each request into its own allow list, so any website could call the management API from a browser. A scaffold now reads a fixed list from ALLOWED_ORIGINS. If you scaffolded a control plane from the earlier template, make the same change in your project — a scaffold is not updated by upgrading a package.

Intercept self-service account changes ​

A new trigger, pre-account-action, runs when a user starts a self-service account operation — changing their email, updating their profile, resetting a password, enrolling or removing MFA or a passkey, unlinking an identity, deleting the account — before any form is shown or anything is written. An action bound to it can send the user elsewhere with api.redirect.sendUserTo(url) or stop the operation with api.access.deny(reason).

It exists for users whose identity is owned by another system — those who sign in through Custom Token Exchange, for instance — where changing an email address here would only create a disagreement with the system that owns it. It is an AuthHero extension with no Auth0 equivalent.

Written in retrospect: this trigger was replaced two weeks later by a more general pre-screen trigger. If you are starting now, use that one.

A cluster can limit how tenants are deployed ​

A deployment that can only host tenants with their own database had no way to say so: the API and the admin UI always offered shared and defaulted to it, so a create without a deployment type produced a tenant with no database behind it.

ts
initMultiTenant({ deploymentTypes: { allowed: ["wfp"] } });

With that, POST /tenants defaults to wfp, refuses shared, and PATCH /tenants/settings cannot move a tenant onto a type the cluster does not host. GET /tenants/deployment-options tells the admin UI what to offer; with a single type the choice is hidden. Without the option, both types stay available and shared stays the default.

From an empty account to a working tenant ​

The admin UI used to greet a new user with an empty table, a Create button that could only fail, and repeated 403s in the background. Now:

  • With no tenants, the tenants view welcomes the user and offers to create the first one — or, without create:tenants, says who can grant access.
  • What the screens offer follows the permissions in the user's token: Create, Rollouts and Retry appear only for users who may use them.
  • The create form lower-cases the ID as it is typed, checks it as a DNS label, and shows the server's refusal on the field.
  • A new tenant opens on a setup page that follows its provisioning, shows the steps and any provisioning error, offers a retry, and opens the tenant once it answers.
  • A new tenant's dashboard shows a getting-started checklist — an application, a first login, a user, branding — worked out from what the tenant actually has, which disappears when done or dismissed.

Workers for Platforms ​

  • Provisioning a tenant no longer runs out of subrequests. Applying migrations made two Cloudflare API calls per migration, and a first-time provision of a tenant with nineteen migrations went over the Workers limit of fifty. Pending migrations are now applied in one call, falling back to one at a time on failure so the error names the migration that failed.
  • initMultiTenant honours databaseIsolation. The option was not part of its configuration and was never read, so onProvision and onDeprovision did not run and every new tenant's default applications were written to the control plane's database.
  • The control-plane template serves the Team page, which showed "Unable to load the team for this tenant" for a tenant with its own worker.
  • A tenant worker can be given an Analytics Engine dataset through extraBindings; the type did not allow it.
  • Changing a tenant's sync mode from the admin UI works for an operator; the request was being sent with a token the control plane rightly refuses for that setting.
  • The deployment guide gained corrections from another full run-through, among them a warning that a username containing @ makes the user list fail for the whole tenant.

Also ​

  • @authhero/drizzle — the published package now includes its type declarations. It declared them and did not ship them, so TypeScript projects got no types for the adapter. Scaffolded projects depend on the drizzle-orm range the adapter requires.
  • Seeding — seed() accepts createManagementClient: false to skip the "API Explorer Application" machine-to-machine application. It is still created by default.

Released ​

PackageSpan
authhero9.30.0 → 9.31.0
@authhero/adapter-interfaces4.27.0
@authhero/drizzle1.18.1 → 1.18.2
@authhero/kysely-adapter12.19.1
@authhero/aws-adapter1.10.1
@authhero/cloudflare-adapter4.2.1 → 4.2.3
@authhero/multi-tenancy15.6.1 → 15.8.0
@authhero/proxy0.11.14
@authhero/saml0.6.7
@authhero/widget0.41.11
@authhero/admin0.26.6 → 0.28.0
create-authhero0.53.0

No package is new this week. The multi-tenancy minors are the deployment-type limit and the tenant onboarding support; the authhero minors are the account-action trigger and the seed option.

Dual-licensed: AGPL-3.0-only or commercial license.