Commit 23e9f7c0 authored by huzaifaiftikhar1's avatar huzaifaiftikhar1

Remove feature flag `ff_limit_ssh_key_lifetime`

Changelog: other
parent 799ea7f0
......@@ -201,11 +201,7 @@ To set a limit on how long these sessions are valid:
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/1007) in GitLab 14.6 [with a flag](../../../administration/feature_flags.md) named `ff_limit_ssh_key_lifetime`. Disabled by default.
> - [Enabled on self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/346753) in GitLab 14.6.
FLAG:
On self-managed GitLab, by default this feature is available. To hide the feature,
ask an administrator to [disable the feature flag](../../../administration/feature_flags.md) named `ff_limit_ssh_key_lifetime`.
On GitLab.com, this feature is not available.
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/1007) in GitLab 14.7. [Feature flag ff_limit_ssh_key_lifetime](https://gitlab.com/gitlab-org/gitlab/-/issues/347408) removed.
Users can optionally specify a lifetime for
[SSH keys](../../../ssh/index.md).
......
......@@ -23,12 +23,12 @@ module EE
end
def ssh_key_expiration_policy_licensed?
License.feature_available?(:ssh_key_expiration_policy) && ::Feature.enabled?(:ff_limit_ssh_key_lifetime, default_enabled: :yaml)
License.feature_available?(:ssh_key_expiration_policy)
end
override :ssh_key_expiration_policy_enabled?
def ssh_key_expiration_policy_enabled?
::Gitlab::CurrentSettings.max_ssh_key_lifetime && ssh_key_expiration_policy_licensed? && ::Feature.enabled?(:ff_limit_ssh_key_lifetime, default_enabled: :yaml)
::Gitlab::CurrentSettings.max_ssh_key_lifetime && ssh_key_expiration_policy_licensed?
end
end
end
---
name: ff_limit_ssh_key_lifetime
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75098
rollout_issue_url:
milestone: '14.6'
type: development
group: group::compliance
default_enabled: true
......@@ -87,11 +87,6 @@ RSpec.describe ProfilesHelper do
describe '#ssh_key_expiration_policy_enabled?' do
subject { helper.ssh_key_expiration_policy_enabled? }
context 'when feature flag is enabled' do
before do
stub_feature_flags(ff_limit_ssh_key_lifetime: true)
end
context 'when is licensed and used' do
before do
stub_licensed_features(ssh_key_expiration_policy: true)
......@@ -118,19 +113,4 @@ RSpec.describe ProfilesHelper do
it { is_expected.to be_falsey }
end
end
context 'when feature flag is disabled' do
before do
stub_feature_flags(ff_limit_ssh_key_lifetime: false)
end
context 'when is licensed and used' do
before do
stub_licensed_features(ssh_key_expiration_policy: true)
stub_application_setting(max_ssh_key_lifetime: 10)
end
it { is_expected.to be_falsey }
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment