Skip to content

Add a feature for setting the maximum allowable lifetime for SSH keys at an instance level

What does this MR do and why?

Add a new feature to enable GitLab Ultimate self-managed users to set the maximum allowable lifetime for SSH keys.

Database

Migration

Up
== 20211118114228 AddMaxSshKeyLifetimeToApplicationSettings: migrating ========
-- add_column(:application_settings, :max_ssh_key_lifetime, :integer)
   -> 0.0094s
== 20211118114228 AddMaxSshKeyLifetimeToApplicationSettings: migrated (0.0095s)
Down
== 20211118114228 AddMaxSshKeyLifetimeToApplicationSettings: reverting ========
-- remove_column(:application_settings, :max_ssh_key_lifetime, :integer)
   -> 0.0040s
== 20211118114228 AddMaxSshKeyLifetimeToApplicationSettings: reverted (0.0080s)

Database lab migration

  1. Up - https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/7375/commands/26214
  2. Down - https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/7375/commands/26215

Screenshots or screen recordings

https://www.loom.com/share/2a8c809aa41c43988d204c60113f314a

How to set up and validate locally

  1. Enable feature flag ff_limit_ssh_key_lifetime
  2. Make sure you have GitLab ultimate license.
  3. Watch the video to get more insights.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #1007 (closed)

Edited by Huzaifa Iftikhar

Merge request reports

Loading