#1014 tools.workflow.spawn takes tenant_id from a workflow variable; definition lookups by name/id are not tenant-scoped
Description
EditEARS: tools.workflow.spawn shall submit the child under ctx.tenant_id only. get_latest_definition and get_definition_by_id, used by tools.workflow.execute/spawn, the child workflow operator and durable_cron definition_id, shall return only definitions of ctx.tenant_id. STATIC (read during #1005, not reproduced live): docker/highway-core/engine/tools/workflow_executor.py:311 tenant_id = ctx.get_variable('tenant_id') or 'test'. A task with result_key 'tenant_id' sets that variable, so a tenant can name any tenant (including _platform) for the child run. The default is 'test'. engine/services/workflow_versioning/queries.py get_latest_definition (WHERE workflow_name = %s) and get_definition_by_id have no tenant filter, so a tenant can load and run another tenant's definition, for example system_platform_bootstrap or <tenant>_onboarding owned by _platform. WorkflowVersioningService._find_existing_definition(hash) is also unscoped. #1005 makes internal.* tasks in such runs fail, because platform_trusted is false. It does not fix the cross-tenant spawn or the read.
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...