How to use auto-encryption via pattern matching

You can set up Atakama to "auto" encrypt files when certain specified patterns are matched. For example, Atakama can automatically encrypt files of a particular file type, that contain specific characters in filenames and are located within specific folders when they appear (existing files are not encrypted when auto-encryption is enabled, we recommend running a bulk encryption first).


How to use the feature:


1. Open Control Center->Options tab, and add a checkmark to "Enable Classifier Auto-Encryption". Click on "Quit Atakama" in the pop-up.

2. While Atakama is not running, open atakama.config in a text editor (e.g., Notepad, Notepad++). 

3. Follow the instructions in the "Creating parameters" below to write a parameter that matches your use case and add it to the atakama.config. 

4. Save the atakama.config file and relaunch Atakama.


Note: While we do not encrypt 0-byte files, 0-byte files will have their extension changed to ".kama" by the auto-encryption process. The files will remain unencrypted until they are saved with data. 


Creating parameters


Note: You can add these parameters anywhere inside the "{" and "}" (they are on the first and last line, respectively) in the atakama.config file. If you add it as the last line before the "}", remove the comma at the end of the line. Otherwise, Atakama will throw a "Run frozen" error as it will be unable to process the Atakama.config file.


Example #1: Match a backend folder or multiple backend folders


"plugins": [
    {"name": "name-match-detector", "enabled": True, "args":
         {"type": "glob", "pattern": "*/Secure_Folder/*"}
     }
],

Example:

"plugins": [
    {"name": "name-match-detector", "enabled": True, "args": 
        {"type": "glob", "pattern": "*/Finance/*"}
    }
],

This will cause Atakama to automatically encrypt all files in the "Finance" Secure Folder. You can adjust this parameter to match your use cases.


The below will match multiple folders.

    "plugins": [
        {
            "name": "name-match-detector",
            "enabled": true,
            "args": {
                "type": "glob",
                "invert": false,
                "pattern": "*/Secure_Folder1/*"
            }
        },
        {
            "name": "name-match-detector",
            "enabled": true,
            "args": {
                "type": "glob",
                "invert": false,
                "pattern": "*/Secure_Folder2/*"
            }
        }
    ],

Example:

    "plugins": [
        {
            "name": "name-match-detector",
            "enabled": true,
            "args": {
                "type": "glob",
                "invert": false,
                "pattern": "*/Finance/*"
            }
        },
        {
            "name": "name-match-detector",
            "enabled": true,
            "args": {
                "type": "glob",
                "invert": false,
                "pattern": "*/Logistics/*"
            }
        }
    ],

This will cause Atakama to automatically encrypt all files in the "Finance" and "Logistics" Secure Folders.

Note: This does not work for the word "Vault" as that is a word used by Atakama.


Example #2: Encrypting files by their name

"plugins": [
    {"name": "name-match-detector", "enabled": true, "args":
         {"pattern": "*file_name.*"}
    }
],

Example:

"plugins": [
    {"name": "name-match-detector", "enabled": true, "args": 
        {"pattern": "*contacts*.*"}
    }
],

This will cause Atakama to automatically encrypt all files that contain "contacts" in the filenames. 

 

The below will match multiple words.

"plugins": [
    {"name": "name-match-detector", "enabled": True, "args":
         {"type": "regex", "pattern": "(file_name1|file_name2|file_name3)$"}
    }
],

Example:

"plugins": [
    {"name": "name-match-detector", "enabled": True, "args":
         {"type": "regex", "pattern": "(*contacts*.*|*agreements*.*|*statements*.*)$"}
         }
],

This will cause Atakama to automatically encrypt all files that contain either "contacts", "agreements", or "statements" in the filenames.


Example #3: Encrypting files by their extension 

 "plugins": [
    {"name": "name-match-detector","enabled": True,"args": 
        {"type": "regex","invert": false, "pattern": "\\.file_extension$"}
    }
],

Example:

"plugins": [
    {"name": "name-match-detector","enabled": True,"args": 
        {"type": "regex","invert": false, "pattern": "\\.txt$"}
    }
],

Adding it as is will cause Atakama to encrypt all .txt file types automatically. 


Example #4: Encrypting all files, folders with files, and nested folders with files in the backend

"plugins": [
    {"name": "name-match-detector", "enabled": true, "args":
        {"type": "*"}
    }
],

Adding it as is will cause Atakama to encrypt all files in the backend automatically. 


Example #5: Encrypting all files EXCEPT a certain file type in the backend folders (invert value):

"plugins": [
    {"name": "name-match-detector","enabled":  True,"args": 
        {"type": "regex","invert": true, "pattern": "\\.file_extension$"}
    }
],

Example:

"plugins": [
    {"name": "name-match-detector", "enabled": True, "args": 
        {"type": "regex", "invert": true, "pattern": "\\.txt$"}
    }
],

Adding it as is will cause Atakama to encrypt all file types in the backend folders automatically except for the .txt file types. You can adjust this parameter to match your use case.


Automatically encrypt files added when Atakama is not running


To encrypt files that match a pattern when Atakama is not running, add the below to the atakama.config file. Atakama will scan all Secure Folders on startup. This will require additional system resources during start-up and will continue until the scanning process and file encryption is.  


"walk_rules": {
        "ignore_unencrypted": false
},

Example #6: Encrypting all files EXCEPT a certain file type AND a certain Secure Folder in the backend folders (invert value):


"plugins": [
       {"name": "name-match-detector","enabled":  True,"args": 
               {"type": "regex","invert": true, "pattern": "(.*\/(secure_folder_name)\/.*)|(file_extension$)|(file_extension$)"}
       }
 ],

Example:

"plugins": [
       {"name": "name-match-detector","enabled":  True,"args": 
               {"type": "regex","invert": true, "pattern": "(.*\/(sf1)\/.*)|(xlsx$)|(txt$)"}
       }
 ],


Adding it as is will result in Atakama encrypting all files in the backend folders, with the exception of files located in the Secure folder "sf1" and files of the .xlsx and .txt formats in all other folders. You can adjust this parameter to match your use case.

 Example #7: Encrypting all files in a specific Secure Folder EXCEPT for a specific file name

    "plugins": [
        {
            "args": {
                "invert": false,
                "pattern": ".*\\/secure_folder_name\\/.*(?<!(filename))$",
                "type": "regex"
            },
            "enabled": true,
            "name": "name-match-detector"
        },
    ],

Example:

    "plugins": [
        {
            "args": {
                "invert": false,
                "pattern": ".*\\/Finance\\/.*(?<!(thumbs.db))$",
                "type": "regex"
            },
            "enabled": true,
            "name": "name-match-detector"
        },
    ],


Adding it as is will result in Atakama encrypting all files in the "Finance" folder (including the files inside sub-folder except for all files with the name "thumbs.db". You can adjust this parameter to match your use case.




















Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.