Impersonation tokens are not saved

Summary

After update from 11.4 to 11.4.5 we found out that impersonation tokens aren't saved using UI (admin/users/USERNAME/impersonation_tokens). image Moreover we've trying to create they trough API and we seen the same result, but response of creation request has returned generated token.

Steps to reproduce

  1. Go to admin page of any user (admin/users/USERNAME/impersonation_tokens)
  2. Set token name and select scopes
  3. Click to save
  4. ❗ Token isn't created.

Example Project

Not exists

What is the current bug behavior?

After click on button Create impersonation token, page will reloaded and new entity of token will be created, but field of token will be empty. If we trying to create a token trough API the response contains generated token, but it didn't been saved.

What is the expected correct behavior?

I expect that token will be saved correctly.

Relevant logs and/or screenshots

image

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info
sudo gitlab-rake gitlab:env:info

System information System: Ubuntu 16.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.4.5p335 Gem Version: 2.7.6 Bundler Version:1.16.2 Rake Version: 12.3.1 Redis Version: 3.2.12 Git Version: 2.18.1 Sidekiq Version:5.2.1 Go Version: unknown

GitLab information Version: 11.4.5-ee Revision: bf6db46 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.8 URL: https://gitlab...com HTTP Clone URL: https://gitlab...com/some-group/some-project.git SSH Clone URL: git@gitlab...com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: bitbucket

GitLab Shell Version: 8.3.3 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check
sudo gitlab-rake gitlab:check SANITIZE=true
Checking GitLab Shell ...

GitLab Shell version >= 8.3.3 ? ... OK (8.3.3) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 1/1 ... ok 12/3 ... ok 2/4 ... ok 2/5 ... ok 11/6 ... repository is empty 15/8 ... repository is empty 4/9 ... repository is empty 24/10 ... ok 12/11 ... ok 12/12 ... ok 12/13 ... ok 19/14 ... ok 19/15 ... ok 19/16 ... ok 19/17 ... ok 19/18 ... ok 19/19 ... ok 19/20 ... ok 19/21 ... ok 19/22 ... ok 19/23 ... ok 19/24 ... ok 19/25 ... ok 19/26 ... ok 19/28 ... ok 19/29 ... ok 19/31 ... ok 19/33 ... ok 19/34 ... ok 19/35 ... ok 24/37 ... ok 2/38 ... ok 8/39 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Reply by email is disabled in config/gitlab.yml Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 1/1 ... yes 12/3 ... yes 2/4 ... yes 2/5 ... yes 11/6 ... yes 15/8 ... yes 4/9 ... yes 24/10 ... yes 12/11 ... yes 12/12 ... yes 12/13 ... yes 19/14 ... yes 19/15 ... yes 19/16 ... yes 19/17 ... yes 19/18 ... yes 19/19 ... yes 19/20 ... yes 19/21 ... yes 19/22 ... yes 19/23 ... yes 19/24 ... yes 19/25 ... yes 19/26 ... yes 19/28 ... yes 19/29 ... yes 19/31 ... yes 19/33 ... yes 19/34 ... yes 19/35 ... yes 24/37 ... yes 2/38 ... yes 8/39 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.5) Git version >= 2.9.5 ? ... yes (2.18.1) Git user has default SSH configuration? ... yes Active users: ... 16 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)

Checking GitLab ... Finished

Possible fixes

I think, that token is generated correctly, but doesn't saves in DB.

Edited Nov 15, 2018 by Max Baev
Assignee Loading
Time tracking Loading