Skip to content

XLoader Hook Authorization Failure: Worker Runs as Anonymous User #260

@cgoldshtein

Description

@cgoldshtein

Problem
XLoader jobs complete successfully but task status never updates because the worker process runs as anonymous user. The xloader_hook function fails authorization check when trying to update task status, leaving jobs stuck in "pending" state.

Current Behavior
Job executes successfully in worker

xloader_hook called to update status

check_access('xloader_submit', context, metadata) fails - no authenticated user

Task status never updates to "complete"

Root Cause
In action.py line ~139:
p.toolkit.check_access('xloader_submit', context, metadata)

Worker context lacks user authentication, causing authorization failure.

Workaround
Adding context['ignore_auth'] = True before check_access resolves the issue.

Has anyone encountered this issue? Any suggestions for running the jobs worker with proper authentication context, or should xloader_hook automatically ignore auth since it's an internal callback?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions