Project

General

Profile

Actions

Bug #16613

closed

System Root Token cannot create tokens - null value in column "api_client_id"

Added by Peter Amstutz over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
-
Release relationship:
Auto

Description

Could not create API token for zzzzz-tpzed-fzbnjxd9v7v4l6j: <HttpError 422 when requesting https://api.zzzzz.example.com/arvados/v1/api_client_authorizations?alt=json returned "#<ActiveRecord::StatementInvalid: PG::NotNullViolation: ERROR: null value in column "api_client_id" violates not-null constraint

I think the problem is here:

https://dev.arvados.org/projects/arvados/repository/revisions/master/entry/services/api/app/controllers/arvados/v1/api_client_authorizations_controller.rb#L46

When using system root token, there's no api_client (we create a fake ApiClient object so that this doesn't crash). But when creating a token for another user, it takes the api_client of the current token, which is null.


Subtasks 1 (0 open1 closed)

Task #16692: Review 16613-sys-root-tokResolvedPeter Amstutz08/25/2020Actions

Related issues 1 (1 open0 closed)

Related to Arvados - Bug #16566: [cli] can't create a token when using a token created with create_superuser_token.rbNewActions
Actions

Also available in: Atom PDF