Security and compliance first

Enterprise-grade identity and security, at the cost that fits.

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.

Talk about your securitySecurity topics and videos

Secure by design

Decided at the whiteboard, enforced in the pipeline.

Threat model first

List who could attack and how before writing code, then design the defences in.

Least privilege everywhere

People, services and AI agents get only the access they need.

No secrets in code

Keys live in a vault or environment, are rotated, and are scanned for on every change.

Every merge is scanned

Code, dependency, secret and infrastructure checks must pass before anything ships.

Identity done right

One login, strong proof, clean access.

Single sign-on for every app

OpenID Connect and SAML so staff and customers sign in once.

MFA and passkeys

Phishing-resistant sign-in, with stronger checks when risk is higher.

Automatic joiners and leavers

SCIM creates and removes accounts the moment HR says so.

Roles and tenants that hold

Fine-grained roles, and one customer can never see another's data.

Compliance built in

Health, tax, labour and privacy law, designed for audit.

Sensitive data labelled

Personal and health fields are tagged, encrypted and kept out of logs.

Every access recorded

Who viewed or changed a sensitive record is logged automatically.

Retention and erasure

Data is kept only as long as the law says, and deleted on request.

Rules traced to the law

Code required by a regulation names it, so reviews are fast.

Cost-smart choices

Pay for licences only where they earn it.

Okta where it pays off

Large workforces and strict SLAs: less to run, more built in.

Keycloak where cost matters

No per-user licence; full control. You pay in operations instead.

Standards keep you free

OIDC, SAML and SCIM mean moving between providers is configuration, not a rewrite.

Run it like production

High availability, backups, monitoring and upgrades planned from the start.

What runs before code ships

Every change, written by a person or an AI agent, passes the same automated gates. If one fails, it doesn't merge.

  1. 1

    Before a commit

    Secret scanning and hooks stop mistakes on the laptop, and the same hooks gate AI agents.

    • gitleaks
    • pre-commit hooks
    • Claude Code hooks
  2. 2

    Every pull request

    Static analysis with custom rules for our own conventions, plus dependency and infrastructure scans.

    • Semgrep
    • CodeQL
    • Trivy
    • Checkov
  3. 3

    Standards checks

    Custom checks for forms, tenant isolation, architecture and database migrations. Baselines can only shrink.

    • ArchUnit
    • custom lint ratchets
  4. 4

    Tests

    Unit, integration and end-to-end tests, including tries at reading another tenant's data.

    • JUnit
    • Testcontainers
    • Playwright
  5. 5

    Every build

    A bill of materials for each build, an image scan and a licence check.

    • CycloneDX SBOM
    • Trivy image
  6. 6

    Before release

    A dynamic scan against a running copy, logged in as a real test user.

    • OWASP ZAP
  7. 7

    In production

    A web firewall at the edge, alerts, and nightly re-scans for newly found vulnerabilities.

    • WAF
    • Dependabot
    • nightly scans

Compliance by sector, attested in the software

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.

  1. 1

    Tagged with the law

    Each regulated screen, rule or report names the act and clause it implements, in the code itself.

  2. 2

    Reviewed every year

    Every tag records the fiscal year it was last checked. A dashboard flags anything not reviewed since the latest Finance Act.

  3. 3

    Admins attest

    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.

  4. 4

    No hard-coded limits

    Tax rates, thresholds and retention periods come from a versioned table per fiscal year, so a law change is data, not a code release.

Healthcare

  • HIPAA-style PHI safeguards
  • NABH-aligned workflows
  • HMIS / DHIS2 reporting
  • Patient data encrypted, and every record view logged
  • Break-glass emergency access raises an alert and an audit entry
  • Government health reports keep their fixed official format
FeatureLaw or standardHow it is attested
Patient recordsHIPAA-style PHI safeguardsEncrypted fields; every view logged; break-glass audited
Government health reportsMinistry of Health HMIS / DHIS2Fixed official format, tagged and reviewed yearly

Pharmacy

  • Nepal Drug Act 2035
  • stock and expiry traceability
  • Batch, expiry and dispensing tracked end to end
  • Legal limits read from a versioned rule table, never hard-coded
FeatureLaw or standardHow it is attested
Drug samplesNepal Drug Act 2035Value cap from the versioned rule table
Batches and expiryDrug traceability practiceTracked from purchase to dispensing

Finance and tax

  • IRD e-billing (CBMS)
  • VAT Act
  • Income Tax Act
  • NFRS / IFRS
  • Electronic Transactions Act 2063
  • Invoices in IRD's prescribed formats, with a tamper-evident hash chain
  • Tax rates and thresholds versioned by fiscal year
  • Retention periods follow the VAT Act
