Threat model first
List who could attack and how before writing code, then design the defences in.
Security and compliance first
Security and compliance are designed in from day one, not added before an audit. As an Okta Certified Developer and Consultant, I deliver enterprise-grade login and access, on Okta where it pays off, or on open-source Keycloak and friends where cost matters.
Decided at the whiteboard, enforced in the pipeline.
List who could attack and how before writing code, then design the defences in.
People, services and AI agents get only the access they need.
Keys live in a vault or environment, are rotated, and are scanned for on every change.
Code, dependency, secret and infrastructure checks must pass before anything ships.
One login, strong proof, clean access.
OpenID Connect and SAML so staff and customers sign in once.
Phishing-resistant sign-in, with stronger checks when risk is higher.
SCIM creates and removes accounts the moment HR says so.
Fine-grained roles, and one customer can never see another's data.
Health, tax, labour and privacy law, designed for audit.
Personal and health fields are tagged, encrypted and kept out of logs.
Who viewed or changed a sensitive record is logged automatically.
Data is kept only as long as the law says, and deleted on request.
Code required by a regulation names it, so reviews are fast.
Pay for licences only where they earn it.
Large workforces and strict SLAs: less to run, more built in.
No per-user licence; full control. You pay in operations instead.
OIDC, SAML and SCIM mean moving between providers is configuration, not a rewrite.
High availability, backups, monitoring and upgrades planned from the start.
Every change, written by a person or an AI agent, passes the same automated gates. If one fails, it doesn't merge.
Secret scanning and hooks stop mistakes on the laptop, and the same hooks gate AI agents.
Static analysis with custom rules for our own conventions, plus dependency and infrastructure scans.
Custom checks for forms, tenant isolation, architecture and database migrations. Baselines can only shrink.
Unit, integration and end-to-end tests, including tries at reading another tenant's data.
A bill of materials for each build, an image scan and a licence check.
A dynamic scan against a running copy, logged in as a real test user.
A web firewall at the edge, alerts, and nightly re-scans for newly found vulnerabilities.
One platform, many rulebooks: health, pharmacy, tax, labour, foreign employment and privacy. Each regulated feature declares the law it follows, and the platform checks the declaration stays current.
Each regulated screen, rule or report names the act and clause it implements, in the code itself.
Every tag records the fiscal year it was last checked. A dashboard flags anything not reviewed since the latest Finance Act.
Before regulated actions, such as issuing a tax invoice or a work-permit step, the organisation's admin confirms their setup meets the rule. Who and when is recorded.
Tax rates, thresholds and retention periods come from a versioned table per fiscal year, so a law change is data, not a code release.
| Feature | Law or standard | How it is attested |
|---|---|---|
| Patient records | HIPAA-style PHI safeguards | Encrypted fields; every view logged; break-glass audited |
| Government health reports | Ministry of Health HMIS / DHIS2 | Fixed official format, tagged and reviewed yearly |
| Feature | Law or standard | How it is attested |
|---|---|---|
| Drug samples | Nepal Drug Act 2035 | Value cap from the versioned rule table |
| Batches and expiry | Drug traceability practice | Tracked from purchase to dispensing |
| Feature | Law or standard | How it is attested |
|---|---|---|
| Sales and purchase invoices | IRD e-billing (CBMS), VAT Act | Admin attestation before issuing; IRD-prescribed format |
| Credit and debit notes | VAT Act and IRD rules | Admin attestation; tamper-evident hash chain |
| Invoice and ledger storage | VAT Act §16, Electronic Transactions Act 2063 | Retention period from the versioned rule table |
| TDS on vendor payments | Income Tax Act §88 | Rates versioned by fiscal year |
| Fixed-asset depreciation | Income Tax Act, Schedule 2 | Pool rates versioned by fiscal year |
| Feature | Law or standard | How it is attested |
|---|---|---|
| Payroll tax (TDS on salary) | Income Tax Act §88 | Rates and slabs versioned by fiscal year |
| Salary, bank and PAN details | Individual Privacy Act 2075 | Encrypted, tagged as financial data, never logged |
| Employee data requests | Individual Privacy Act 2075 | Self-service export of an employee's own data |
| Feature | Law or standard | How it is attested |
|---|---|---|
| Foreign employment, work permits, visas | Department of Foreign Employment rules | Admin attestation before each regulated step |
| Candidate documents | Individual Privacy Act 2075 | Type and size checked; retention scheduled |
| Feature | Law or standard | How it is attested |
|---|---|---|
| Personal data everywhere | Individual Privacy Act 2075 | Fields tagged by category; consent, export and erasure |
| Logs and AI prompts | Privacy by design | Personal data filtered out before logging or prompting |
| Feature | Law or standard | How it is attested |
|---|---|---|
| Every page | WCAG 2.2 AA | Labels, focus and contrast checked in automated tests |
| Dates | Bikram Sambat and AD | Stored as AD, shown in both calendars |
| Customer-facing screens | English and Nepali | Translated where customers need it |
Same standards, different trade-offs. I help pick per need, and many teams mix both.
| You need | On Okta / Auth0 | Open-source option | Worth knowing |
|---|---|---|---|
| Single sign-on (OIDC, SAML) | Okta SSO, Auth0 | Keycloak (or Zitadel, Ory) | Standards-based on both sides |
| MFA and passkeys | Okta Verify, adaptive MFA | Keycloak OTP + WebAuthn | Risk-based rules need custom flows |
| Social and enterprise login | Auth0 connections, IdP routing | Keycloak identity brokering | Google, Microsoft, Okta, SAML IdPs |
| User provisioning (SCIM) | Okta Lifecycle Management | Keycloak with a SCIM extension | Community extensions; test before production |
| Branded customer login | Auth0 Universal Login | Keycloak themes | Full control of the HTML |
| Fine-grained permissions | Okta FGA | OpenFGA | Same relationship-based model |
| API access tokens | Okta API Access Management | Keycloak clients and scopes | Pair with an API gateway |
| Directory and user store | Universal Directory | Keycloak + LDAP / AD federation | Keep existing directories |
| Identity automation | Okta Workflows | Event listeners or n8n | More build, no per-flow fees |
| Threat protection | ThreatInsight, Identity Threat Protection | Brute-force detection + WAF + SIEM alerts | Needs monitoring you own |
A multi-tenant platform for hospitals and businesses: patient records, pharmacy, accounting and tax, payroll and HR, and recruitment. Generic, but real.
Isolation enforced in the database and in every query, with tests that try to break it.
Keycloak gives staff single sign-on and MFA with no per-user licence.
Patient fields are encrypted, and every read of a record is logged.
Static analysis, dependency, secret and infrastructure scans block risky merges.
Every defect we find becomes a written rule or an automated check.
Compliance-relevant code cites the regulation it follows, for health, tax, labour and privacy reviews.