Draft: Resolve "Support customizable timeouts for Git CLI 2FA via UI"
What does this MR do?
For #296669 (closed)
This change
- adds a new column (named
git_cli_session_expiry
) toApplicationSettings
that holds the session expiry timeout (in minutes) for Git CLI operations when 2FA is enabled. - uses this value to enforce session timeouts for Git CLI operations
- allows to set this value via the UI (via
admin/application_settings/general
->Account and limit
section)
Assumptions on this new value:
- The default is 15 minutes.
- The minimum allowed is 1 minute.
- We do not currently allow setting
unlimited
/no expiry
, but this change be easily changed later via easing the model validations.
Database changes
$ rails db:migrate
== 20210113051026 AddGitCliSessionExpiryToApplicationSettings: migrating ======
-- add_column(:application_settings, :git_cli_session_expiry, :integer, {:default=>15, :null=>false})
-> 0.0047s
== 20210113051026 AddGitCliSessionExpiryToApplicationSettings: migrated (0.0047s)
$ rails db:rollback
== 20210113051026 AddGitCliSessionExpiryToApplicationSettings: reverting ======
-- remove_column(:application_settings, :git_cli_session_expiry, :integer, {:default=>15, :null=>false})
-> 0.0020s
== 20210113051026 AddGitCliSessionExpiryToApplicationSettings: reverted (0.0044s)
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Manoj M J