diff --git a/.env.example b/.env.example index 83a5bc2f3..853690534 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ PORT: 8080 +HOST: localhost ENABLE_TLS: false CERT_FILE: "/certs/server.crt" CERT_KEY_FILE: "/certs/server.key" diff --git a/cmd/soarca/main.go b/cmd/soarca/main.go index fbb248131..52fced920 100644 --- a/cmd/soarca/main.go +++ b/cmd/soarca/main.go @@ -42,12 +42,13 @@ func main() { fmt.Print(banner) log.Info("Version: ", Version) log.Info("Buildtime: ", Buildtime) + log.Info("Host: ", Host) err := godotenv.Load(".env") if err != nil { log.Warning("Failed to read env variable, but will continue") } - Host = "localhost:" + utils.GetEnv("PORT", "8080") + Host = utils.GetEnv("HOST", "localhost") + ":" + utils.GetEnv("PORT", "8080") api.SwaggerInfo.Host = Host // Version is only available here diff --git a/deployments/docker/soarca/docker-compose.yml b/deployments/docker/soarca/docker-compose.yml index e2332cdc6..d2ece1bf3 100644 --- a/deployments/docker/soarca/docker-compose.yml +++ b/deployments/docker/soarca/docker-compose.yml @@ -60,6 +60,7 @@ services: image: docker.io/cossas/soarca:latest container_name: soarca_server environment: + HOST: localhost PORT: 8080 SOARCA_ALLOWED_ORIGINS: "*" GIN_MODE: "release" diff --git a/docs/content/en/docs/getting-started/_index.md b/docs/content/en/docs/getting-started/_index.md index 365894631..400cdcf1a 100644 --- a/docs/content/en/docs/getting-started/_index.md +++ b/docs/content/en/docs/getting-started/_index.md @@ -78,6 +78,7 @@ SOARCA reads its configuration from the environment variables or a `.env` file. {{< tabpane langEqualsHeader=false >}} {{< tab header="`.env`" lang="txt" >}} +HOST: localhost PORT: 8080 SOARCA_ALLOWED_ORIGINS: "*" GIN_MODE: "release" diff --git a/docs/content/en/docs/installation-configuration/_index.md b/docs/content/en/docs/installation-configuration/_index.md index 2ccfe091e..fe12fa0cf 100644 --- a/docs/content/en/docs/installation-configuration/_index.md +++ b/docs/content/en/docs/installation-configuration/_index.md @@ -14,6 +14,7 @@ After completing the [Getting Started](/docs/getting-started/_index.md) setup fo | Variable | Content | Description | |----------------------------|-----------------------------------|-----------------------------------------------------------------------------| +| HOST | `localhost` | Set the host of SOARCA so the swagger GUI is correctly pointed to the SOARCA API. Default is `localhost`. | | PORT | `8080` | Set the exposed port of SOARCA. Default is `8080`. | | ENABLE_TLS | `false` | Enable TLS for secure communication. Default is `false`. | | CERT_FILE | `"/certs/server.crt"` | Path to the TLS certificate file. Default is `"/certs/server.crt"`. | @@ -44,11 +45,13 @@ After completing the [Getting Started](/docs/getting-started/_index.md) setup fo #### The Hive -| Variable | Content | Description | -|----------------------|-----------------------------------|---------------------------------------------------------| -| THEHIVE_ACTIVATE | `false` | Enable integration with The Hive. Default is `false`. | -| THEHIVE_API_TOKEN | `your_token` | Set the API token for The Hive integration. | -| THEHIVE_API_BASE_URL | `http://your.thehive.instance/api/v1/` | Set the base URL for The Hive API. Default is `""`. | +| Variable | Content | Description | +|----------------------------|----------------------------------|---------------------------------------------------------| +| THEHIVE_ACTIVATE | `false` | Enable integration with The Hive. Default is `false`. | +| THEHIVE_REPORTER | `false` | Enable case reporting integration with The Hive. Default is `false`. | +| THEHIVE_ALLOW_INSECURE | `true` | Allow insecure connection to the hive. Default is `true`. | +| THEHIVE_API_TOKEN | `your_token` | Set the API token for The Hive integration. | +| THEHIVE_API_BASE_URL | `http://your.thehive.instance/api/v1/` | Set the base URL for The Hive API. Default is `""`. | -----