Lakshya

Infrastructure & Reliability · Middleware — File transfer · Chapter 30 of 33

Managed file transfer, from zero: why banks still move files

Why the batch file survived the API era, what FTP got wrong, what SFTP fixed, and what the word ‘managed’ adds — checkpoints, encryption at rest, audit, partners and schedules.

10 min read2 diagramsAll 33 chapters

A bank that runs real-time payments, open-banking APIs and event streaming still moves an enormous share of its money in files. Salaries, supplier payments, pension payouts, direct debits, statements, reconciliations, regulatory returns: every day, thousands of files cross the bank’s boundary in both directions. The software that moves them safely is called managed file transfer, and it is the third family of middleware.

Why files survived

  • Batch economics. A payroll of 4,000 employees is one file, one approval, one transmission and one set of controls — not 4,000 separate calls, each of which can fail on its own.
  • The schemes define files. National payment schemes accept bulk payments as files in prescribed formats. In the US, the ACH network’s NACHA format uses fixed-width records of exactly 94 characters. In the UK, organisations submit Bacs files through the Bacstel-IP channel on a three-working-day cycle — input on day one, processing on day two, money moving on day three. India’s bulk credits and debits run through NACH, the National Automated Clearing House operated by the National Payments Corporation of India.
  • Counterparties produce files. A corporate client’s finance system exports a payment file; it does not call APIs.
  • Some work is naturally a file. A statement, a reconciliation, a regulatory return: each is a document with a beginning, an end and a total.
  • The mainframe runs in batches. Overnight batch processing consumes and produces files, and moves them between data centres.
A US ACH FILE IN NACHA FORMAT — EVERY RECORD EXACTLY 94 CHARACTERS, AND THE FILE CHECKS ITSELF 1FILE HEADER — who sent it, to whom, when, and a file identifier5BATCH HEADER — the company, the kind of payment (say, payroll), the effective date6ENTRY — one payment: routing number, account, amount, payee name6ENTRY — the next payment, and so on for every payee in the batch7ADDENDA (optional) — remittance detail for the entry above8BATCH CONTROL — entry count, total debits, total credits, entry hash9FILE CONTROL — batch count, entry count and totals for the whole file Fixed width: position, not punctuation, gives each field its meaning — a character out of place shifts every field after it. THE LAST TWO RECORDS REPEAT THE ARITHMETIC OF EVERYTHING ABOVE THEM. Counts, totals and an ‘entry hash’ built from the routing numbers: a truncated or altered file fails its own sums before a single payment moves. That is why a file, not a message, is the natural unit for a bulk payment.
A payment file is a small database with its own integrity check. The NACHA format — named after Nacha, the body that governs the US ACH network — nests payments inside batches inside a file, and closes each level with a control record that repeats its counts and totals. Record type numbers from the Nacha ACH developer guide.

From FTP to managed file transfer

ProtocolWhat it isIts problem, or its strength
FTPThe File Transfer Protocol, from the early internetSends the password and the data in clear text; opens extra connections that firewalls struggle with. Never acceptable across a bank’s boundary
FTPSFTP over TLS — the same protocol, encryptedEncrypted, but still FTP’s awkward multi-connection design
SFTPThe SSH File Transfer Protocol: file transfer inside a Secure Shell (SSH) connection. Not FTP with an S addedOne port, strong encryption, key-based authentication — the default for bank-to-corporate transfers
HTTPSUpload and download over the web’s encrypted protocolEasy for people through a browser portal; APIs for systems
AS2Applicability Statement 2: files sent over HTTP, signed and encrypted, with a signed receipt returnedThe receipt — a message disposition notification — proves delivery, which is why supply-chain and invoicing traffic (Electronic Data Interchange, EDI) uses it
AS4A successor built on web-services standardsUsed in, among other places, European electronic invoicing networks
Connect:DirectIBM’s proprietary point-to-point transfer, from the mainframe world, now sold as IBM Sterling Connect:DirectCheckpoint restart for very large files and native mainframe support; the bank data-centre workhorse

The name trap is worth spelling out, because it causes real misconfigurations: SFTP and FTPS are different protocols with different ports, different authentication and different firewall rules. A partner who says “secure FTP” must be asked which one they mean.

What ‘managed’ adds

A protocol moves bytes. A bank needs rather more, and MFT products exist to supply it:

CapabilityWhat it means in practice
Guaranteed delivery and checkpoint restartA 20 GB transfer interrupted at 18 GB resumes from the last checkpoint rather than starting again
IntegrityA checksum proves the file that arrived is the file that was sent
Encryption at restFiles waiting on disk are encrypted, not only files on the wire
PGPPretty Good Privacy (today, the OpenPGP standard): the file itself is encrypted for the recipient and signed by the sender, so it stays protected on every server it passes through
Audit and non-repudiationWho sent what, when, to whom, whether it was received — kept for the retention period regulators require
Scheduling and triggersSend the statement file at 06:00; start a workflow the moment a file arrives
WorkflowsDecrypt, verify, scan for malware, validate the format, rename, route — without custom scripts
Partner managementOnboarding hundreds of counterparties, each with their own protocol, keys, folders and schedule
Service-level monitoringAn alert when a file expected by 09:00 has not arrived — the failure no transfer log can show

PGP in two sentences

The sender encrypts the file with the recipient’s public key, so only the recipient’s private key can open it, and signs it with the sender’s private key, so the recipient can prove who sent it and that it was not altered.

The point for middleware: a PGP-encrypted file stays unreadable on every server along the way — including a compromised MFT server — until the one system that holds the key decrypts it.

The anatomy of an MFT estate

MANAGED FILE TRANSFER — THE GATEWAY HOLDS NOTHING, AND THE INSIDE OPENS THE CONNECTION PARTNERSDMZINTERNAL NETWORK Corporate clientSFTP, PGP-encryptedPayment schemeits own channelTrading partnerAS2 with receipts MFT gateway ends SFTP, FTPS, AS2 stores no files connection opened from the inside MFT server 1 authenticate the partner2 decrypt, verify signature3 scan for malware4 check format, duplicates5 log every step Payments engineMainframe (Connect:Direct)Archive and audit store IF THE GATEWAY IS COMPROMISED, THE ATTACKER FINDS NO FILES AND NO ROUTE IN. It holds nothing at rest, and no firewall rule lets it open a connection to the internal network — the internal server dials out to it and pulls the traffic through.
The design that limits the damage when the internet-facing part is breached. The gateway in the demilitarised zone (DMZ) terminates partners’ connections but stores nothing; the internal server opens the connection to it from inside, so there is no inbound firewall rule from the DMZ to exploit. IBM Sterling Secure Proxy is one product built on this principle.

Push, pull, and who opens the connection

Every file flow has a direction of data and a direction of connection, and they need not match. A bank can push a statement to a client’s server, or the client can pull it from the bank’s. The rule of thumb in banks is that the more trusted side opens the connection: the bank would rather dial out than accept connections in, and the gateway pattern above exists to make inbound flows behave as if they were outbound.

Four kinds of key to manage

KeyProves or protectsWho holds it
SSH host keyThe identity of the SFTP server, so a partner knows it reached the bankThe bank
SSH user keyThe identity of the partner connecting, instead of a passwordEach partner, with the public half registered at the bank
PGP key pairThe file’s contents and its senderBoth sides, each for their own direction
TLS certificateIdentity and encryption for FTPS, HTTPS and AS2The bank and each partner

Every one of these expires or needs rotating, and rotating a key shared with hundreds of partners is a coordination project, not a command — the same lesson as partner certificates in the web tier, multiplied.

Worked example: onboarding a corporate client onto host-to-host

Every MFT engineer runs this process dozens of times, and interviews for the role often ask for it step by step. The order matters, because each step depends on the one before.

StepWhat happensWhat goes wrong if it is skipped
1. Agree the flowsWhich files, in which direction, in which format and version, at what volume, against which cut-offsA file format nobody agreed, discovered on go-live day
2. Decide who connectsUsually the client pushes payments to the bank over SFTP; statements are pushed back or pulledFirewall rules opened in the wrong direction
3. Open the networkThe bank allow-lists the client’s source addresses on the gateway, and the client allow-lists the bank’sAn outage the day the client’s cloud provider changes its addresses
4. Exchange keysThe client’s SSH public key is registered; the bank’s host-key fingerprint and both PGP public keys are exchanged, and every fingerprint is confirmed over a second channel, such as a call to a known numberA key substituted in transit — the classic interception attack, invisible afterwards
5. Test connectivityA dummy file in each directionDiscovering a network problem with real money in the file
6. Certify the formatTest files validated against the bank’s schema; rejections and status reports rehearsedThe first rejected file arriving with nobody knowing how to read the status report
7. PilotLow-value live payments, with approval thresholds setA mistake at full volume
8. Go live, monitoredExpected-file monitoring for every flow, and a named escalation contact on both sidesA missing file noticed by the client’s employees rather than by either team

Step 4 is the one most often done carelessly, and the one whose failure is hardest to detect later. A public key that arrives by email and is installed without checking its fingerprint is a public key an attacker may have supplied.

Check yourself

Why must key fingerprints be confirmed over a second channel?A key substituted in transit lets an attacker intercept or forge files, and nothing afterwards shows it happened.
Name four reasons files survived the API era in banking.Batch economics, payment schemes that define file formats, counterparties whose systems export files, and work that is naturally a document — statements, reconciliations, returns.
What is special about a NACHA ACH record?It is fixed-width, exactly 94 characters; position gives each field its meaning.
How does an ACH file check itself?Batch and file control records repeat the counts, totals and an entry hash of the records above them.
Describe the Bacs cycle.Three working days: input on day one, processing on day two, money moving on day three — submitted via Bacstel-IP.
What is NACH?India's National Automated Clearing House, run by NPCI, for bulk credits and debits.
Is SFTP FTP with encryption?No — SFTP is the SSH File Transfer Protocol; FTPS is FTP over TLS. Different protocols, ports and authentication.
What does AS2 add?Signed, encrypted transfer over HTTP with a signed receipt that proves delivery.
Why do banks keep Connect:Direct?Checkpoint restart for very large files and native mainframe support.
Name five things MFT adds to a protocol.Checkpoint restart, integrity checks, encryption at rest, audit and non-repudiation, scheduling, workflows, partner management and SLA monitoring.
Why does PGP matter even inside the bank?The file stays encrypted on every server it passes through, including a compromised one, until the intended system decrypts it.
Why does the gateway store nothing?So a compromised internet-facing component yields no files, and the internal server's outbound connection leaves no inbound route to exploit.
What are the four kinds of key an MFT team manages?SSH host keys, SSH user keys, PGP key pairs and TLS certificates.
← Messaging licences, costs and the comparisonBank file flows: salaries, schemes, statements and the mainframe →