Browser Sessions and File Handoffs
In this article
- Decide who logs in to a site an agent works on, and explain why the agent never types or sees the password.
- Choose where a run's cookies live so that no other run or user can reach them, and say what must never appear in logs or traces.
- Record a downloaded file in quarantine and refuse any upload that is not on the run's named list.
- Resume a run after its session expires without sending a form twice.
- Terms defined here: browser session state, download quarantine, file provenance record.
Overview
An agent collects supplier invoices from a supplier's web portal that has no API. The portal wants a sign-in, hands out PDFs, and sometimes asks for a document back. Three questions come before the first click. Who types the password? Where does the signed-in browser keep its state, and who else can reach it? What happens to a file that comes down from the portal, or goes up to it?
By the end you can set up a sign-in the agent never sees, give each run a browser of its own, hold every download apart until code has checked it, and refuse every upload but the one the run should send. And when the session expires halfway, you can resume without sending a form twice.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Who types the password
- The session is a credential
- Where the cookies live
- Downloads wait in quarantine
- Uploads from a named list
- When the session expires
- What stays out of logs and traces
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions