diff --git a/doc/administration/audit_event_streaming/index.md b/doc/administration/audit_event_streaming/index.md index 09474db1e08e759e9dc488e6ae867e519b888c94..c345400da83dba758835864c76dd846540102d93 100644 --- a/doc/administration/audit_event_streaming/index.md +++ b/doc/administration/audit_event_streaming/index.md @@ -261,11 +261,8 @@ To delete Google Cloud Logging streaming destinations to a top-level group: ### AWS S3 destinations -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/132603) in GitLab 16.6 [with a flag](../feature_flags.md) named `allow_streaming_audit_events_to_amazon_s3`. Enabled by default. - -FLAG: -On self-managed GitLab, by default this feature is available. To hide the feature per group, an administrator can [disable the feature flag](../feature_flags.md) named `allow_streaming_audit_events_to_amazon_s3`. -On GitLab.com, this feature is available. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/132603) in GitLab 16.6 [with a flag](../feature_flags.md) named `allow_streaming_audit_events_to_amazon_s3`. Enabled by default. +> - [Feature flag `allow_streaming_audit_events_to_amazon_s3`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137391) removed in GitLab 16.7. Manage AWS S3 destinations for top-level groups. diff --git a/ee/config/feature_flags/development/allow_streaming_audit_events_to_amazon_s3.yml b/ee/config/feature_flags/development/allow_streaming_audit_events_to_amazon_s3.yml deleted file mode 100644 index d1f30a363a3384fdf6e4664bf09bf7c3799d7434..0000000000000000000000000000000000000000 --- a/ee/config/feature_flags/development/allow_streaming_audit_events_to_amazon_s3.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: allow_streaming_audit_events_to_amazon_s3 -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131372 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/424726 -milestone: '16.5' -type: development -group: group::compliance -default_enabled: true diff --git a/ee/lib/audit_events/strategies/amazon_s3_destination_strategy.rb b/ee/lib/audit_events/strategies/amazon_s3_destination_strategy.rb index 1a7e8845f0b0219133d5efb421e27c8d624613e3..8a7a5aa6497c97e55c55d214b4a95801200bc983 100644 --- a/ee/lib/audit_events/strategies/amazon_s3_destination_strategy.rb +++ b/ee/lib/audit_events/strategies/amazon_s3_destination_strategy.rb @@ -4,8 +4,6 @@ module AuditEvents module Strategies class AmazonS3DestinationStrategy < ExternalDestinationStrategy def streamable? - return false unless Feature.enabled?(:allow_streaming_audit_events_to_amazon_s3, audit_event.root_group_entity) - group = audit_event.root_group_entity return false if group.nil? return false unless group.licensed_feature_available?(:external_audit_events) @@ -21,8 +19,6 @@ def destinations end def track_and_stream(destination) - return unless Feature.enabled?(:allow_streaming_audit_events_to_amazon_s3, audit_event.root_group_entity) - track_audit_event_count payload = request_body diff --git a/ee/spec/lib/audit_events/strategies/amazon_s3_destination_strategy_spec.rb b/ee/spec/lib/audit_events/strategies/amazon_s3_destination_strategy_spec.rb index ceafc3ac8cc813cd6b1f1a7b8d07752a93a7c0c8..bb1d8be9c85bd97161c58791593ff9de59160fba 100644 --- a/ee/spec/lib/audit_events/strategies/amazon_s3_destination_strategy_spec.rb +++ b/ee/spec/lib/audit_events/strategies/amazon_s3_destination_strategy_spec.rb @@ -12,52 +12,31 @@ describe '#streamable?' do subject { described_class.new(event_type, event).streamable? } - context 'when feature flag is disabled' do + context 'when feature is not licensed' do + it { is_expected.to be_falsey } + end + + context 'when feature is licensed' do before do stub_licensed_features(external_audit_events: true) - stub_feature_flags(allow_streaming_audit_events_to_amazon_s3: false) end - context 'when Amazon S3 configurations exists for the group' do - before do - create(:amazon_s3_configuration, group: group) - end + context 'when event group is nil' do + let_it_be(:event) { build(:audit_event) } it { is_expected.to be_falsey } end - end - - context 'when feature flag is enabled' do - before do - stub_feature_flags(allow_streaming_audit_events_to_amazon_s3: true) - end - context 'when feature is not licensed' do + context 'when Amazon S3 configurations does not exist for the group' do it { is_expected.to be_falsey } end - context 'when feature is licensed' do + context 'when Amazon S3 configurations exists for the group' do before do - stub_licensed_features(external_audit_events: true) - end - - context 'when event group is nil' do - let_it_be(:event) { build(:audit_event) } - - it { is_expected.to be_falsey } - end - - context 'when Amazon S3 configurations does not exist for the group' do - it { is_expected.to be_falsey } + create(:amazon_s3_configuration, group: group) end - context 'when Amazon S3 configurations exists for the group' do - before do - create(:amazon_s3_configuration, group: group) - end - - it { is_expected.to be_truthy } - end + it { is_expected.to be_truthy } end end end