TECHNICAL NOTE

The Fasoo Decrypt Packager decrypts files in a folder on a Windows, Linux, or NAS system.  It runs as a service and is typically deployed on a file server or information system where users or systems need to decrypt Fasoo-encrypted files.  The Packager is a Java program that uses XML configuration parameters to operate.


Install Java Development Kit (JDK)

Install JDK 1.8 on any server where you run the packager before installing the Fasoo Packager software.  Ensure you install a version for the correct platform.

  1. Download Java 8 from azul.com.
  2. Run the executable and follow the default prompts to install it.
  3. Verify you installed the correct JDK by going to a command line, command prompt, or PowerShell and entering
    java –version.  The result should match the version you installed.


Copy Packager Folder

Copy the Packager folder to [Install Drive]:\Fasoo\Fasoo_Packager on a server to decrypt files.  This may be a dedicated packager server that decrypts folders on other servers or a NAS.   The Packager uses a UNC path to the target folder.  The table below shows the Packager folders and contents.


Folder/file

Description

conf\folderlist.ini

Configuration file for packager

external-libJava libraries and packager components
fsdinit

Security certificates and associated configuration files 

(copy from C:\Fasoo\FXM\webapps\fast\WEB-INF\fasoo\fsdinit)

application.propertiesSet packager properties
packager.exePackager executable to run as a service
packager.xml

Packager service configuration file

Packager_dec-x.x.x.jarPackager application; get the latest version from Fasoo


 

 

Folder Properties Configuration

The Packager service uses parameters in [Install Drive]:\Fasoo\Fasoo_Packager\conf\folderlist.ini to decrypt files in target folders.  If there is a network disruption when the Packager decrypts files in the target location, there is the possibility of creating a corrupted file.  The Packager can use a folder designated in the table below as LocalStorage to decrypt files and copy them back to the target location to prevent this from happening.   This is only an issue if there is unexpected network outage or connectivity problems when decrypting files.

  1. Select one or more folder paths to decrypt, such as \\nas.fasoo.com\folder\test.  The packager will decrypt files in the target folder(s) and subfolders.
  2. Select a user ID and password with read and write permissions to the folder and its subfolders.
  3. Use a Java OBF password generator to obfuscate the password.  Fasoo can supply an OBF generator if needed.  An example of the output is OBF:1j2s1jui1m0x1kfx18xr1kch1lx91jr81iy2.
  4. Each target folder uses the syntax of path|userID|userPwd.  Ensure you add \\ as a delimiter between folders in the path, so that \\nas.fasoo.com\folder\test becomes \\\\nas.fasoo.com\\folder\\test.  If you add more than one target, select another drive letter for temporary mapping when running the packager, such as V or W.   See the example below for the Target syntax.


Item

Example

path

\\nas.fasoo.com\folder

userIDfasoo
userPwd

OBF:1j2s1jui1m0x1kfx18xr1kch1lx91jr81iy2

Target1FS:X:\\\\nas.fasoo.com\\folder\\test|fasoo|OBF:1j2s1jui1m0x1kfx18xr1kch1lx91jr81iy2


 

 

Edit conf\folderlist.ini to set the parameters as shown in the table below for the Packager process.


Item

Description or Default Value

StartTime

Time the service starts; set to 00:00 to run immediately

EndTime

Time the service stops; set to 00:00 to run immediately

FasooHome

Path to fsdinit folder; default is \Fasoo_Packager\fsdinit

DomainCode

FED DOMAINCODE or name of license file

PackagerType

Set to ALL

Targetx (Target1, Target2, etc.)

Decryption target(s).  Use FS:[drive letter] to decrypt files in a shared folder using the syntax in step 4 above.

ThreadCount

Set to 1 for a single target.  Add 1 for each additional target.

KeepContentMethod

ORIGINAL: Keep copy of encrypted file in LocalStorage

NONE: Do not keep copies of files in LocalStorage

DeleteTempFile

YES: delete temp files used in processing

NO: keep temp files used in processing

DelayMethod

FILE: pause DelayTime after decrypting each file

FOLDER: pause DelayTime after decrypting each folder

NONE: do not pause after a file or folder when decrypting

DelayTime

