1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 13:53:34 +00:00

[PM-27204] New Feature Flag for datadog and crowdstrike (#16968)

This commit is contained in:
Vijay Oommen
2025-10-22 10:10:56 -05:00
committed by GitHub
parent 2179cb6848
commit cc954ed123
3 changed files with 10 additions and 25 deletions

View File

@@ -171,7 +171,10 @@ export class HecOrganizationIntegrationService {
); );
if (updatedIntegration !== null) { if (updatedIntegration !== null) {
this._integrations$.next([...this._integrations$.getValue(), updatedIntegration]); const unchangedIntegrations = this._integrations$
.getValue()
.filter((i) => i.id !== OrganizationIntegrationId);
this._integrations$.next([...unchangedIntegrations, updatedIntegration]);
} }
return { mustBeOwner: false, success: true }; return { mustBeOwner: false, success: true };
} catch (error) { } catch (error) {

View File

@@ -29,7 +29,7 @@ import { FilterIntegrationsPipe } from "./integrations.pipe";
export class AdminConsoleIntegrationsComponent implements OnInit, OnDestroy { export class AdminConsoleIntegrationsComponent implements OnInit, OnDestroy {
tabIndex: number = 0; tabIndex: number = 0;
organization$: Observable<Organization> = new Observable<Organization>(); organization$: Observable<Organization> = new Observable<Organization>();
isEventBasedIntegrationsEnabled: boolean = false; isEventManagementForDataDogAndCrowdStrikeEnabled: boolean = false;
private destroy$ = new Subject<void>(); private destroy$ = new Subject<void>();
// initialize the integrations list with default integrations // initialize the integrations list with default integrations
@@ -230,24 +230,6 @@ export class AdminConsoleIntegrationsComponent implements OnInit, OnDestroy {
this.hecOrganizationIntegrationService.setOrganizationIntegrations(org.id); this.hecOrganizationIntegrationService.setOrganizationIntegrations(org.id);
this.datadogOrganizationIntegrationService.setOrganizationIntegrations(org.id); this.datadogOrganizationIntegrationService.setOrganizationIntegrations(org.id);
}); });
// For all existing event based configurations loop through and assign the
// organizationIntegration for the correct services.
this.hecOrganizationIntegrationService.integrations$
.pipe(takeUntil(this.destroy$))
.subscribe((integrations) => {
// reset all integrations to null first - in case one was deleted
this.integrationsList.forEach((i) => {
i.organizationIntegration = null;
});
integrations.map((integration) => {
const item = this.integrationsList.find((i) => i.name === integration.serviceType);
if (item) {
item.organizationIntegration = integration;
}
});
});
} }
constructor( constructor(
@@ -259,14 +241,14 @@ export class AdminConsoleIntegrationsComponent implements OnInit, OnDestroy {
private datadogOrganizationIntegrationService: DatadogOrganizationIntegrationService, private datadogOrganizationIntegrationService: DatadogOrganizationIntegrationService,
) { ) {
this.configService this.configService
.getFeatureFlag$(FeatureFlag.EventBasedOrganizationIntegrations) .getFeatureFlag$(FeatureFlag.EventManagementForDataDogAndCrowdStrike)
.pipe(takeUntil(this.destroy$)) .pipe(takeUntil(this.destroy$))
.subscribe((isEnabled) => { .subscribe((isEnabled) => {
this.isEventBasedIntegrationsEnabled = isEnabled; this.isEventManagementForDataDogAndCrowdStrikeEnabled = isEnabled;
}); });
// Add the new event based items to the list // Add the new event based items to the list
if (this.isEventBasedIntegrationsEnabled) { if (this.isEventManagementForDataDogAndCrowdStrikeEnabled) {
const crowdstrikeIntegration: Integration = { const crowdstrikeIntegration: Integration = {
name: OrganizationIntegrationServiceType.CrowdStrike, name: OrganizationIntegrationServiceType.CrowdStrike,
linkURL: "https://bitwarden.com/help/crowdstrike-siem/", linkURL: "https://bitwarden.com/help/crowdstrike-siem/",

View File

@@ -45,7 +45,7 @@ export enum FeatureFlag {
ChromiumImporterWithABE = "pm-25855-chromium-importer-abe", ChromiumImporterWithABE = "pm-25855-chromium-importer-abe",
/* DIRT */ /* DIRT */
EventBasedOrganizationIntegrations = "event-based-organization-integrations", EventManagementForDataDogAndCrowdStrike = "event-management-for-datadog-and-crowdstrike",
PhishingDetection = "phishing-detection", PhishingDetection = "phishing-detection",
PM22887_RiskInsightsActivityTab = "pm-22887-risk-insights-activity-tab", PM22887_RiskInsightsActivityTab = "pm-22887-risk-insights-activity-tab",
@@ -91,7 +91,7 @@ export const DefaultFeatureFlagValue = {
[FeatureFlag.ChromiumImporterWithABE]: FALSE, [FeatureFlag.ChromiumImporterWithABE]: FALSE,
/* DIRT */ /* DIRT */
[FeatureFlag.EventBasedOrganizationIntegrations]: FALSE, [FeatureFlag.EventManagementForDataDogAndCrowdStrike]: FALSE,
[FeatureFlag.PhishingDetection]: FALSE, [FeatureFlag.PhishingDetection]: FALSE,
[FeatureFlag.PM22887_RiskInsightsActivityTab]: FALSE, [FeatureFlag.PM22887_RiskInsightsActivityTab]: FALSE,