Skip to content
Snippets Groups Projects

Ponos task authentication

Merged Erwan Rouchet requested to merge ponos-auth into master
All threads resolved!

Closes #1451 (closed)

:warning: Any task or worker that upgrade to the API client after this is merged, and after api-client#34 (closed) is implemented and released, will break, because we have restrictions on using worker run IDs to internal users in some endpoints, and this task authentication will cause imports or workers to run as non-internal.

I tested locally by running make build CLIENT_BRANCH=ponos-auth in tasks after pushing api-client!219 (merged), and found that a random PDF import, which normally runs with my internal user, failed with this error:

apistar.exceptions.ErrorResponse: {'worker_run_id': ['Only an internal user can create an element with a worker run.']}

Which proves that the task was authenticated as the process creator (an instance admin, but not internal) and not the configured internal token.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Bastien Abadie
  • This works nicely, and is relatively short. Well done

  • Bastien Abadie approved this merge request

    approved this merge request

  • Erwan Rouchet added 2 commits

    added 2 commits

    Compare with previous version

  • Erwan Rouchet resolved all threads

    resolved all threads

  • Erwan Rouchet mentioned in merge request !1937 (merged)

    mentioned in merge request !1937 (merged)

  • Please register or sign in to reply
    Loading