2026-10-25
Giving Access Without Sharing Credentials
Two of the tools I built at Agate solve the same problem in different places. SVN Access Gateway lets staff and vendors work with art files without an SVN account. Shellway lets people run approved commands on servers without SSH access. Both follow one idea: the app holds the credential, and people only get what they were granted.
Why shared credentials stop working
Handing out credentials feels fast until you need to take them back. Vendors used to receive a direct SVN account with write access to production repositories, and those accounts were hard to scope to the folders they actually needed. On servers, routine tasks waited for whoever held SSH access, and sharing keys would have made it impossible to say who ran what.
The question that shaped both tools came from the SVN PRD: after a leak, can we answer who downloaded this file? With shared credentials the honest answer was no.
Let the app hold the secret
In SVN Access Gateway, every SVN operation runs through a single service account whose credentials only exist in the server's environment variables. Users sign in to the app, with Microsoft Entra ID for staff and email and password for vendors, and never see an SVN password.
Shellway stores SSH credentials encrypted with AES-256-GCM and never sends them back through the API, not even to admins. Host keys are pinned by SHA256 fingerprint, either set by an admin or saved after the first successful login, and a changed key stops the connection before any secret is sent. One bug taught me why the order matters: the fingerprint must only be stored after the login succeeds, not before.
One place decides
Access rules spread across many files are hard to review and easy to bypass. In SVN Access Gateway every check goes through one pure function, and the SVN module only accepts paths that already passed it. TypeScript enforces that rule, so code that skips the check does not compile.
Shellway uses the same idea with four conditions. A runner can run a command on a server only when there is a grant for that runner, command, and server, the runner may use the chosen SSH user, that SSH user is allowed on the server, and the command is not admin-only. The browser only sends IDs. The script itself is loaded from the database and copied into the run record.
Both tools recompute access from the database on every request, so revoking access works immediately instead of when a session expires. A denied request looks the same as data that does not exist, which avoids telling an attacker that a folder or server is there.
Logs that outlast the accounts in them
An audit log is only useful if it is still complete when you need it. SVN Access Gateway copies the actor's ID and email into each history row without a foreign key, so the record stays intact even after the account is deleted. Shellway keeps a copy of the exact script that ran, so the log shows what happened even if the command is edited later.
Getting this right took a few fixes. Some download managers request a file twice, which created two history entries for one download, so repeated downloads within 30 seconds are now merged into one. On Shellway's Grants page, a slow response for the previously selected runner could briefly show another person's grants, so responses for a runner that is no longer on screen are now ignored. Both bugs were small, but in a tool whose job is to show who can do what, small mistakes matter.
More articles
How I Build Internal Tools AI-First
How I built four internal tools during my DevOps internship: writing the specs, letting AI coding agents write the code, and trusting tests.
Smoke-Testing Docker Images Before They Deploy
Why a green Docker build is not proof that an app starts, and how a smoke-test stage in GitLab CI checks the exact image before it deploys.
Building Unity for Four Platforms in One GitLab Pipeline
Notes from extending a shared GitLab CI template so one Unity project builds for WebGL, Windows, Android, and iOS, with failures you can read.
LET'S WORK TOGETHER
akmalzaidan960@gmail.com


