Skip to content

New outh2 token which generating from /api/o/token cannot apply new expiry seconds #2556

Description

@noname1314
ISSUE TYPE
  • Bug Report
COMPONENT NAME
  • API
SUMMARY

New outh2 token which generating from /api/o/token cannot apply new expiry seconds setting

ENVIRONMENT
  • AWX version: 3.3.1 (latest version which released on 25/Oct/2018)

  • AWX install method: Linux (Centos 7)

  • Ansible version: 2.7.1

  • Operating System: Windows 10

  • Web Browser: Chrome

  • Authentication setting (From api/v2/settings/):
    {
    "SESSION_COOKIE_AGE": 1800,
    "SESSIONS_PER_USER": -1,
    "AUTH_BASIC_ENABLED": true,
    "OAUTH2_PROVIDER": {
    "ACCESS_TOKEN_EXPIRE_SECONDS": 86400,
    "AUTHORIZATION_CODE_EXPIRE_SECONDS": 1800
    },
    "ALLOW_OAUTH2_FOR_EXTERNAL_USERS": false,
    "AUTHENTICATION_BACKENDS": [
    "awx.sso.backends.TACACSPlusBackend",
    "django.contrib.auth.backends.ModelBackend"
    ],
    "SOCIAL_AUTH_ORGANIZATION_MAP": null,
    "SOCIAL_AUTH_TEAM_MAP": null,
    "SOCIAL_AUTH_USER_FIELDS": null
    }

STEPS TO REPRODUCE
  1. Create application and copy client id and client secret.
  2. Request new OAuth2 token by postman / curl with login credential (normal user), client id and secret
  3. A token will be generated if API call successful
EXPECTED RESULTS

New OAuth2 token should be expired after 1 day

ACTUAL RESULTS

New OAuth2 token still remain the old setting as default one, which will expire after 1000 YEARS!

ADDITIONAL INFORMATION

new_token_time

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions