mirror of
https://github.com/bitwarden/browser
synced 2026-02-21 03:43:58 +00:00
PM-30879 updated integration with minor changes like removing magic strings
This commit is contained in:
@@ -21,6 +21,11 @@ export interface OrgIntegrationTemplate {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export const Schemas = {
|
||||
Bearer: "Bearer",
|
||||
Splunk: "Splunk",
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* Builder class for creating organization integration configurations and templates
|
||||
*/
|
||||
@@ -29,7 +34,7 @@ export class OrgIntegrationBuilder {
|
||||
uri: string,
|
||||
token: string,
|
||||
bw_serviceName: OrganizationIntegrationServiceName,
|
||||
scheme: string = "Bearer",
|
||||
scheme: string = Schemas.Bearer,
|
||||
): OrgIntegrationConfiguration {
|
||||
return new HecConfiguration(uri, token, bw_serviceName, scheme);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
OrgIntegrationBuilder,
|
||||
OrgIntegrationConfiguration,
|
||||
OrgIntegrationTemplate,
|
||||
Schemas,
|
||||
} from "@bitwarden/bit-common/dirt/organization-integrations/models/integration-builder";
|
||||
import { OrganizationIntegrationServiceName } from "@bitwarden/bit-common/dirt/organization-integrations/models/organization-integration-service-type";
|
||||
import { OrganizationIntegrationType } from "@bitwarden/bit-common/dirt/organization-integrations/models/organization-integration-type";
|
||||
@@ -366,7 +367,7 @@ export class IntegrationCardComponent implements AfterViewInit, OnDestroy {
|
||||
result.url,
|
||||
result.token,
|
||||
OrganizationIntegrationServiceName.Huntress,
|
||||
"Splunk",
|
||||
Schemas.Splunk,
|
||||
);
|
||||
// Huntress SIEM doesn't require the index field
|
||||
const template = OrgIntegrationBuilder.buildHecTemplate(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, Inject, OnInit } from "@angular/core";
|
||||
import { ChangeDetectionStrategy, Component, Inject, OnInit } from "@angular/core";
|
||||
import { FormBuilder, Validators } from "@angular/forms";
|
||||
|
||||
import { HecConfiguration } from "@bitwarden/bit-common/dirt/organization-integrations/models/configuration/hec-configuration";
|
||||
@@ -23,9 +23,8 @@ export interface HuntressConnectDialogResult {
|
||||
success: IntegrationDialogResultStatusType | null;
|
||||
}
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
templateUrl: "./connect-dialog-huntress.component.html",
|
||||
imports: [SharedModule],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user