Skip to content

Commit 91003e7

Browse files
committed
Merge remote-tracking branch 'origin/v11' into release/v11.1.1
# Conflicts: # frontend/src/app/shared/services/version/app-version.service.ts
2 parents 8315c46 + cf3813e commit 91003e7

File tree

6 files changed

+69
-23
lines changed

6 files changed

+69
-23
lines changed

CHANGELOG.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
# UTMStack 11.0.3
1+
# UTMStack 11.1.0
22

3-
This is the release notes for **UTMStack v11.0.3**, a minor update focused on bug fixes and performance improvements.
3+
These are the release notes for **UTMStack v11.1.0**, highlighting new features, bug fixes, and performance improvements.
44

5-
## Fixed Issues
5+
## Features
66

7-
- Fixed a bug in the SOC-AI integration that caused occasional failures when generating insights.
8-
- Fixed a bug when trying to enroll and authenticate by TFA.
9-
10-
## Enhancements
11-
12-
- SIEM configuration now adapts to the Sovereign Cloud Model implemented by the provider in each region for Azure and Microsoft 365 integrations.
7+
- Introduced SQL query support in LogExplorer, enabling users to execute SQL queries on OpenSearch indices directly from the user interface.
8+
- Added an interactive Adversary View to the Threat Management module, providing a graphical, filterable visualization of relationships between Adversaries, their generated Alerts, and associated Echoes.

