Difference between revisions of "OS4X Enterprise - other protocols"

From OS4X
Jump to navigation Jump to search
(New page: ''coming soon'')
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
''coming soon''
+
OS4X Enterprise supports a freely definable amount of other protocols. As a basis for such a connectivity, a protocol script must be implemented which must support a single file as parameter (a XML file which contains details about what to do and with which configuration).
 +
 
 +
Configuration of all protocol dependant parameters can be done on per-partner panel. Every protocol can obtain as many parameters as wanted.
 +
 
 +
The following pre-defined and well-supported protocols are supported by OS4X Enterprise (Lite):
 +
*anonymous WebDAV
 +
*FTP
 +
*FTPS
 +
*key-authentificated SCP
 +
*key-authentificated SFTP
 +
 
 +
== Activating support for other protocols ==
 +
*Enable the checkbox "Configuration" -> "OS4X Enterprise" -> "[[OS4X_Core_configuration#enable_multi-protocol_support.3F|Enable multi-protocol support?]]" and save this configuration
 +
*Edit your partner according to the protocol definition by explicitely activating the checkbox "Use this protocol?" for exactly one (other) protocol:
 +
[[Image:Os4x enterprise configure ftp.png]]
 +
*Be sure to configure a plugin group for a recipient which includes the plugin "enqueue to OS4X" since this plugin executes the process of sending via another protocol instead of OFTP
 +
 
 +
== Detailled internals ==
 +
In OS4X Enterprise, an unlimited amount of other protocols can be defined (when enabled) via the menu link "Other protocols". Each protocol has a name, commands for execution and variables. The only command used at the moment is the "put command" for sending files.
 +
 
 +
=== Commands ===
 +
The configured commands are:
 +
*''list command: list content of a directory (unused at the moment)''
 +
*put command: send files
 +
*''get command: download files (unused at the moment)''
 +
*''delete command: delete remote file (unused at the moment)''
 +
 
 +
An example is as follows:
 +
 
 +
[[Image:Ftp protocol definition.png]]
 +
 
 +
=== Variables ===
 +
In order to configure each partner with separate values, variables are neccessary to be defined. These are linked by a hyperlink in the most-right column of the protocol definition list. Each variable of a protocol will be filled with partner-specific values via the web interface dynamically.
 +
 
 +
[[Image:Protocol variable definition.png]]
 +
 
 +
=== Execution ===
 +
In order to send files to a configured partner, the plugin "enqueue to OS4X" must be executed in the send plugin group. Refer to the documentation "[[OS4X Server-side plugin philosophy|OS4X_Server-side_plugin_philosophy]]" for more details.
 +
 
 +
This plugin analyzes the configured protocol and starts, if configured, the configured put command in an asynchronous process. Keep in mind that the plugin "enqueue to OS4X" is an asynchronous plugin which stops plugin execution of the send job after returning. So, 2 seconds after a successful return of the plugin "enqueue to OS4X", the put command will be executed. Variable definitions are filled with values and given as parameter to the put command. The parameters of the command are:
 +
#temporary file containing all configured protocol variables with their values, also a node containing all files
 +
#filename for output
 +
 
 +
 
 +
The protocol script has to implement the mechanism of parsing the XML file. In default protocol implementations, all files are being transfered with their virtual filename as remote filename.
 +
 
 +
 
 +
After execution, the protocol command handler analyzes the returncode of the protocol command, passing it to the asynchronous plugin handler of the job (0=successful, any other value=error) and appends the protocol output as plugin log to the OS4X send job.
 +
 
 +
If any further plugin is configured in the plugin group, it will be executed by the asynchronous plugin handler.
 +
 
 +
=== Protocols and software updates ===
 +
The standard protocols are always updated to the new distribution. If you need to re-configure a protocol, please clone the configuration to a new protocol definition including new variable definitions. In this case, no software update will harm your special implementation. Place the directory of your new protocol definition somewhere above the directory of the factory-delivered directories (which is "<code>/opt/os4x/scripts/protocols</code>" by default). As an example, use "<code>/opt/os4x/scripts/yourProtocolDefinition</code>".
 +
 
 +
 
 +
[[Category:OS4X Enterprise]]

Latest revision as of 13:26, 8 August 2017

OS4X Enterprise supports a freely definable amount of other protocols. As a basis for such a connectivity, a protocol script must be implemented which must support a single file as parameter (a XML file which contains details about what to do and with which configuration).

Configuration of all protocol dependant parameters can be done on per-partner panel. Every protocol can obtain as many parameters as wanted.

The following pre-defined and well-supported protocols are supported by OS4X Enterprise (Lite):

  • anonymous WebDAV
  • FTP
  • FTPS
  • key-authentificated SCP
  • key-authentificated SFTP

Activating support for other protocols

  • Enable the checkbox "Configuration" -> "OS4X Enterprise" -> "Enable multi-protocol support?" and save this configuration
  • Edit your partner according to the protocol definition by explicitely activating the checkbox "Use this protocol?" for exactly one (other) protocol:

Os4x enterprise configure ftp.png

  • Be sure to configure a plugin group for a recipient which includes the plugin "enqueue to OS4X" since this plugin executes the process of sending via another protocol instead of OFTP

Detailled internals

In OS4X Enterprise, an unlimited amount of other protocols can be defined (when enabled) via the menu link "Other protocols". Each protocol has a name, commands for execution and variables. The only command used at the moment is the "put command" for sending files.

Commands

The configured commands are:

  • list command: list content of a directory (unused at the moment)
  • put command: send files
  • get command: download files (unused at the moment)
  • delete command: delete remote file (unused at the moment)

An example is as follows:

Ftp protocol definition.png

Variables

In order to configure each partner with separate values, variables are neccessary to be defined. These are linked by a hyperlink in the most-right column of the protocol definition list. Each variable of a protocol will be filled with partner-specific values via the web interface dynamically.

Protocol variable definition.png

Execution

In order to send files to a configured partner, the plugin "enqueue to OS4X" must be executed in the send plugin group. Refer to the documentation "OS4X_Server-side_plugin_philosophy" for more details.

This plugin analyzes the configured protocol and starts, if configured, the configured put command in an asynchronous process. Keep in mind that the plugin "enqueue to OS4X" is an asynchronous plugin which stops plugin execution of the send job after returning. So, 2 seconds after a successful return of the plugin "enqueue to OS4X", the put command will be executed. Variable definitions are filled with values and given as parameter to the put command. The parameters of the command are:

  1. temporary file containing all configured protocol variables with their values, also a node containing all files
  2. filename for output


The protocol script has to implement the mechanism of parsing the XML file. In default protocol implementations, all files are being transfered with their virtual filename as remote filename.


After execution, the protocol command handler analyzes the returncode of the protocol command, passing it to the asynchronous plugin handler of the job (0=successful, any other value=error) and appends the protocol output as plugin log to the OS4X send job.

If any further plugin is configured in the plugin group, it will be executed by the asynchronous plugin handler.

Protocols and software updates

The standard protocols are always updated to the new distribution. If you need to re-configure a protocol, please clone the configuration to a new protocol definition including new variable definitions. In this case, no software update will harm your special implementation. Place the directory of your new protocol definition somewhere above the directory of the factory-delivered directories (which is "/opt/os4x/scripts/protocols" by default). As an example, use "/opt/os4x/scripts/yourProtocolDefinition".