Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# UTMStack 10.8.3 Release Notes
# UTMStack 10.8.4 Release Notes

- Fixed a potential delay in log input in O365, AWS, and Sophos Central integrations.
- Enhanced security and compliance by upgrading several internal components—most notably the update server—to exclusively support TLS 1.3.
45 changes: 0 additions & 45 deletions agent-manager/auth/dependencies_interceptor.go

This file was deleted.

32 changes: 28 additions & 4 deletions agent-manager/updates/updates.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package updates

import (
"crypto/tls"
"net/http"

"github.com/gin-contrib/gzip"
"github.com/gin-gonic/gin"
"github.com/utmstack/UTMStack/agent-manager/auth"
"github.com/utmstack/UTMStack/agent-manager/util"
)

Expand All @@ -27,14 +27,38 @@ func ServeDependencies() {

r.NoRoute(notFound)

group := r.Group("/private", auth.HTTPAuthInterceptor())
group := r.Group("/private")
group.StaticFS("/dependencies", http.Dir("/dependencies"))

cert, err := tls.LoadX509KeyPair("/cert/utm.crt", "/cert/utm.key")
if err != nil {
util.Logger.ErrorF("failed to load certificates: %v", err)
}

tlsConfig := &tls.Config{
MinVersion: tls.VersionTLS12,
Certificates: []tls.Certificate{cert},
CipherSuites: []uint16{
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
},

PreferServerCipherSuites: true,
}

server := &http.Server{
Addr: ":8080",
Handler: r,
TLSConfig: tlsConfig,
}

util.Logger.Info("Starting HTTP server on port 8080")
if err := r.RunTLS(":8080", "/cert/utm.crt", "/cert/utm.key"); err != nil {
err = server.ListenAndServeTLS("", "")
if err != nil {
util.Logger.ErrorF("error starting HTTP server: %v", err)
return
}

}

func notFound(c *gin.Context) {
Expand Down
8 changes: 1 addition & 7 deletions agent/serv/clean-old.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,8 @@ func CleanOldServices(cnf *config.Config) {

if oldVersion {
utils.Logger.Info("old version of agent found, downloading new version")
headers := map[string]string{
"key": cnf.AgentKey,
"id": fmt.Sprintf("%v", cnf.AgentID),
"type": "agent",
}

if runtime.GOOS != "darwin" {
if err := utils.DownloadFile(fmt.Sprintf(config.DependUrl, cnf.Server, config.DependenciesPort, fmt.Sprintf(config.UpdaterSelf, "")), headers, fmt.Sprintf(config.UpdaterSelf, "_new"), utils.GetMyPath(), cnf.SkipCertValidation); err != nil {
if err := utils.DownloadFile(fmt.Sprintf(config.DependUrl, cnf.Server, config.DependenciesPort, fmt.Sprintf(config.UpdaterSelf, "")), map[string]string{}, fmt.Sprintf(config.UpdaterSelf, "_new"), utils.GetMyPath(), cnf.SkipCertValidation); err != nil {
utils.Logger.LogF(100, "error downloading updater: %v", err)
return
}
Expand Down
6 changes: 2 additions & 4 deletions agent/updates/dependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ import (
)

func DownloadFirstDependencies(address string, authKey string, insecure bool) error {
headers := map[string]string{"connection-key": authKey}

if err := utils.DownloadFile(fmt.Sprintf(config.DependUrl, address, config.DependenciesPort, "version.json"), headers, "version.json", utils.GetMyPath(), insecure); err != nil {
if err := utils.DownloadFile(fmt.Sprintf(config.DependUrl, address, config.DependenciesPort, "version.json"), map[string]string{}, "version.json", utils.GetMyPath(), insecure); err != nil {
return fmt.Errorf("error downloading version.json : %v", err)
}

dependFiles := config.DependFiles
for _, file := range dependFiles {
if err := utils.DownloadFile(fmt.Sprintf(config.DependUrl, address, config.DependenciesPort, file), headers, file, utils.GetMyPath(), insecure); err != nil {
if err := utils.DownloadFile(fmt.Sprintf(config.DependUrl, address, config.DependenciesPort, file), map[string]string{}, file, utils.GetMyPath(), insecure); err != nil {
return fmt.Errorf("error downloading file %s: %v", file, err)
}
}
Expand Down
10 changes: 2 additions & 8 deletions agent/updates/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,7 @@ func UpdateDependencies(cnf *config.Config) {
for {
time.Sleep(checkEvery)

headers := map[string]string{
"key": cnf.AgentKey,
"id": fmt.Sprintf("%v", cnf.AgentID),
"type": "agent",
}

if err := utils.DownloadFile(fmt.Sprintf(config.DependUrl, cnf.Server, config.DependenciesPort, "version.json"), headers, "version_new.json", utils.GetMyPath(), cnf.SkipCertValidation); err != nil {
if err := utils.DownloadFile(fmt.Sprintf(config.DependUrl, cnf.Server, config.DependenciesPort, "version.json"), map[string]string{}, "version_new.json", utils.GetMyPath(), cnf.SkipCertValidation); err != nil {
utils.Logger.ErrorF("error downloading version.json: %v", err)
continue
}
Expand All @@ -48,7 +42,7 @@ func UpdateDependencies(cnf *config.Config) {

if newVersion.Version != currentVersion.Version {
utils.Logger.Info("New version of agent found: %s", newVersion.Version)
if err := utils.DownloadFile(fmt.Sprintf(config.DependUrl, cnf.Server, config.DependenciesPort, fmt.Sprintf(config.ServiceFile, "")), headers, fmt.Sprintf(config.ServiceFile, "_new"), utils.GetMyPath(), cnf.SkipCertValidation); err != nil {
if err := utils.DownloadFile(fmt.Sprintf(config.DependUrl, cnf.Server, config.DependenciesPort, fmt.Sprintf(config.ServiceFile, "")), map[string]string{}, fmt.Sprintf(config.ServiceFile, "_new"), utils.GetMyPath(), cnf.SkipCertValidation); err != nil {
utils.Logger.ErrorF("error downloading agent: %v", err)
continue
}
Expand Down
6 changes: 6 additions & 0 deletions bitdefender/server/server.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package server

import (
"crypto/tls"
"encoding/json"
"net/http"
"path/filepath"
Expand Down Expand Up @@ -80,12 +81,17 @@ func ServerUp(cnf *types.ConfigurationSection, certsPath string) {
_, _ = w.Write([]byte("Server is up and running"))
}).Methods("GET")

tlsConfig := &tls.Config{
MinVersion: tls.VersionTLS13,
}

server := &http.Server{
Addr: ":" + constants.GetConnectorPort(),
Handler: r,
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
MaxHeaderBytes: 1 << 20,
TLSConfig: tlsConfig,
}

go func() {
Expand Down
11 changes: 6 additions & 5 deletions frontend/src/app/app-module/guides/guide-as400/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ export const PLATFORM = [
name: 'WINDOWS',
install: `New-Item -ItemType Directory -Force -Path "C:\\Program Files\\UTMStack\\UTMStack Collectors\\AS400"; ` +
`cd "C:\\Program Files\\UTMStack\\UTMStack Collectors\\AS400"; ` +
`Invoke-WebRequest -Uri "https://V_IP:9001/private/dependencies/collector/windows-as400-collector.zip" ` +
`-OutFile ".\\windows-as400-collector.zip"; Expand-Archive -Path ".\\windows-as400-collector.zip" ` +
`-DestinationPath "."; Remove-Item ".\\windows-as400-collector.zip"; Start-Process ".\\utmstack_collectors_installer.exe" ` +
`& curl.exe -k -o ".\\windows-as400-collector.zip" ` +
`"https://V_IP:9001/private/dependencies/collector/windows-as400-collector.zip"; ` +
`Expand-Archive -Path ".\\windows-as400-collector.zip" -DestinationPath "."; ` +
`Remove-Item ".\\windows-as400-collector.zip"; Start-Process ".\\utmstack_collectors_installer.exe" ` +
`-ArgumentList 'install', 'as400', 'V_IP', '<secret>V_TOKEN</secret>' -NoNewWindow -Wait`,

uninstall: `cd "C:\\Program Files\\UTMStack\\UTMStack Collectors\\AS400"; ` +
Expand All @@ -29,11 +30,11 @@ export const PLATFORM = [
name: 'LINUX UBUNTU',
install: `sudo bash -c "apt update -y && apt install wget unzip -y && mkdir -p ` +
`/opt/utmstack-linux-collectors/as400 && cd /opt/utmstack-linux-collectors/as400 && ` +
`wget --no-check-certificate --header='connection-key: V_TOKEN' ` +
`wget --no-check-certificate ` +
`https://V_IP:9001/private/dependencies/collector/linux-as400-collector.zip ` +
`&& unzip linux-as400-collector.zip && rm linux-as400-collector.zip && chmod -R 777 ` +
`utmstack_collectors_installer && ./utmstack_collectors_installer install as400 ` +
`V_IP V_TOKEN"`,
`V_IP <secret>V_TOKEN<secret>"`,


uninstall: `sudo bash -c " cd /opt/utmstack-linux-collectors/as400 && ./utmstack_collectors_installer ` +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class GuideLinuxAgentComponent implements OnInit {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;

return `sudo bash -c "apt update -y && apt install wget -y && mkdir -p /opt/utmstack-linux-agent && \
wget --no-check-certificate --header='connection-key: <secret>${this.token}</secret>' -P /opt/utmstack-linux-agent \
wget --no-check-certificate -P /opt/utmstack-linux-agent \
https://${ip}:9001/private/dependencies/agent/${installerName} && \
chmod -R 777 /opt/utmstack-linux-agent/${installerName} && \
/opt/utmstack-linux-agent/${installerName} install ${ip} <secret>${this.token}</secret> yes"`;
Expand All @@ -47,7 +47,7 @@ export class GuideLinuxAgentComponent implements OnInit {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;

return `sudo bash -c "yum install wget -y && mkdir -p /opt/utmstack-linux-agent && \
wget --no-check-certificate --header='connection-key: <secret>${this.token}</secret>' -P /opt/utmstack-linux-agent \
wget --no-check-certificate -P /opt/utmstack-linux-agent \
https://${ip}:9001/private/dependencies/agent/${installerName} && \
chmod -R 777 /opt/utmstack-linux-agent/${installerName} && \
/opt/utmstack-linux-agent/${installerName} install ${ip} <secret>${this.token}</secret> yes"`;
Expand All @@ -57,7 +57,7 @@ export class GuideLinuxAgentComponent implements OnInit {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;

return `sudo bash -c "dnf install wget -y && mkdir -p /opt/utmstack-linux-agent && \
wget --no-check-certificate --header='connection-key: <secret>${this.token}</secret>' -P /opt/utmstack-linux-agent \
wget --no-check-certificate -P /opt/utmstack-linux-agent \
https://${ip}:9001/private/dependencies/agent/${installerName} && \
chmod -R 777 /opt/utmstack-linux-agent/${installerName} && \
/opt/utmstack-linux-agent/${installerName} install ${ip} <secret>${this.token}</secret> yes"`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ export class GuideWinlogbeatComponent implements OnInit {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;

return `New-Item -ItemType Directory -Force -Path "C:\\Program Files\\UTMStack\\UTMStack Agent"; ` +
`& curl.exe -k -H "connection-key: <secret>${this.token}</secret>" ` +
`-o "C:\\Program Files\\UTMStack\\UTMStack Agent\\${arch}" ` +
`& curl.exe -k -o "C:\\Program Files\\UTMStack\\UTMStack Agent\\${arch}" ` +
`"https://${ip}:9001/private/dependencies/agent/${arch}"; ` +
`Start-Process "C:\\Program Files\\UTMStack\\UTMStack Agent\\${arch}" ` +
`-ArgumentList 'install', '${ip}', '<secret>${this.token}</secret>', 'yes' -NoNewWindow -Wait`;
Expand Down
4 changes: 2 additions & 2 deletions installer/templates/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ server {

ssl_certificate /utmstack/cert/utm.crt;
ssl_certificate_key /utmstack/cert/utm.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_protocols TLSv1.3;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
Expand Down Expand Up @@ -86,7 +86,7 @@ server {

ssl_certificate /utmstack/cert/utm.crt;
ssl_certificate_key /utmstack/cert/utm.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_protocols TLSv1.3;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
Expand Down
2 changes: 1 addition & 1 deletion version.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: 10.8.3
version: 10.8.4
Loading