This is an automated email from the ASF dual-hosted git repository.

jsinovassin pushed a commit to branch UNOMI-973-review-followups
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 5e6d7c906941312ae493effcb2c5e83d5f7c6bd9
Author: jsinovassin <[email protected]>
AuthorDate: Tue Sep 1 18:35:55 2026 +0200

    UNOMI-973: Give the two new settings a system property and a manual entry
    
    org.apache.unomi.router.cfg reads config.import.baseDir and
    config.export.baseDir from system properties, but neither was declared in
    custom.system.properties, so unlike every other router setting they had no
    env-var override. A deployment that has to relocate its import directory --
    which this change forces on anyone whose configurations resolve elsewhere --
    could only do it by editing etc/org.apache.unomi.router.cfg inside the 
image.
    
    The manual's list of router properties now names them too, with what they
    refuse and why the two directions are kept apart.
---
 manual/src/main/asciidoc/profile-import-export.adoc     | 17 ++++++++++++++++-
 package/src/main/resources/etc/custom.system.properties |  7 +++++++
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/manual/src/main/asciidoc/profile-import-export.adoc 
b/manual/src/main/asciidoc/profile-import-export.adoc
index 839ce37a1..c35ed6b65 100644
--- a/manual/src/main/asciidoc/profile-import-export.adoc
+++ b/manual/src/main/asciidoc/profile-import-export.adoc
@@ -230,10 +230,25 @@ To change this you have to change the default values of 
these properties.
     #errors report size
     org.apache.unomi.router.executions.error.report.size=200
 
-Final one is about the allowed endpoints you can use when building the source 
or destionation path, as mentioned above
+Next one is about the allowed endpoints you can use when building the source 
or destionation path, as mentioned above
 we can have a path of type `file`, `ftp`, `ftps`, `sftp`. You can make it less 
if you want to omit some endpoints (eg.
 you don't want to permit the use of non secure FTP).
 
     #Allowed source endpoints
     org.apache.unomi.router.config.allowedEndpoints=file,ftp,sftp,ftps
 
+Final ones say where a `file` endpoint may resolve. A recurrent import source 
or export destination using the `file`
+scheme is refused unless it resolves inside one of these base directories, at 
any depth, and so is any of its options
+that names a path (`fileName`, `move`, `moveFailed`, ...). The same applies to 
`localWorkDirectory`, whatever the
+scheme, since that one names a local directory even on a remote endpoint. Each 
property accepts a comma-separated
+list.
+
+    #Base directories a file endpoint may resolve into
+    org.apache.unomi.router.config.import.baseDir=${karaf.data}/router/import/
+    org.apache.unomi.router.config.export.baseDir=${karaf.data}/router/export/
+
+Import and export are kept apart on purpose: with a single shared directory, 
an export writing a `.csv` could be picked
+up by an import route polling the same place. Point both properties at the 
same directory only if that is what you
+mean. A configuration that resolves outside them builds no route and is marked 
`INVALID_ENDPOINT`; restoring the
+directories clears that mark on its own at the next rebuild.
+
diff --git a/package/src/main/resources/etc/custom.system.properties 
b/package/src/main/resources/etc/custom.system.properties
index 3d2e57927..7a5d31e11 100644
--- a/package/src/main/resources/etc/custom.system.properties
+++ b/package/src/main/resources/etc/custom.system.properties
@@ -396,6 +396,13 @@ 
org.apache.unomi.router.executions.error.report.size=${env:UNOMI_ROUTER_EXECUTIO
 #Allowed source endpoints
 
org.apache.unomi.router.config.allowedEndpoints=${env:UNOMI_ROUTER_CONFIG_ALLOWEDENDPOINTS:-file,ftp,sftp,ftps}
 
+#Base directories a file endpoint may resolve into, comma-separated. A 
recurrent import source or
+#export destination using the file scheme is refused unless it resolves inside 
one of them, at any
+#depth. Import and export are kept apart so that an export cannot write into a 
directory an import
+#route is polling; point them at the same directory only if that is what you 
mean.
+org.apache.unomi.router.config.import.baseDir=${env:UNOMI_ROUTER_CONFIG_IMPORT_BASEDIR:-${karaf.data}/router/import/}
+org.apache.unomi.router.config.export.baseDir=${env:UNOMI_ROUTER_CONFIG_EXPORT_BASEDIR:-${karaf.data}/router/export/}
+
 
#######################################################################################################################
 ## Salesforce connector settings                                               
                                      ##
 
#######################################################################################################################

Reply via email to