|
1 | 1 | <div class="w-100 h-100"> |
2 | 2 | <div class="card-header d-flex justify-content-between align-items-center"> |
3 | | - <h4 class="card-title mb-0 text-primary"> |
4 | | - SOC AI |
5 | | - </h4> |
| 3 | + <h4 class="card-title mb-0 text-primary">SOC AI</h4> |
6 | 4 | </div> |
7 | 5 | <div class="card-body"> |
8 | | - <ol class="setup_list"> |
9 | | - <li> |
10 | | - <p class="step-guide mb-3"> |
11 | | - <span class="step_number">1</span> Access the API key by logging in to your OpenAI account and navigating to |
12 | | - the |
13 | | - API section |
14 | | - <img alt="IAM configuration" class="step-img" |
15 | | - src="../../../../assets/img/guides/soc-ai/step1.png"> |
16 | | - </li> |
17 | | - <li> |
18 | | - <p class="step-guide mb-3"> |
19 | | - <span class="step_number">2</span> Create a new API key, and copy the value |
20 | | - </p> |
21 | | - <img alt="IAM configuration" class="step-img" |
22 | | - src="../../../../assets/img/guides/soc-ai/step2.png"> |
23 | | - </li> |
24 | | - <li> |
25 | | - <p class="step-guide mb-3"> |
26 | | - <span class="step_number">3</span> Paste the API Key in the form below: |
27 | | - </p> |
28 | | - <div class="row mt-3"> |
29 | | - <div class="col-lg-12 col-md-12 col-sm-12"> |
30 | | - <app-int-generic-group-config [moduleId]="integrationId" |
31 | | - [allowAdd]="false" |
32 | | - [editable]="false" |
33 | | - (configValidChange)="configValidChange($event)" |
34 | | - [serverId]="serverId"></app-int-generic-group-config> |
35 | | - </div> |
36 | | - </div> |
37 | | - |
38 | | - </li> |
39 | | - <li> |
40 | | - <p class="step-guide mb-3"> |
41 | | - <span class="step_number">4</span> |
42 | | - Click on the button shown below, to activate the UTMStack features related to this integration |
43 | | - </p> |
44 | | - <app-app-module-activate-button [module]="module.SOC_AI" [type]="'integration'" |
45 | | - [disabled]="false" |
46 | | - [serverId]="serverId" |
47 | | - class="mt-3"> |
48 | | - </app-app-module-activate-button> |
49 | | - </li> |
50 | | - </ol> |
| 6 | + |
| 7 | + <p class="mb-4"> |
| 8 | + SOC AI enhances your security operations by integrating advanced language models directly into your alert investigation workflow. |
| 9 | + It automatically analyzes alerts, identifies patterns, prioritizes threats, and provides actionable insights to accelerate incident response. |
| 10 | + Connect any of the supported AI providers below to get started. |
| 11 | + If your provider is not listed, you can use the <strong>Custom</strong> tab to configure any service that supports the OpenAI-compatible chat completions format. |
| 12 | + </p> |
| 13 | + |
| 14 | + <div *ngIf="loading" class="d-flex justify-content-center p-5"> |
| 15 | + <app-utm-spinner [loading]="true" label="Loading configuration..."></app-utm-spinner> |
| 16 | + </div> |
| 17 | + |
| 18 | + <ng-container *ngIf="!loading"> |
| 19 | + <!-- Provider tabs --> |
| 20 | + <ngb-tabset (tabChange)="onTabChange($event)"> |
| 21 | + <ngb-tab *ngFor="let provider of providers" [id]="provider.id"> |
| 22 | + <ng-template ngbTabTitle> |
| 23 | + <img [src]="provider.logo" [alt]="provider.name" class="provider-logo mr-1"> |
| 24 | + {{ provider.name }} |
| 25 | + </ng-template> |
| 26 | + <ng-template ngbTabContent> |
| 27 | + <div class="mt-3"> |
| 28 | + <!-- Provider description --> |
| 29 | + <p class="step-guide mb-4" [innerHTML]="provider.description"></p> |
| 30 | + |
| 31 | + <!-- Dynamic fields --> |
| 32 | + <div class="row"> |
| 33 | + <ng-container *ngFor="let field of provider.fields"> |
| 34 | + <!-- Text / Password / Number inputs --> |
| 35 | + <div *ngIf="field.type === 'text' || field.type === 'password' || field.type === 'number'" |
| 36 | + class="col-lg-6 col-md-12 mb-3"> |
| 37 | + <label class="pb-1 d-flex justify-content-between align-items-center"> |
| 38 | + <span> |
| 39 | + <i [ngClass]="field.required && !formValues[field.key] ? 'text-danger' : 'text-success'" |
| 40 | + class="icon-circle2 mr-1"></i> |
| 41 | + {{ field.label }} |
| 42 | + </span> |
| 43 | + <i *ngIf="field.tooltip" [ngbTooltip]="field.tooltip" |
| 44 | + class="icon-question3 text-primary" placement="auto"></i> |
| 45 | + </label> |
| 46 | + <input [type]="field.type" |
| 47 | + [(ngModel)]="formValues[field.key]" |
| 48 | + [placeholder]="field.placeholder || ''" |
| 49 | + [required]="field.required" |
| 50 | + class="form-control"> |
| 51 | + <small *ngIf="field.required && !formValues[field.key]" class="text-danger"> |
| 52 | + {{ field.label }} is required |
| 53 | + </small> |
| 54 | + </div> |
| 55 | + |
| 56 | + <!-- Select --> |
| 57 | + <div *ngIf="field.type === 'select'" class="col-lg-6 col-md-12 mb-3"> |
| 58 | + <label class="pb-1 d-flex justify-content-between align-items-center"> |
| 59 | + <span> |
| 60 | + <i [ngClass]="field.required && !formValues[field.key] ? 'text-danger' : 'text-success'" |
| 61 | + class="icon-circle2 mr-1"></i> |
| 62 | + {{ field.label }} |
| 63 | + </span> |
| 64 | + <i *ngIf="field.tooltip" [ngbTooltip]="field.tooltip" |
| 65 | + class="icon-question3 text-primary" placement="auto"></i> |
| 66 | + </label> |
| 67 | + <ng-select *ngIf="formValues[field.key] !== '__custom__'" |
| 68 | + [items]="field.options" |
| 69 | + bindLabel="label" |
| 70 | + bindValue="value" |
| 71 | + [(ngModel)]="formValues[field.key]" |
| 72 | + [clearable]="false" |
| 73 | + [searchable]="false" |
| 74 | + [placeholder]="'Select ' + field.label"> |
| 75 | + </ng-select> |
| 76 | + <div *ngIf="formValues[field.key] === '__custom__'" class="input-group"> |
| 77 | + <input type="text" |
| 78 | + [(ngModel)]="customModelValue" |
| 79 | + placeholder="Enter model name" |
| 80 | + class="form-control"> |
| 81 | + <div class="input-group-append"> |
| 82 | + <button class="btn btn-outline-secondary" type="button" |
| 83 | + (click)="formValues[field.key] = ''"> |
| 84 | + <i class="icon-arrow-left32"></i> |
| 85 | + </button> |
| 86 | + </div> |
| 87 | + </div> |
| 88 | + <small *ngIf="field.required && !formValues[field.key] && formValues[field.key] !== '__custom__'" class="text-danger"> |
| 89 | + {{ field.label }} is required |
| 90 | + </small> |
| 91 | + </div> |
| 92 | + |
| 93 | + <!-- Headers table --> |
| 94 | + <div *ngIf="field.type === 'headers' && formValues['authType'] !== 'none'" class="col-12 mb-3"> |
| 95 | + <label class="pb-1"> |
| 96 | + <i class="icon-circle2 mr-1 text-success"></i> |
| 97 | + {{ field.label }} |
| 98 | + </label> |
| 99 | + <table class="table table-sm table-bordered mb-2"> |
| 100 | + <thead> |
| 101 | + <tr class="bg-light"> |
| 102 | + <th style="width: 35%">Header Name</th> |
| 103 | + <th>Header Value</th> |
| 104 | + <th style="width: 50px"></th> |
| 105 | + </tr> |
| 106 | + </thead> |
| 107 | + <tbody> |
| 108 | + <tr *ngFor="let row of headerRows; let i = index"> |
| 109 | + <td> |
| 110 | + <input type="text" [(ngModel)]="row.key" |
| 111 | + (ngModelChange)="syncHeadersToForm()" |
| 112 | + placeholder="e.g. Authorization" |
| 113 | + class="form-control form-control-sm"> |
| 114 | + </td> |
| 115 | + <td> |
| 116 | + <input type="text" [(ngModel)]="row.value" |
| 117 | + (ngModelChange)="syncHeadersToForm()" |
| 118 | + placeholder="e.g. Bearer sk-xxx" |
| 119 | + class="form-control form-control-sm"> |
| 120 | + </td> |
| 121 | + <td class="text-center"> |
| 122 | + <i class="icon-cross2 cursor-pointer text-danger" |
| 123 | + (click)="removeHeaderRow(i)" |
| 124 | + ngbTooltip="Remove header"></i> |
| 125 | + </td> |
| 126 | + </tr> |
| 127 | + <tr *ngIf="headerRows.length === 0"> |
| 128 | + <td colspan="3" class="text-center text-muted py-2"> |
| 129 | + No headers configured. Click "Add Header" to add one. |
| 130 | + </td> |
| 131 | + </tr> |
| 132 | + </tbody> |
| 133 | + </table> |
| 134 | + <button class="btn btn-sm utm-button utm-button-primary" (click)="addHeaderRow()"> |
| 135 | + <i class="icon-plus2 mr-1"></i> Add Header |
| 136 | + </button> |
| 137 | + </div> |
| 138 | + |
| 139 | + <!-- Toggle --> |
| 140 | + <div *ngIf="field.type === 'toggle'" class="col-lg-6 col-md-12 mb-3"> |
| 141 | + <app-utm-toggle |
| 142 | + [active]="formValues[field.key] === 'true'" |
| 143 | + [label]="field.label" |
| 144 | + [emitAtStart]="false" |
| 145 | + (toggleChange)="onToggle(field.key, $event)"> |
| 146 | + </app-utm-toggle> |
| 147 | + </div> |
| 148 | + </ng-container> |
| 149 | + </div> |
| 150 | + |
| 151 | + <!-- Save & Activate --> |
| 152 | + <div class="d-flex justify-content-end align-items-center mt-3 border-top pt-3"> |
| 153 | + <button class="btn utm-button utm-button-primary" (click)="save()" |
| 154 | + [disabled]="!isFormValid() || saving"> |
| 155 | + <i [ngClass]="saving ? 'icon-spinner2 spinner' : 'icon-cog5'" class="mr-1"></i> |
| 156 | + Save configuration |
| 157 | + </button> |
| 158 | + <app-app-module-activate-button [module]="module.SOC_AI" [type]="'integration'" |
| 159 | + [disabled]="false" |
| 160 | + [serverId]="serverId" |
| 161 | + class="ml-2"> |
| 162 | + </app-app-module-activate-button> |
| 163 | + </div> |
| 164 | + </div> |
| 165 | + </ng-template> |
| 166 | + </ngb-tab> |
| 167 | + </ngb-tabset> |
| 168 | + </ng-container> |
| 169 | + |
51 | 170 | </div> |
52 | 171 | </div> |
0 commit comments