moov-io / achgateway

Payment gateway enabling automated ACH operations in a distributed and fault tolerant way.
https://moov-io.github.io/achgateway/
Apache License 2.0
52 stars 19 forks source link

upload: MOVEit SFTP server might not return failures properly #150

Closed adamdecaf closed 1 year ago

adamdecaf commented 1 year ago

Hey Adam, one thing we noticed yesterday while validating our setup (besides that the errors emitted by crypto ssh are can be quite opaque) is that we had a misconfigured path to drop off the outbound files and when we triggered the cutoff to send a file, the logs said 1 of 1 file had been moved successfully (wrote 1 of 1 files to remote agent) but since we didn’t have permission to write to the incorrect destination, the file wasn’t actually delivered. We got a FileUploaded event for this fileID as well. Granted this was during initial setup and we caught it pretty quickly, but was interested in hearing your thoughts on validating the uploaded files in some way after upload. Thinking about an instance in the future when the permissions on our upload server change and we miss that files are not successfully being written.

Source: https://moov-io.slack.com/archives/CD9J8EJKX/p1665672492870269

Yeah, from the ACH Gateway perspective, everything looked successful, but the file was not in the remote destination. I tried an analogous file put operation just via the command line and got a permissions error there:

sftp> put 091218445-ach-json-test.ach /m1/Outbound/ACHFiles/
debug1: Couldn't stat remote file: No such file or directory
Uploading 091218445-ach-json-test.ach to /m1/Outbound/ACHFiles/
remote open("/m1/Outbound/ACHFiles/"): No such file or directory

./Outbound/ACHFiles/ is the path I should have been using and that works with both.

adamdecaf commented 1 year ago

They offer a free trial, so we can verify if this is an issue with their server or the achgateway code. We've verified achgateway reports these errors as expected.

https://www.ipswitch.com/forms/free-trials/moveit

adamdecaf commented 1 year ago

If this is still an issue please reach out here.