Skip to content

Commit 2067524

Browse files
mjabascal10Kbayero
andauthored
feat: set ip address to agent (#1039)
* Change agent version * feat: set ip address to agent * update actions and remove correlation --------- Co-authored-by: Yorjander Hernandez Vergara <[email protected]>
1 parent 97c3529 commit 2067524

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

.github/workflows/principal-multi-env.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ jobs:
4343
backend:
4444
- 'backend/**'
4545
- 'version.yml'
46-
correlation: correlation/**
4746
frontend: frontend/**
4847
bitdefender: bitdefender/**
4948
mutate: mutate/**
@@ -74,7 +73,7 @@ jobs:
7473
strategy:
7574
fail-fast: false
7675
matrix:
77-
service: ['agent-manager', 'aws', 'backend', 'correlation', 'frontend', 'bitdefender', 'mutate', 'office365', 'log-auth-proxy', 'sophos', 'user-auditor', 'web-pdf']
76+
service: ['agent-manager', 'aws', 'backend', 'frontend', 'bitdefender', 'mutate', 'office365', 'log-auth-proxy', 'sophos', 'user-auditor', 'web-pdf']
7877
uses: ./.github/workflows/used-runner.yml
7978
with:
8079
microservice: ${{ matrix.service }}

.github/workflows/used-runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
id: get_tech
2323
run: |
2424
folder_changed="${{inputs.microservice}}"
25-
if [[ "$folder_changed" == "agent-manager" || "$folder_changed" == "aws" || "$folder_changed" == "correlation" || "$folder_changed" == "bitdefender" || "$folder_changed" == "office365" || "$folder_changed" == "sophos" || "$folder_changed" == "log-auth-proxy" ]]; then
25+
if [[ "$folder_changed" == "agent-manager" || "$folder_changed" == "aws" || "$folder_changed" == "bitdefender" || "$folder_changed" == "office365" || "$folder_changed" == "sophos" || "$folder_changed" == "log-auth-proxy" ]]; then
2626
tech="golang"
2727
elif [[ "$folder_changed" == "backend" ]]; then
2828
tech="java-11"

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
## New Features
1111
- Introduced new standards, sections, dashboards, and visualizations to compliance reports.
1212
- Update ip address to agent.
13-
- Alert generation for down data sources.
13+
- Alert generation for down data sources.

frontend/src/app/shared/components/utm/util/utm-agent-detail/utm-agent-detail.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Component, Input, OnInit} from '@angular/core';
2-
import {EMPTY, of} from 'rxjs';
2+
import {EMPTY} from 'rxjs';
33
import {catchError, map, tap} from 'rxjs/operators';
44
import {NetScanType} from '../../../../../assets-discover/shared/types/net-scan.type';
55
import {UtmToastService} from '../../../../alert/utm-toast.service';
@@ -53,6 +53,7 @@ export class UtmAgentDetailComponent implements OnInit {
5353
this.loading = true;
5454
const agent = {
5555
id: this.agent.id,
56+
hostname: this.agent.hostname,
5657
ip: this.agentIp,
5758
mac: this.macs.length > 0 ? this.macs[0] : '',
5859
agentKey: this.agent.agentKey

log-auth-proxy/logservice/auth_service.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package logservice
22

33
import (
44
"context"
5+
"crypto/tls"
56
"os"
67
"sync"
78
"time"
@@ -11,7 +12,7 @@ import (
1112
"github.com/utmstack/UTMStack/log-auth-proxy/panelservice"
1213
"github.com/utmstack/UTMStack/log-auth-proxy/utils"
1314
"google.golang.org/grpc"
14-
"google.golang.org/grpc/credentials/insecure"
15+
"google.golang.org/grpc/credentials"
1516
"google.golang.org/grpc/metadata"
1617
)
1718

@@ -57,7 +58,11 @@ func (auth *LogAuthService) syncKeys(typ agent.ConnectorType) {
5758
h.Fatal("Failed to get the SERVER_ADDRESS ")
5859
}
5960

60-
conn, err := grpc.Dial(serverAddress, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMessageSize)))
61+
tlsConfig := &tls.Config{InsecureSkipVerify: true}
62+
creds := credentials.NewTLS(tlsConfig)
63+
opts := grpc.WithTransportCredentials(creds)
64+
65+
conn, err := grpc.NewClient(serverAddress, opts, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMessageSize)))
6166
if err != nil {
6267
h.ErrorF("Failed to connect to gRPC server: %v", err)
6368
return

0 commit comments

Comments
 (0)