API security and access control
Defense in depth: every layer assumes the previous one might fail.
- Requests arrive over TLS only.
- Rate limits contain abuse while authentication establishes who is calling.
- Authorization policies decide what that identity may do with each resource.
- Data is validated and secrets encrypted; sensitive actions are written to an audit trail.
Context
A security audit of ZarST found an exposed secrets file, HR endpoints without authorization, tokens in localStorage and open internal APIs.
Technical challenge
Close every finding without stopping a system that 220 employees use every day.
Chosen solution
Rotated every secret, added authorization to every endpoint, moved authentication to HttpOnly cookies and enabled a Content Security Policy. My-IT adds 2FA, passkeys and an audit log with integrity checks; SuvCRM and PayX use scoped keys and HMAC-signed webhooks.
Trade-offs
Cookie-based authentication needs CSRF and same-site configuration — more setup than a token in localStorage, but scripts can no longer read the session.
Result
The critical findings of the audit are closed.
All deep dives