FeatureLaw or standardHow it is attested
Sales and purchase invoicesIRD e-billing (CBMS), VAT ActAdmin attestation before issuing; IRD-prescribed format
Credit and debit notesVAT Act and IRD rulesAdmin attestation; tamper-evident hash chain
Invoice and ledger storageVAT Act §16, Electronic Transactions Act 2063Retention period from the versioned rule table
TDS on vendor paymentsIncome Tax Act §88Rates versioned by fiscal year
Fixed-asset depreciationIncome Tax Act, Schedule 2Pool rates versioned by fiscal year

HR and payroll

  • Income Tax Act (TDS on salary)
  • Labour rules
  • employee data privacy
  • Salary, bank and PAN fields encrypted and never logged
  • Payroll tax from versioned rates
  • Employees export their own data through self-service
FeatureLaw or standardHow it is attested
Payroll tax (TDS on salary)Income Tax Act §88Rates and slabs versioned by fiscal year
Salary, bank and PAN detailsIndividual Privacy Act 2075Encrypted, tagged as financial data, never logged
Employee data requestsIndividual Privacy Act 2075Self-service export of an employee's own data

Recruitment

  • Department of Foreign Employment rules
  • work permits and visas
  • Steps that need a legal attestation are checked and recorded
  • Candidate documents checked for type and size, and kept only as long as allowed
FeatureLaw or standardHow it is attested
Foreign employment, work permits, visasDepartment of Foreign Employment rulesAdmin attestation before each regulated step
Candidate documentsIndividual Privacy Act 2075Type and size checked; retention scheduled

Privacy

  • Individual Privacy Act 2075
  • GDPR principles
  • OWASP
  • Personal data tagged by category, minimum needed, consent before extra use
  • Right to erasure and data export
  • No personal data in logs, URLs or AI prompts
FeatureLaw or standardHow it is attested
Personal data everywhereIndividual Privacy Act 2075Fields tagged by category; consent, export and erasure
Logs and AI promptsPrivacy by designPersonal data filtered out before logging or prompting

Accessibility and language

  • WCAG 2.2 AA
  • English and Nepali
  • BS / AD dates
  • responsive
  • Keyboard and screen-reader friendly, checked with automated tests
  • Nepali where customers need it; dates switch between Bikram Sambat and AD
  • Works from phone to desktop, tuned for Nepal-to-cloud latency
FeatureLaw or standardHow it is attested
Every pageWCAG 2.2 AALabels, focus and contrast checked in automated tests
DatesBikram Sambat and ADStored as AD, shown in both calendars
Customer-facing screensEnglish and NepaliTranslated where customers need it

Okta features, open-source options

Same standards, different trade-offs. I help pick per need, and many teams mix both.

You needOn Okta / Auth0Open-source optionWorth knowing
Single sign-on (OIDC, SAML)Okta SSO, Auth0Keycloak (or Zitadel, Ory)Standards-based on both sides
MFA and passkeysOkta Verify, adaptive MFAKeycloak OTP + WebAuthnRisk-based rules need custom flows
Social and enterprise loginAuth0 connections, IdP routingKeycloak identity brokeringGoogle, Microsoft, Okta, SAML IdPs
User provisioning (SCIM)Okta Lifecycle ManagementKeycloak with a SCIM extensionCommunity extensions; test before production
Branded customer loginAuth0 Universal LoginKeycloak themesFull control of the HTML
Fine-grained permissionsOkta FGAOpenFGASame relationship-based model
API access tokensOkta API Access ManagementKeycloak clients and scopesPair with an API gateway
Directory and user storeUniversal DirectoryKeycloak + LDAP / AD federationKeep existing directories
Identity automationOkta WorkflowsEvent listeners or n8nMore build, no per-flow fees
Threat protectionThreatInsight, Identity Threat ProtectionBrute-force detection + WAF + SIEM alertsNeeds monitoring you own

How I apply this on a multi-sector SaaS

A multi-tenant platform for hospitals and businesses: patient records, pharmacy, accounting and tax, payroll and HR, and recruitment. Generic, but real.

  1. 1

    Tenants can't cross

    Isolation enforced in the database and in every query, with tests that try to break it.

  2. 2

    Open-source SSO

    Keycloak gives staff single sign-on and MFA with no per-user licence.

  3. 3

    Health data protected

    Patient fields are encrypted, and every read of a record is logged.

  4. 4

    A security gate in CI

    Static analysis, dependency, secret and infrastructure scans block risky merges.

  5. 5

    Rules from real incidents

    Every defect we find becomes a written rule or an automated check.

  6. 6

    Designed for audits

    Compliance-relevant code cites the regulation it follows, for health, tax, labour and privacy reviews.

↑ ↓ navigate · ↵ select · esc close