Introduction
- The Credential Store (CS) allows sensitive data to be encrypted and stored securely and independently of the application(s) such as YADE and the JobScheduler YADE JITL Jobs that use this data. Access to the CS is only possible with access methods such as a key file and/or password.
- The CS requires the use of a
.kdbx
database and the installation of a kdbx-compatible user interface such as "KeePass 2" or "KeePass-X". - The advantage of using a CS is that the CS stores sensitive information such as credentials in a standardized, secure and fully encrypted database and sensitive authentication information is not exposed in use. Applications access the CS database by using password, encryption-key file or a combination of both.
- The CS can be used to securely store information of parameters, database connection URLs, private key files and other sensitive data.
Scope
This article describes the use of the Credential Store with the YADE Client.
A description of the use of the Credential Store with the YADE JITL job can be found in the Jobs JADEJob & JADE4DMZJob article.
Configuration Procedure
The examples presented in this article are based on the simple file transfer example described in the The YADE Client Command Line Interface - Tutorial 1 - Getting Started article. This tutorial describes the configuration required to download a number of files from a online server provided by the SOS GmbH and save these file on the user's local file system. Using this server means that users can get a working example up and running with a minimum of effort. A simplified version of the configuration used in the tutorial (only specifying FTP) is available as a download: sos-berlin_demo_2_local.xml. Instructions for installing and configuring the YADE Client can be found in the YADE - Tutorials article.
The configuration provided in the download file will cause six files in the root server folder to be copied to a local /jade_demo/transfer_receive
folder, generating the target folder in the user's home or profile directory if required and permissions are available. The files will be transferred by FTP and authentication for the server (user name and password) is specified in the download file.
KeePass 2 is used in the current article to implement the credential store database.
Installing and configuring the Credential Store
The installation of KeePass is described on the Keepass Web Site.
For the examples described in the current article the following database was configured (on a Windows system):
- Path:
%USERPROFILE%\jade_demo\keepass\demo_cred_store.kdbx
- Master Password:
sos
In addition a Master Key file (not used in the example below) can be generated using the KeePass menu Files/Change Master Key option and then selecting the Show expert options checkbox (shown greyed out in the following screenshot).
Adding Data to the Credential Store
A group named ftp is used for the current example along with the entry "demo on test.sos-berlin.com".
The following information can be retrieved from CS standard fields:
- Title: Target server name or IP address
- User name: The user identification of a user who is authenticated for the operation.
- Password: Assigned password for a user account or passphrase for a private key.
- File Attachment: Files such as PGP or SSH private key files can be stored as attachments. YADE will retrieve the contents of the attached file at run-time - no intermediate or temporary files are created when reading attachments.
Configuration of an individual entry in the CS:
The following information was specified for the example in the database:
- Database:
demo_database
- Group:
ftp
- Title:
demo_on_test.sos-berlin.com
- User name:
demo
- Password:
demo
- URL:
test.sos-berlin.com
(Alternatively, the IP address could have been specified here.)
Integrating the Credential Store in a File Transfer Configuration
The use of the Credential Store is specified in YADE Client file transfer configuration files, which are written in XML. We recommend using the SOS XML Editor to edit these files. Instructions for downloading, installing and using the XML Editor are linked from this page.
In the remainder of the current article, it is assumed that readers have made themselves familiar with the organization of the YADE Client file transfer configurations into Profiles and Fragments. This is described in the Getting Started YADE tutorial linked above.
The following configuration elements are required to specify the use of a Credential Store:
- A Credential Store Fragments element at the same level in the XML hierarchy as the Protocol Fragments elements.
- A Credential Store Fragment element that is referenced from the Protocol Fragment. This Fragment specifies the location and authentication for the Credential Store.
- Password, key file and combined password/key file authentication methods are possible.
- The values of the connection and authentication elements are modified to refer to elements stored within the Credential Store.
The XML Configuration
Parameters stored in the example credential store database are addressed as follows:
- CSEntryPath:
cs://demo_database/ftp/
(value corresponds with the name of the CS database and the Group, as specified above). - Hostname:
test.sos-berlin.com@url
(where@url
specifies the URL element stored in the database) - Account:
test.sos-berlin.com@user
(where@user
specifies the URL element stored in the database) - Password:
test.sos-berlin.com@password
(where@password
specifies the URL element stored in the database)
The parts of the XML configuration relevant to the use of the Credential Store are shown in the following screenshot of the XML Editor:
Running the YADE Client with the Credential Store
The use of the Credential Store is contained within the settings file and is not exposed when calling the YADE Client. For example, on Windows systems, the YADE Client could be called for the current example using:
C:\Program Files\sos-berlin.com\jade\client\bin>jade.cmd -settings="%USERPROFILE%\jade_demo\sos-berlin_demo_2_local.xml" -profile="ftp_server_2_local_cs"
The output produced when successful:
As with all YADE jobs, the number of successful file transfers can be seen in the log file.
See Also: