[ 
https://issues.apache.org/jira/browse/MINIFICPP-1831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marton Szasz updated MINIFICPP-1831:
------------------------------------
    Status: Patch Available  (was: Open)

https://github.com/apache/nifi-minifi-cpp/pull/1332

> C2 asset download command
> -------------------------
>
>                 Key: MINIFICPP-1831
>                 URL: https://issues.apache.org/jira/browse/MINIFICPP-1831
>             Project: Apache NiFi MiNiFi C++
>          Issue Type: New Feature
>            Reporter: Marton Szasz
>            Assignee: Adam Debreceni
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Story: As a minifi user, I want to push files to my agents from a central C2 
> server, and reference them later in the flow. E.g. pushing a python script, 
> and after ACK, updating the flow with an ExecuteScript to use that python 
> script.
>  
> Technical details:
> As a security measure, we need a new property for the asset path, which 
> defaults to MINIFI_HOME/asset, and we need to place all assets in that 
> directory. 
> The functionality is an extension to the UPDATE C2 operation, under a new 
> download-file operand.  Example operation:
> {code:java}
>     "requestedOperations": [
>         {
>             "identifier": "8678316c-d4fd-493b-9177-454a0d65d7fd",
>             "operation": "UPDATE",
>             "operand": "download-asset",
>             "args": {
>                 "file": "my_script.py",
>                 "url": "/c2/asset/472a0346-4b6b-11ec-9a48-0242ac11000c",
>                 "checksum": "120EA8A25E5D487BF68B5F7096440019",
>                 "forceDownload": "false"
>             },
>             "dependencies": []
>         }
>     ]{code}
> The meaning of forceDownload: If a file with the specified name already 
> exists in the asset directory, we overwrite it if forceDownload, otherwise we 
> reply with NO_OPERATION.
> If the URL is relative, it's treated as relative to the base path of the 
> heartbeat url. I.e. if the C2 heartbeat goes to 
> [http://myc2:1234/c2/heartbeat] and url="/asset/my_script.py", then we 
> download 
> [http://myc2:1234/asset/my_script.py|http://myc2:1234/c2/assets/my_script.py].



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to