29.11.2012 Views

JADE Documentation (PDF) - SOS-Berlin

JADE Documentation (PDF) - SOS-Berlin

JADE Documentation (PDF) - SOS-Berlin

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>SOS</strong>FTP <strong>Documentation</strong> 30<br />

4.7 Dynamic Password Retrieval<br />

Instead of a hard-wired password in your configuration you can define a script. This script has to return the<br />

password by printing it to stdout. The password script should not write any output to stdout except for the password.<br />

Sample Dynamic Password Script getpassword.cmd:<br />

@echo sos<br />

You include this script by just setting it as password. Embedded into backticks “`” the password is interpreted as<br />

a script which is evaluated:<br />

password = `getpassword.cmd`<br />

If the exit code of that script is 0 then its output to stdout is interpreted as a password. If the exit code of that<br />

script is not 0 then the original parameter value is used as a password. For security concerns the script output<br />

will not get logged - neither for stdout nor for stderr. Should you run into trouble then you could increase the log<br />

level to level 3 in order to see what script is executed and to level 8 in order to check if the exit code is 0.<br />

Sending Files by FTP authenticated with a Dynamic Password<br />

The profile of the configuration file ftp_settings.ini:<br />

…<br />

[ftp_send_dyn]<br />

protocol = ftp<br />

host = 8of9<br />

user = sos<br />

; password = sos ; hard wired password<br />

password = `.\getpassword.cmd` ; dynamic password<br />

file_spec = .*<br />

local_dir = outbound/<br />

remote_dir = /inbound/<br />

…<br />

Example Command:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=ftp_send_dyn -operation=send<br />

Dynamic Password Scripts can be used alternatively to the parameter “password” for the protocols FTP, SFTP<br />

and FTPS. The parameter “jump_password” for the Jump Host does NOT support Dynamic Password Scripts.<br />

The path of the Dynamic Password Script is always relative to your local host.<br />

Software- und Organisations-Service GmbH

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!