From 33464a254396c26aca20d155fe03dd395ba62cd8 Mon Sep 17 00:00:00 2001 From: Guilherme Arthur Geronimo <guilherme.geronimo@ufsc.br> Date: Sun, 6 Oct 2024 22:36:37 -0300 Subject: [PATCH 1/4] Force Client Cert in /api --- docker/web/apache-ssl.conf | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docker/web/apache-ssl.conf b/docker/web/apache-ssl.conf index c90f427..cda5abf 100644 --- a/docker/web/apache-ssl.conf +++ b/docker/web/apache-ssl.conf @@ -1,6 +1,5 @@ # <VirtualHost _default_:443> - ServerAdmin webmaster@localhost DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined @@ -16,12 +15,10 @@ SSLCACertificateFile /etc/apache2/ssl/ca.crt SSLVerifyClient optional SSLVerifyDepth 5 - #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt - #SSLCACertificatePath /etc/ssl/certs/ - #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt - #SSLCARevocationPath /etc/apache2/ssl.crl/ - #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl - #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire + + <Location /api> + SSLVerifyClient require + </Location> <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars -- GitLab From 5f82f16cefc41cd7163f2fda0d378ff382efa7ca Mon Sep 17 00:00:00 2001 From: Guilherme Arthur Geronimo <guilherme.geronimo@ufsc.br> Date: Sun, 6 Oct 2024 22:54:18 -0300 Subject: [PATCH 2/4] Opt Client Cert in /api --- docker/web/apache-ssl.conf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docker/web/apache-ssl.conf b/docker/web/apache-ssl.conf index cda5abf..3dc80e2 100644 --- a/docker/web/apache-ssl.conf +++ b/docker/web/apache-ssl.conf @@ -16,10 +16,6 @@ SSLVerifyClient optional SSLVerifyDepth 5 - <Location /api> - SSLVerifyClient require - </Location> - <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> -- GitLab From 8148fc98b10d66093e6797057cba6d49806e17e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilherme=20Arthur=20Ger=C3=B4nimo?= <guilherme.geronimo@ufsc.br> Date: Tue, 22 Oct 2024 21:34:05 +0000 Subject: [PATCH 3/4] Renaming filename --- bin/smartdata/Backend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/smartdata/Backend.php b/bin/smartdata/Backend.php index e339ed7..7e02d24 100644 --- a/bin/smartdata/Backend.php +++ b/bin/smartdata/Backend.php @@ -2196,7 +2196,7 @@ class Backend_V1_1 extends Backend_Common } $str_json = json_encode($json); $time = intval(1000000 * microtime(true)); - $filename = "{$series->unit}{$series->t0}{$series->t1}{$series->x}{$series->y}{$series->z}{$series->r}{$time}"; + $filename = "{$series->unit}_{$series->t0}_{$series->t1}_{$series->x}_{$series->y}_{$series->z}_{$series->r}_{$time}"; $input = fopen("{$_root}/../workflow/{$this->_domain}/{$_wf}_{$filename}", "w"); fwrite($input, "$str_json\n"); fclose($input); -- GitLab From 18a1172c7e518b9194f8ba605c72b398ff4df0bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilherme=20Arthur=20Ger=C3=B4nimo?= <guilherme.geronimo@ufsc.br> Date: Tue, 22 Oct 2024 21:38:24 +0000 Subject: [PATCH 4/4] Name format --- bin/smartdata/Backend.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/smartdata/Backend.php b/bin/smartdata/Backend.php index 7e02d24..6736bca 100644 --- a/bin/smartdata/Backend.php +++ b/bin/smartdata/Backend.php @@ -2133,7 +2133,7 @@ class Backend_V1_1 extends Backend_Common $time = intval(1000000 * microtime(true)); $this->_initialize_daemon($_wf); $str_json = $msd->toJson(); - $filename = "{$msd->unit_code}{$msd->time}{$msd->x}{$msd->y}{$msd->z}{$time}"; + $filename = "{$msd->unit_code}_{$msd->time}_{$msd->x}_{$msd->y}_{$msd->z}_{$time}"; $input = fopen("{$_root}/../workflow/{$this->_domain}/{$_wf}_{$filename}", "w"); fwrite($input, $str_json."\n"); fclose($input); @@ -2162,7 +2162,7 @@ class Backend_V1_1 extends Backend_Common $js = $smart_data->toJson(); if ($compr > 500) { $time = intval(1000000 * microtime(true)); - $filename = "{$smart_data->unit_code}{$smart_data->time}{$smart_data->x}{$smart_data->y}{$smart_data->z}{$time}"; + $filename = "{$smart_data->unit_code}_{$smart_data->time}_{$smart_data->x}_{$smart_data->y}_{$smart_data->z}_{$time}"; $input = fopen("{$_root}/../workflow/{$this->_domain}/{$_wf}_".$filename, "w"); fwrite($input, "{\"smartdata\":" . $js . "}\n"); fclose($input); -- GitLab