frontend/src/app/app-module/guides/guide-as400/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const PLATFORM = [
77
`cd "C:\\Program Files\\UTMStack\\UTMStack Collectors\\AS400"; ` +
88
`& curl.exe -k -o ".\\windows-as400-collector.zip" ` +
99
`"https://V_IP:9001/private/dependencies/collector/windows-as400-collector.zip"; ` +
10-
`Expand-Archive -Path ".\\windows-as400-collector.zip" -DestinationPath "."; ` +
10+
`Expand-Archive -Path ".\\windows-as400-collector.zip" -DestinationPath "."; ` +
1111
`Remove-Item ".\\windows-as400-collector.zip"; Start-Process ".\\utmstack_collectors_installer.exe" ` +
1212
`-ArgumentList 'install', 'as400', 'V_IP', '<secret>V_TOKEN</secret>' -NoNewWindow -Wait`,
1313

@@ -34,7 +34,7 @@ export const PLATFORM = [
3434
`https://V_IP:9001/private/dependencies/collector/linux-as400-collector.zip ` +
3535
`&& unzip linux-as400-collector.zip && rm linux-as400-collector.zip && chmod -R 755 ` +
3636
`utmstack_collectors_installer && ./utmstack_collectors_installer install as400 ` +
37-
`V_IP <secret>V_TOKEN<secret>"`,
37+
`V_IP <secret>V_TOKEN</secret>"`,
3838

3939

4040
uninstall: `sudo bash -c " cd /opt/utmstack-linux-collectors/as400 && ./utmstack_collectors_installer ` +

installer/config/const.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const (
1313
GetLicenseEndpoint = "/api/v1/licenses"
1414
HealthEndpoint = "/api/v1/health"
1515
LogCollectorEndpoint = "/api/v1/logcollectors/upload"
16+
GetLatestVersionEndpoint = "/api/v1/versions/latest"
1617

1718
ImagesPath = "/utmstack/images"
1819

installer/install.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@ import (
1313
"github.com/utmstack/UTMStack/installer/utils"
1414
)
1515

16-
func Install() error {
16+
func Install(specificVersion string) error {
1717
fmt.Println("### Installing UTMStack ###")
18+
19+
if specificVersion != "" {
20+
updater.SpecificVersion = specificVersion
21+
fmt.Printf("Installing specific version: %s\n", specificVersion)
22+
}
23+
1824
go updater.MonitorConnection(config.GetCMServer(), 30*time.Second, 3, &config.ConnectedToInternet)
1925

2026
isInstalledAlready, err := utils.CheckIfServiceIsInstalled("UTMStackComponentsUpdater")

installer/main.go

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ func main() {
1515
help()
1616

1717
case "--install", "-i":
18-
err := Install()
18+
var specificVersion string
19+
if len(os.Args) > 3 && (os.Args[2] == "--version" || os.Args[2] == "-V") {
20+
specificVersion = os.Args[3]
21+
}
22+
err := Install(specificVersion)
1923
if err != nil {
2024
fmt.Printf("\nerror installing UTMStack: %v", err)
2125
os.Exit(1)
@@ -48,7 +52,7 @@ func main() {
4852
help()
4953
}
5054
} else {
51-
err := Install()
55+
err := Install("")
5256
if err != nil {
5357
fmt.Printf("\nerror installing UTMStack: %v", err)
5458
os.Exit(1)
@@ -60,8 +64,12 @@ func help() {
6064
fmt.Println("### UTMStack ###")
6165
fmt.Println("Usage: installer <argument>")
6266
fmt.Println("Arguments:")
63-
fmt.Println(" --help, -h Show this help")
64-
fmt.Println(" --install, -i <ID> Install UTMStack (Requires organization ID)")
65-
fmt.Println(" --uninstall, -u Uninstall UTMStack")
66-
fmt.Println(" --version, -v Show UTMStack version")
67+
fmt.Println(" --help, -h Show this help")
68+
fmt.Println(" --install, -i [--version|-V <ver>] Install UTMStack (optionally specify version)")
69+
fmt.Println(" --uninstall, -u Uninstall UTMStack")
70+
fmt.Println(" --version, -v Show UTMStack version")
71+
fmt.Println("")
72+
fmt.Println("Examples:")
73+
fmt.Println(" installer --install Install latest version")
74+
fmt.Println(" installer --install --version v11.0.3 Install specific version v11.0.3")
6775
}

installer/updater/versions.go

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package updater
33
import (
44
"bytes"
55
"fmt"
6+
"net/http"
67
"os"
78
"os/exec"
89
"regexp"
@@ -15,19 +16,31 @@ import (
1516
)
1617

1718
var (
18-
version = VersionFile{}
19-
versionOnce sync.Once
19+
version = VersionFile{}
20+
versionOnce sync.Once
21+
SpecificVersion string // Version specified via command line flag
2022
)
2123

2224
func GetVersion() (VersionFile, error) {
2325
var err error
2426
versionOnce.Do(func() {
2527
if !utils.CheckIfPathExist(config.VersionFilePath) {
26-
if config.ConnectedToInternet {
27-
version.Version = config.INSTALLER_VERSION
28+
// Check if a specific version was requested via command line
29+
if SpecificVersion != "" {
30+
version.Version = SpecificVersion
2831
version.Changelog = ""
2932
version.Edition = "community"
30-
33+
} else if config.ConnectedToInternet {
34+
latestVersion, errFetch := fetchLatestVersionFromCM()
35+
if errFetch != nil {
36+
config.Logger().Info("Could not fetch latest version from CM, using installer version: %v", errFetch)
37+
version.Version = config.INSTALLER_VERSION
38+
version.Changelog = ""
39+
} else {
40+
version.Version = latestVersion.Version
41+
version.Changelog = latestVersion.Changelog
42+
}
43+
version.Edition = "community"
3144
} else {
3245
versionFromTar, errB := ExtractVersionFromFolder(config.ImagesPath)
3346
if errB == nil {
@@ -206,3 +219,25 @@ func SortVersions(versions []map[string]string) []map[string]string {
206219

207220
return versions
208221
}
222+
223+
func fetchLatestVersionFromCM() (*VersionDTO, error) {
224+
url := fmt.Sprintf("%s%s", config.GetCMServer(), config.GetLatestVersionEndpoint)
225+
226+
resp, status, err := utils.DoReq[VersionDTO](
227+
url,
228+
nil,
229+
http.MethodGet,
230+
nil,
231+
nil,
232+
)
233+
234+
if err != nil {
235+
return nil, fmt.Errorf("error fetching latest version: %v", err)
236+
}
237+
238+
if status != http.StatusOK {
239+
return nil, fmt.Errorf("unexpected status code: %d", status)
240+
}
241+
242+
return &resp, nil
243+
}

0 commit comments

Comments
 (0)