Skip to content

Ponos task authentication

Erwan Rouchet requested to merge ponos-auth into master

Closes #1451 (closed)

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