From dce0a9b51f61b9c948b2aaf9e3c4b3edbcb4f981 Mon Sep 17 00:00:00 2001 From: "Bernhard E. Reiter" Date: Mon, 25 Jul 2022 16:28:54 +0200 Subject: [PATCH] Disable experimental web interface for provider (#257) * Disable experimental web interface for provider * More compact init * Fixed typo Co-authored-by: Sascha L. Teichmann --- cmd/csaf_provider/config.go | 11 ++++++++--- docs/csaf_provider.md | 11 +++++++++-- docs/examples/provider_config.toml | 4 ++-- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/cmd/csaf_provider/config.go b/cmd/csaf_provider/config.go index 91dd6590..525298e4 100644 --- a/cmd/csaf_provider/config.go +++ b/cmd/csaf_provider/config.go @@ -27,8 +27,9 @@ const ( defaultConfigPath = configPrefix + "/config.toml" // Default path to the config file. defaultOpenPGPPrivateKey = configPrefix + "/openpgp_private.asc" defaultOpenPGPPublicKey = configPrefix + "/openpgp_public.asc" - defaultFolder = "/var/www/" // Default folder path. - defaultWeb = "/var/www/html" // Default web path. + defaultFolder = "/var/www/" // Default folder path. + defaultWeb = "/var/www/html" // Default web path. + defaultNoWebUI = true defaultUploadLimit = 50 * 1024 * 1024 // Default limit size of the uploaded file. ) @@ -222,7 +223,11 @@ func loadConfig() (*config, error) { if path == "" { path = defaultConfigPath } - var cfg config + + // Preset defaults + cfg := config{ + NoWebUI: defaultNoWebUI, + } md, err := toml.DecodeFile(path, &cfg) if err != nil { diff --git a/docs/csaf_provider.md b/docs/csaf_provider.md index 3e430231..97b5b8c7 100644 --- a/docs/csaf_provider.md +++ b/docs/csaf_provider.md @@ -50,8 +50,8 @@ The following example file documents all available configuration options: # against the JSON schema. #no_validation = false -# Disable the web interface. -#no_web_ui = false +# Disable the experimental web interface. +#no_web_ui = true # Make the provider take the publisher from the CSAF document. #dynamic_provider_metadata = false @@ -116,3 +116,10 @@ contact_details = "Example Company can be reached at contact_us@example.com, or ``` + +### Experimental web upload interface + +There is an experimental upload interface which works with a web browser. +It is disabled by default, as there are known issues, notably: + * https://github.com/csaf-poc/csaf_distribution/issues/43 + * https://github.com/csaf-poc/csaf_distribution/issues/256 diff --git a/docs/examples/provider_config.toml b/docs/examples/provider_config.toml index 09046f3f..1cd21809 100644 --- a/docs/examples/provider_config.toml +++ b/docs/examples/provider_config.toml @@ -37,8 +37,8 @@ # against the JSON schema. #no_validation = false -# Disable the web interface. -#no_web_ui = false +# Disable the experimental web interface. +#no_web_ui = true # Make the provider take the publisher from the CSAF document. #dynamic_provider_metadata = false