SUSE / Portus

Authorization service and frontend for Docker registry (v2)
http://port.us.org/
Apache License 2.0
3k stars 471 forks source link

Application token disappears in 5s - difficult to copy #2240

Closed sripathikrishnan closed 4 years ago

sripathikrishnan commented 4 years ago

Description

When I create an application token, the token is visible for a very short period of time - 5 seconds or so. It needs considerable dexterity to copy it before it disappears.

Also, it is also on the top right of the screen, and very easy to miss. It took me several attempts to find out the token was actually getting created. I feel that is the underlying reason for the confusion in https://github.com/SUSE/Portus/issues/2179

This problem is more severe when using OAuth2 providers, because using application tokens is the only way to run the docker login command.

Suggestion

The token is displayed using $alert.$show method. This autohides the alert by default after 5 seconds. Perhaps we should change the timeout to 60s, or perhaps set autohide=false?

Steps to reproduce

  1. Click on username at the top right of the screen
  2. Create a new Application Token
  3. Enter an application name
  4. Notice that the token is generated and displayed in an alert on the top right of the screen

Deployment information

This behaviour is independent of the deployment method. But for the record, I used docker-compose, along with google oauth2 configured.

Configuration:

This is a javascript issue, and I don't believe it depends on the configuration. Neverthless, here is the configuration:

[schema] Selected the schema for mysql
[Mailer config] Host:     portus.test.lan
[Mailer config] Protocol: https://
Evaluated configuration:
---
email:
  from: portus@example.com
  name: Portus
  reply_to: ''
  smtp:
    enabled: false
    address: smtp.example.com
    port: 587
    domain: example.com
    ssl_tls: ''
    enable_starttls_auto: false
    openssl_verify_mode: none
    ca_path: ''
    ca_file: ''
    user_name: ''
    password: "****"
    authentication: login
gravatar:
  enabled: true
delete:
  enabled: true
  contributors: true
  garbage_collector:
    enabled: true
    older_than: 30
    keep_latest: 5
    tag: ''
ldap:
  enabled: false
  hostname: ldap_hostname
  port: 389
  timeout: 5
  encryption:
    method: ''
    options:
      ca_file: ''
      ssl_version: TLSv1_2
  base: ''
  admin_base: ''
  group_base: ''
  filter: ''
  uid: uid
  authentication:
    enabled: false
    bind_dn: ''
    password: "****"
  group_sync:
    enabled: true
    default_role: viewer
  guess_email:
    enabled: false
    attr: ''
oauth:
  local_login:
    enabled: true
  google_oauth2:
    enabled: true
    id: <MASKED>
    secret: <MASKED>
    domain: <MASKED>
    options:
      hd: <MASKED>
  open_id:
    enabled: false
    identifier: ''
    domain: ''
  openid_connect:
    enabled: false
    issuer: ''
    identifier: ''
    secret: ''
  github:
    enabled: false
    client_id: ''
    client_secret: ''
    organization: ''
    team: ''
    domain: ''
  gitlab:
    enabled: false
    application_id: ''
    secret: ''
    group: ''
    domain: ''
    server: ''
  bitbucket:
    enabled: false
    key: ''
    secret: ''
    domain: ''
    options:
      team: ''
first_user_admin:
  enabled: true
signup:
  enabled: false
check_ssl_usage:
  enabled: true
registry:
  jwt_expiration_time:
    value: 15
  catalog_page:
    value: 100
  timeout:
    value: 2
  read_timeout:
    value: 120
machine_fqdn:
  value: <MASKED>
display_name:
  enabled: false
user_permission:
  change_visibility:
    enabled: true
  create_team:
    enabled: true
  manage_team:
    enabled: true
  create_namespace:
    enabled: true
  manage_namespace:
    enabled: true
  create_webhook:
    enabled: true
  manage_webhook:
    enabled: true
  push_images:
    policy: allow-teams
security:
  clair:
    server: ''
    health_port: 6061
    timeout: 900
  zypper:
    server: ''
  dummy:
    server: ''
anonymous_browsing:
  enabled: true
background:
  registry:
    enabled: true
  sync:
    enabled: true
    strategy: initial
pagination:
  per_page: 10
  before_after: 2

Portus version: 2.5.0-dev@a1b9f2ebfeb84680a9dcd5629195e4c52815735c

Portus version: Version: 2.5.0-dev@a1b9f2ebfeb84680a9dcd5629195e4c52815735c. This is based on the published docker image opensuse/portus@sha256:a3e3324c59929fbb0949c806300d0645d271eacdd30f4bfbc77e7f938540ce9f

stale[bot] commented 4 years ago

Thanks for all your contributions! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

SuperSandro2000 commented 4 years ago

spam bot

stale[bot] commented 4 years ago

Thanks for all your contributions! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

SuperSandro2000 commented 4 years ago

spam bot

stale[bot] commented 4 years ago

Thanks for all your contributions! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.