Closed atruskie closed 2 years ago
We want to enable uploads from remote sources. Currently uploading is done with the aid of an admin user but that is a bottleneck.
There are lots of issues attached to this concept, the main being how do we prevent abuse?
[ ] Add a (admin only) configuration switch to projects that allows remote uploads
[ ] Add an admin rest endpoint for managing open sftpgo user accounts (important for stopping abuse behaviors when necessary)
[ ] Add a endpoint that is triggered by sftpgo whenever a file is uploaded
actions
[ ] We'll need a /harvesters endpoint and /harvester/{id}/items endpoint
/harvesters
/harvester/{id}/items
/havesters
/harvesters/enqueue
harvest_items
harvester_id
GET /harvesters/{id}/items
Other considerations:
Basic workflow:
POST /security/new
POST /sites/{id}/harvest
We want to enable uploads from remote sources. Currently uploading is done with the aid of an admin user but that is a bottleneck.
There are lots of issues attached to this concept, the main being how do we prevent abuse?
[ ] Add a (admin only) configuration switch to projects that allows remote uploads
[ ] Add an admin rest endpoint for managing open sftpgo user accounts (important for stopping abuse behaviors when necessary)
[ ] Add a endpoint that is triggered by sftpgo whenever a file is uploaded
actions
option for sftpgo configuration https://github.com/drakkan/sftpgo/blob/main/docs/full-configuration.md#configuration-file https://github.com/drakkan/sftpgo/blob/main/docs/custom-actions.md[ ] We'll need a
/harvesters
endpoint and/harvester/{id}/items
endpoint/havesters
will create a new sftpgo user/harvesters
will return upload auth details, and notification of expiry timers/harvesters/enqueue
will accept the sftpgo json payload and create a new HarvestItem and enqueue the harvest jobharvest_items
should gain aharvester_id
fieldGET /harvesters/{id}/items
will list associated harvest items and their statusOther considerations:
Basic workflow:
POST /security/new
to loginPOST /sites/{id}/harvest
to create upload endpoint (user specific)GET /harvesters/{id}/items