Saturday 9 September 2017

A Node-based SFTP with integrated REST API for querying users, files, etc...

Something I've been working on recently:http://ift.tt/2wQwYKV's a Node-based SFTP server with an integrated REST API for querying users, files, etc... The authentication strategy is customizable via a callback that you pass in when instantiating the service. Various events of interest are emitted (file uploaded, user signed in, etc...).My use case: I have a number of clients that need to routinely send me various data feeds for further processing. The industry is such that everyone has pretty much standardized on SFTP (they don't want to interact with a custom REST API). I wanted something that provided a simple solution for implementing a custom authentication strategy and that was capable of pinging additional third-party services as uploads occur (to trigger automated processing).I'd estimate that the SFTP server portion of the project is ~90% complete. There are a few SFTP commands that I've yet to implement (LSTAT, etc...). There's also a bug when you attempt to upload a file to a subdirectory that you create (it's always uploaded to the root path of the user's folder).REST API endpoints exist for providing a basic health-check and querying for a list of users. I've yet to implement REST endpoints for querying / fetching files, but that part is easy in comparison to aspects that have already been implemented. I plan on getting those calls fleshed out later this weekend or on Monday.I hope some others find this useful. PRs are of course welcome.

Submitted September 09, 2017 at 05:38PM by sotimting

No comments:

Post a Comment