Time to delay processing after each decryption action in seconds.  Not used if DelayMethod is set to NONE.

LocalStorage

Local storage location for processing files.  Files are copied locally, decrypted and copied back to the target so no corrupted files are created if there is a network disruption when decrypting.

TmpFolder

Temporary folder for processing

NotUseLocalStorage

TRUE: do not use local storage for processing

FALSE: use local storage for processing

 

Below is an example of folderlist.ini.


#this is an ini file for getting target folder's info

#Service Start Time

StartTime=00:00

#Service End Time

EndTime=00:00

#Fasoo Home

FasooHome=C:\\Fasoo\\Fasoo_Packager\\fsdinit

#Domain Code

DomainCode=0100000000001706

#PackagerType : ALL|SUPPORT :: Not Implemented..

PackagerType=ALL

# Mount Drive path

Target1=FS:V:\\\\localhost\\Fasoo_Folder|fasoo|OBF:1j2s1jui1m0x1kfx18xr1kch1lx91jr81iy2

# Thread Count

ThreadCount=1

#ORIGINAL|ENCRYPTED|NONE

KeepContentMethod=NONE

#DELETE from ORG / ENC folders?(YES|NO)

DeleteTempFile=YES

#DELAYMETHOD:FILE|FOLDER|NONE

DelayMethod=NONE

#DELAYTIME:SEC

DelayTime=1

#Temp local Storage

LocalStorage=C:\\Exception\\LocalStorage

TmpFolder=C:\\Exception

NotUseLocalStorage=TRUE

 

Create Packager Service on Windows

Register the packager service to decrypt files.  When you start the service, it will decrypt all the files in the target folder(s) and subfolders.


Edit [Install Drive]:\Fasoo\Fasoo_Packager\packager.xml to change items in red as shown below.


Item

Description

APP_HOME

The root folder of the Packager

JAVA_HOME

The location of the JDK installation

packager.xml parameters

<service>

       <id>Fasoo.Packager.Dec</id>

       <name>Fasoo.packager.dec</name>

       <description>Fasoo Decrypt Packager Service</description>

               <env name="APP_HOME" value="C:\Fasoo\Fasoo_Packager"/>

               <env name="JAVA_HOME" value="C:\Program Files\Zulu\zulu-8"/>

               <env name="PATH" value="%PATH%;%APP_HOME%\external-lib;"/>

       <executable>%JAVA_HOME%\bin\java</executable>

       <arguments>-jar "%APP_HOME%\Packager_dec-2.0.2.jar"</arguments>

       <logmode>rotate</logmode>

       <!--onfailure action="restart" delay="1 min"/-->

       <stopparentprocessfirst>true</stopparentprocessfirst>

</service>

  1. Open a command prompt or PowerShell as administrator and go to the
     [Install Drive]:\Fasoo\Fasoo_Packager folder.
  2. Enter packager.exe install to register the Packager service.
  3. Open the Services application and verify the service you created in step 3 appears.
  4. If you change parameters in packager.xml, run packager.exe uninstall from a command prompt or PowerShell to remove the service, and repeat steps 3 and 4 to register the Packager service.


Run the Packager 

Run the packager to decrypt files in the target folders.

  1. Before starting the Packager service, stop any existing Packager service or agent that encrypts files in the target folders.
  2. Start the Fasoo Decrypt Packager Service and verify it starts.
  3. If the service does not start, review Event Viewer and packager.wrapper.log, packager.err.log, and packager.out.log in the [Install Drive]:\Fasoo\Fasoo_Packager folder to ensure there are no errors.
  4. Open packager.out.log in a text editor or log monitoring tool, like BareTail, to check on the progress of file decryption.
  5. Once you see job finished in the log, the process is complete.
  6. Confirm files are decrypted and you can open them with standard applications.
  7. Stop the service once all files are decrypted.


Remove Packager Service

Remove the packager service if you no longer need to decrypt files.

  1. Stop the Packager service from the Services application.
  2. Open a command prompt or PowerShell as administrator and go to the
     [Install Drive]:\Fasoo\Fasoo_Packager folder.
  3. Enter packager.exe uninstall to remove the Packager service.
  4. Open the Services application and verify the service does not appear.