Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,253
    • Issues 44,253
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,587
    • Merge requests 1,587
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #336598
Closed
Open
Created Jul 21, 2021 by Orit Golowinski@ogolowinskiDeveloper0 of 6 tasks completed0/6 tasks

OAuth access token hard coded expiration

Release notes

Problem to solve

Regarding expiration time for OAuth access tokens, unfortunately there is no standard answer for it other than making it as short as possible without affecting usability for OAuth clients. The industry best practice is to keep access token expiration time as short as possible (for example, 15 minutes) in cases where refresh tokens are also issued. We have mentioned 2 hours (7200 seconds) as an example expiration time in our docs and source so that would be a good place to start (without breaking too many of our existing OAuth clients, if 2 hours indeed works for them). Once we roll out access tokens with 2 hour expiration, we can work our way towards making it shorter, based on the feedback we get from our OAuth clients/integrations.

Coming from #334646 (closed)

Proposal

After we updated the docs with a recommendation for expiration, this is a 1st iteration to set expiration. We will start with a hard coded value

refresh interval should be hard coded to: 2 hours

(GitLab admin can change this configuration - not through the UI)

Expiration should be on by default (but can be urned off).

Out of scope of this issue

Allow custimization of the expiration interval

Assignee
Assign to
Time tracking