NokiaTube | New address | Mode Desktop | Off high quality for Nokia Browser
Skip to content

Workflow cleanup can delete scheduled state in another realm #55470

Description

@ssilvert

Describe the bug

Deleting a user in one realm can remove pending scheduled workflow steps that belong to a resource in a different realm. This happens when the deleted user has the same ID as that resource, for example a client in the other realm.

Workflow state is not stored with a realm reference. When a user is removed, the cleanup of their workflow state is matched only by resource ID, so state for a resource with the same ID in any realm is deleted too. This is the same realm-isolation gap as #50380, on a different code path: the fix for #50380 (#50381) scoped the whole-realm cleanup, but not the per-resource cleanup that runs when a user is deleted.

The impact is limited to silently dropping pending workflow steps for the affected resource. For example, a delayed "disable inactive user" step for that resource never runs. The resource itself is not deleted, no data is exposed, and no privileges are gained. To trigger it, an administrator must be able to create a user with a chosen ID in their realm (only possible through realm import or partial import, since the normal create-user endpoint always generates the ID). They must also be able to delete that user, and they must already know the exact ID of a resource in the other realm that currently has a pending workflow step.

Version

Observed on commit 0c8877ace9b20288cf2307f843969370c0b0c6a6 (main).

Expected behavior

Removing a user in one realm removes only the workflow state that belongs to that user in that realm. Workflow state for resources in other realms is unaffected, even when IDs match.

Actual behavior

Removing a user in one realm also removes the pending scheduled workflow steps of any resource in another realm that has the same ID. Those steps never run.

Anything else?


This issue was originally tracked in the private repository. Migrated by @ssilvert.

Activity

  1. added
    priority/important
    area/workflows
    on Nov 23, 2026
  2. self-assigned this
    on Nov 24, 2026
  3. added a commit that references this issue on Nov 27, 2026
    4846f5b
  4. added a commit that references this issue on Nov 27, 2026
    e8c2ec1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/workflowskind/weaknesspriority/importantrelease/27.0.0team/core-iam

Fields

No fields configured for weakness.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions