Designing Flows That Keep Custody Automatically
The request lands on a Tuesday, and the admin who answers it is one of two people. The first is an archaeologist: days spent excavating logs, correlating timestamps, and hoping the critical entries survived rotation. The second is a librarian. The flow was built so that every file moving through it leaves a complete record as a side effect. Answering the question is an unhurried lookup. Same evidence, wildly different week.
Everything earlier in this series points here. The worked custody record was only possible because someone had configured checkpoints in advance; the breaks all traced back to designs that made detours attractive. This closing article turns the lessons into an engineering spec. It covers five design principles that make custody automatic and a reference design to compare your flows against. It covers the custody pack you can hand over when someone official asks, and a retrofit order for the flows you already run.
This is part of our Chain of Custody series, and it is deliberately unglamorous. Custody by design is mostly configuration you do once — accounts, logging, job steps, folder permissions. After that, the record accumulates for every file, attended or not, forever. The librarian, it turns out, is mostly configuration.
The Design Goal: A Record That Assembles Itself
State the target precisely, because it disciplines every choice below. For any file that traverses the flow, the three custody questions — who had it, when, what changed — must be answerable from records produced automatically. That must hold without anyone having decided that this particular file mattered.
The last condition is the crux. Files never announce in advance that they will be disputed. The benefits file that triggers a reconciliation fight looks identical, on the night it moves, to a thousand uneventful siblings. Any custody practice that depends on a human remembering to do something extra for the important files will protect exactly the files nobody knew were important. Automatic-for-all is not gold-plating; it is the only version that works, and once configured it costs the same as doing nothing.
Five principles get you there. Each closes a category of gap from the breaks article; together they cover the three questions end to end.
The Five Principles
Each principle is a configuration decision with a custody question it permanently answers; together they are the whole design.
Principle one: one path, and no manual hops
Every flow gets exactly one sanctioned route — origin system to destination, hop by hop, named in a document. No step in it involves a human hand carrying bytes. Manual hops are where custody dies: each is an opportunity for a laptop detour, a wrong-file mistake, an unlogged interval. A scheduled job takes the same route with the same steps every run, and its run history is itself custody evidence. A scheduled job has also never once improvised.
In practice this means the pickup is a watched folder rather than a person dragging files, and the delivery is a scripted transfer rather than a browser upload. This is the native shape of an automation client like Sysax FTP Automation. Folder monitoring notices the export the moment it lands. The job carries it over SFTP or FTPS on schedule, and retry and error handling absorb the flaky nights. Pre- and post-processing steps bracket the transfer with whatever the flow needs — which principle four will use. The human role shifts from mover to owner: nobody touches the files; somebody owns the job.
Design the failure path with the same care, because improvisation under deadline is how single paths quietly grow second ones. The job that fails must alert loudly, and the written fallback must preserve custody. Verify the hash before any out-of-band send, record who submitted what where, and confirm content after. A one-page fallback procedure — the failure section of the flow's runbook — is cheap insurance against the fourteen-hour gap.
"Named in a document" deserves to be literal. A flow one-pager is five lines, and it is the anchor every other artifact refers back to:
FLOW: benefits-outbound Route: ledger01 export -> transfer01 /inbound/benefits -> sftp.meridianbank.example /drop Job: benefits-outbound (scheduler), runs as NORTHFIELD\xferbot, nightly Fallback: partner web portal, per procedure FB-BEN-1 (hash first, ticket the submission) Owner: automation lead (infrastructure team)
Principle two: named identities only
Every account that can touch the flow — human or service — identifies a singular custodian. No shared logins anywhere on the path, because a log full of ftpuser answers "who had it?" with "someone," which is the gap that never closes. On the server side there is no technical obstacle left. A Windows transfer server such as Sysax Multi Server authenticates named accounts directly, against Windows or Active Directory identities, or by public key. So each person, each partner, and each job gets its own credential, and every log line arrives pre-attributed.
Two registry habits complete the principle. First, every service account maps to a named human owner in a document that stays current, so accountability survives the account's anonymity. A three-column table is enough:
Account Purpose Owner svc_ledger payroll/benefits exports from ledger01 payroll systems lead xferbot transfer jobs on transfer01 automation lead northfield-payroll our account at Meridian Bank automation lead meridian-inbound Meridian's pickup account on our server partner: Meridian ops contact
Second, offboarding includes the transfer path. When the payroll analyst leaves, their account and any keys go the same week. The registry row gets a new owner before the old one's badge stops working. The upkeep disciplines are covered in service account hygiene. Orphaned service accounts are the only employees who never leave.
Principle three: logging that happens to every file
The custody backbone is server-side activity logging that records every session, every login, every upload and download. It covers all users, all the time, not just when someone is watching. Configure it once at the server and the "who and when" of every hop writes itself. This is the activity log a server like Sysax Multi Server keeps to file and optionally a database. Rollover keeps growth from becoming the reason logging got turned off. Keeping that growth from becoming a service problem is covered in log growth and service logs health. What belongs in those logs, and the noise to skip, is the subject of what to log.
Then treat the logs as the evidence they are. Ship copies off the server so no single machine holds the only record. This also keeps the person who could tamper with a file from tampering with its history — the disciplines of tamper resistance. Set retention by dispute horizon, not disk comfort: a question that arrives after a year must find the log still there. And keep clocks synchronized with timestamps in UTC across every machine in the path, because a timeline that contradicts itself discredits the whole record.
Principle four: hashing wired into the job
Content verification runs as steps inside the transfer job, not as a ritual humans perform on important days. Transfer tools do not need built-in hashing for this. They need the ability to run your script at the right moments, which is exactly what pre- and post-processing hooks are for. The export's final step computes the origin SHA-256 and appends it to the hash log. The transfer job's pre-processing step re-verifies before sending. The post-processing step records the result. Every run, same order, no memory required.
The recording format and the algorithm reasoning live in hashes as custody evidence; the automation patterns in integrity in automation. The design rules are worth restating here. Log every result including failures, and keep the hash log under different write permissions than the payload folders. Make a MISMATCH stop the flow and page a human rather than scroll past. A verification that cannot halt anything is decoration.
Principle five: receipts by default
The far side of every delivery produces retained evidence without anyone asking for it. The strongest pattern is agreed at partner onboarding. The recipient's intake verifies the delivered file — ideally reporting the hash of what it received. The intake drops an acknowledgment your job automatically retrieves and archives verbatim. Where partners cannot manage that, weaker receipts still beat none. The job's own transfer transcript proves acceptance by the remote server. The job's email notification — a standard feature of scheduled-transfer tools like Sysax FTP Automation — gives every run a timestamped completion notice in a mailbox. That is corroborating evidence with zero marginal effort. The full menu, and how to design acknowledgments that hold up, is in proof-of-delivery patterns. The partner-negotiation side is in trading partner onboarding.
The Reference Design at a Glance
Here is the whole design as one table. It shows each stage of a flow, the control the principles put there, and the evidence that stage now produces for every file, automatically. Compare any flow you run against it and the gaps name themselves.
| Stage | Control in place | Evidence produced automatically |
|---|---|---|
| Origin export | Job runs as named service account; hash step is the job's last act | Job history; origin hash entry |
| Arrival on transfer server | SFTP with named account; staging folder writable only by the two service identities | Session log line; arrival verification entry |
| Outbound job | Scheduled job, single route; pre-hash check; encryption if the payload needs it; retry + alert on failure | Run log with each step's result; pre-send MATCH entry |
| Delivery | Named partner-issued account; encrypted channel | Transfer transcript; completion notification |
| Receipt | Acknowledgment format agreed at onboarding; job retrieves and archives it | Partner ack with received-file hash, retained verbatim |
| Archive and disposition | Post-processing moves original to restricted archive; final hash check; retention rule applies | Archive entry with MATCH; logged eventual purge |
Design test: walk the table's right column for one of your flows and cross out every artifact your setup does not currently produce. Each cross-out is a question you would answer with "probably" today — and each is closable with configuration rather than heroics.
The Custody Pack You Can Produce on Demand
Now the payoff. When someone official asks about a file — assessor, partner, counsel — what they should receive is a custody pack. It is one folder that tells the file's whole story from the designed flow's own artifacts. Its contents, as a checklist to copy:
CUSTODY PACK — one file, one folder
[ ] Custody record the one-page chronological summary: every event,
actor, and hash result, each line citing its source
[ ] Log extracts the relevant lines from each hop's activity log,
exported unedited, with the extraction date noted
[ ] Hash log entries origin value plus every verification, successes
and failures alike
[ ] Receipts the partner acknowledgment and completion
notifications, verbatim as received
[ ] Account map which identities appear in the record, and the
named owner of each service account
[ ] Flow description the sanctioned path and job configuration, with
the change tickets that last modified it
[ ] Clock statement one paragraph: all sources log UTC via
synchronized time
[ ] Retention note where the file and this evidence now live, and
how long each is kept
Map the checklist against the five principles and notice there is nothing to create — only to collect. The custody record is assembled per documenting a file's journey; every other item is an export from something the design already maintains. That is the definition of custody-ready: the pack is a gathering exercise, not an investigation. When the request is adversarial — a formal dispute rather than a routine question — the same materials get packaged with a narrative for outside consumption. That craft is covered in building an evidence pack. And remember the standing division of labor: you produce and preserve the pack, and the lawyers decide what it proves.
Scope the pack as deliberately as you assemble it. It covers the file that was asked about. The whole day's log exposes unrelated traffic, and a curated subset of the relevant lines reads as editing. The rule that satisfies both instincts is to be complete for the file in question, silent about everything else. Note the extraction method so the recipient can see the boundary was scope, not selection. When the requester needs more, they will ask, and the designed flow can answer that too.
Retrofitting the Flow You Already Have
Nobody builds from blank paper; you inherit flows mid-flight. Retrofit in this order — it is sorted by evidence-per-effort, and each step makes the next one more valuable.
- Named identities. Kill the shared logins first. Until actors are attributable, better logs just document anonymity in higher resolution. Usually days of work, and it upgrades every future log line.
- Logging and retention. Confirm activity logging is on at every hop, ship copies off-box, and stretch retention past your dispute horizon. The "when" layer is now durable.
- Single path. Replace the manual hops with a scheduled job, add failure alerts, and write the custody-preserving fallback. The classic break sources — detours, improvisations — lose their reason to exist.
- Wired-in hashing. Add the origin hash step and per-hop verification with logged results. The "what changed" column fills itself in from here on.
- Receipts. Raise acknowledgments at the next partner review; take the transcript-plus-notification fallback in the meantime. The record now extends past your own walls.
Resist doing these in reverse order, tempting as the technical steps are — hashing before named accounts yields beautifully verified files handled by nobody in particular.
The Fire Drill: Prove It Works
A design is a claim; the drill is the test. Once a quarter, have someone pick a file that moved through the flow a few months ago — genuinely at random, not a known-good specimen. Have them assemble its custody pack from standing records within one working hour. No warning, no special preparation, exactly as if the request were real. I have never seen a drill happen that was not on a calendar.
Score it honestly: every checklist item present, or a list of what was missing and why. Meridian Parts' first drill found the pack seven-eighths complete. The custody record assembled, and the hashes and session lines were all there. Then the partner acknowledgment for that particular week turned out to have been checked by the job and discarded. That was because nobody had ever told the post-processing step to keep it. One configuration line later, receipts retained themselves; the next drill found a different hole, and the one after that found none. That is the drill working exactly as intended: it found the gap while the question was hypothetical, which is the only cheap time to find it. Log the drill itself with its findings and fixes. Recurring self-testing of controls is precisely the habit that turns audits from excavations into demonstrations, a theme our audit-ready reporting series develops fully. And the drill doubles as the gap hunt from breaks in custody — one exercise, two payoffs.
Putting It Together
Custody by design is five configuration decisions, made once per flow. Choose one automated path with no manual hops, named identities everywhere, and always-on logging with evidence-grade retention. Add hashing wired into the job's own steps, and receipts agreed into the partnership. Together they produce, for every file and without human vigilance, the complete who-had-it-when-and-what-changed record this series has been about. They produce a custody pack that assembles in an hour because nothing needs to be reconstructed. Retrofit in the order that builds attribution first, and drill it quarterly. The day someone official asks about a file then becomes the day your flow quietly shows its work. For the expectations that day carries in regulated territory, see custody in regulated flows. The librarian goes home on time.
Frequently Asked Questions
Do I need special "chain of custody" software to do any of this?
Where do the hash steps run if my transfer tool has no hashing feature?
Isn't building all this overkill for a small shop?
How long should producing a custody pack take?
What single change gives the most custody improvement for the least work?
From the Sysax team: we build secure file transfer software for Windows. Sysax Multi Server is an FTP, FTPS, SFTP, and HTTPS server. Sysax FTP Automation handles scheduled, scripted transfers. Free trials are on the download page.
