Knowby, 2022 to now
Knowby security and compliance: SSO, SCIM provisioning and SOC 2 Type II experience.
Enterprise IT teams approve software that fits their identity systems and passes their security review. For Knowby we built single sign-on, SCIM 2.0 provisioning, an OAuth 2.1 server for AI assistants, hashed personal access tokens, rate limits and tenant isolation tests, and we led the organisation through SOC 2 Type II. We designed, architected and developed the Knowby platform, from the mobile apps to the backend services.
- Owner
- Knowby
- Industry
- Work instructions for manufacturing, logistics and utilities
- Services
- Identity and access, security engineering, compliance, technical leadership
- Platforms
- .NET 10, PostgreSQL, Firebase Authentication (multi-tenant), Google Cloud, Microsoft Entra ID, Okta, Google Workspace
- Our role
- We designed, architected and developed the Knowby platform, from the mobile apps to the backend services, and led the organisation through SOC 2 Type II.
The challenge
Knowby sells to enterprises in industries such as manufacturing, logistics and utilities. Before a large customer rolls out a platform to its workforce, its IT and security teams ask hard questions. Can our people sign in with our identity provider? When someone leaves, are they removed automatically? How are tokens stored? Can one customer ever see another's data? Is there an independent audit?
An early-stage product rarely has good answers. It had to become a multi-tenant SaaS that enterprise IT would approve, without slowing the product down or making it painful for small customers who just want to sign in with Google.
Our approach
We treated security as part of the architecture, not a checklist at the end. Every request is scoped to an organisation, and identity lives in its own service, separate from the product API. Every secret we issue is stored only as a hash. And we prove isolation with tests that run against real APIs, not mocks, so a regression fails the build rather than reaching a customer.
For compliance, we built the controls first and the evidence alongside them, so SOC 2 Type II became a record of how we already worked. That's the approach we bring to technical leadership: security and compliance as engineering practice, owned by the people who build the system.
What we built
Single sign-on that enterprises expect
Knowby supports SAML and OIDC single sign-on, plus Microsoft, Google and Apple sign-in, through Firebase Authentication with a tenant for each organisation that configures SSO. A blocking function runs before any account is created: if an email already belongs to an SSO provider, a password account for that email is refused, so people can't get around their organisation's SSO. The check treats anything that isn't a password as SSO, so new providers are covered automatically. Organisations can also enforce SSO-only sign-in.
SCIM 2.0 provisioning
Knowby implements SCIM 2.0 (RFC 7643 and 7644) so Microsoft Entra ID, Okta and Google Workspace can add, update and remove members as people join, change or leave. It supports user create, read, update, deactivate and delete, filtering by userName or externalId, PATCH and bulk operations. Turning SCIM on for an organisation with existing members is safe: the identity provider matches people by email on the first sync, Knowby links them and records their external ID, and a duplicate create returns 409 as the cue to match. Deprovisioning removes the member from the organisation, and removes the account entirely only if it was their last one. The SCIM bearer token is shown once, and rotating it invalidates the old one immediately. Roles stay in Knowby on purpose: provisioned users start as members, and admins are promoted inside the product.
An OAuth 2.1 server and hashed tokens
Knowby's MCP server lets AI assistants such as Claude, ChatGPT and Copilot work with guides, so Knowby needed its own OAuth 2.1 authorisation server. It accepts only PKCE with S256, issues single-use authorisation codes that expire within a minute, short-lived access tokens and longer-lived refresh tokens, and stores only SHA-256 hashes of every code and token. Personal access tokens for integrations follow the same rule: shown once, stored as a hash, optionally set to expire, and checked on every use against the member still belonging to the organisation. Each token type has a recognisable prefix, so secret scanners can catch one that leaks into a repository.
Isolation, limits and safe fetching
Cross-organisation isolation tests prove that one tenant's token gets nothing from another tenant, through the Pro API and end to end through the MCP tools. Per-member rate limiting answers excess requests with 429 and a Retry-After header. Media is served through signed URLs that expire. Fetchers that download images or video from a URL guard against server-side request forgery, and the MCP app runs under a content security policy. Shared devices on the factory floor lock when idle.
Evidence for SOC 2 Type II
Around the code sit the controls an auditor looks for: role-based access with teams, AES-256 encryption at rest and TLS 1.2+ in transit, audit logging, an append-only history of every published version of a guide, records of every schedule change, Snyk container scanning, Dependabot dependency updates and Sentry error monitoring. We led the organisation through SOC 2 Type II, across all five Trust Service Criteria.
Architecture
Identity in its own service, every request scoped to a tenant.
- Identity providerEntra ID, Okta or Google Workspace: SSO sign-in and SCIM sync
- Firebase AuthA tenant per organisation; password accounts blocked where SSO exists
- Identity serviceMembers, roles, teams, SCIM, OAuth 2.1 and personal access tokens
- Product APIsEvery request scoped to an organisation and rate-limited per member
- EvidenceAudit logs, version history, scans and monitoring for SOC 2 Type II
No plaintext token, code or SCIM secret is stored. Only hashes are.
Results
- SOC 2Type II experience: we led the organisation through it
- 5Trust Service Criteria covered
- 3identity providers with SCIM set-up guides: Entra ID, Okta and Google Workspace
Under the hood
Standards first, implemented and tested in our own code.
- SAML 2.0
- OpenID Connect
- SCIM 2.0
- OAuth 2.1
- PKCE (S256)
- Firebase Authentication
- Microsoft Entra ID
- Okta
- Google Workspace
- SHA-256 token hashing
- RBAC
- AES-256
- TLS 1.2+
- Snyk
- Dependabot
- Sentry
What we'd do now
Never store a secret you can verify by hash. Access tokens, refresh tokens, codes, SCIM tokens and API keys only need to be compared, never read back. Hash them, show them once, give them a prefix so scanners can spot a leak, and make rotation instant. If your database leaks, nothing in it should let anyone sign in.
Make provisioning idempotent and reversible. Most SCIM bugs we see come from turning it on for an organisation that already has users, which creates duplicates. Match first, link, then manage. And be careful with deletion: removing someone from one organisation shouldn't delete their whole account if they belong to another.
Test isolation like a feature. Multi-tenant data leaks are rarely clever attacks; they're a missing WHERE clause. Write tests where a real member of two organisations uses one organisation's token to ask for the other's data, and expect nothing back. Run them on every change, including the new surfaces such as AI tools. If we were doing it again, we'd also add group-to-role mapping in SCIM for larger customers, and continuous control monitoring so audit evidence collects itself.
Why it matters now
Every SaaS product that sells to enterprise or government meets the same security review. We build the identity, provisioning and audit features that get a product through it, and we bring SOC 2 Type II experience to the controls and evidence around them. That's part of our web and SaaS platform work and our technical leadership.
It's also what lets AI work in regulated places. Knowby's MCP server for AI assistants sits behind the same OAuth 2.1 server and isolation tests, alongside the self-hosted AI that keeps customer content away from third-party AI providers.
Questions
Does Knowby support SCIM provisioning?
Yes. Knowby implements SCIM 2.0 for Microsoft Entra ID, Okta and Google Workspace, with user create, update, deactivate and delete, filtering, PATCH and bulk operations.
Which single sign-on options did you build?
SAML and OIDC single sign-on, plus Microsoft, Google and Apple sign-in, through multi-tenant Firebase Authentication, with password accounts blocked where an SSO identity exists.
Do you hold your own SOC 2 report?
Not yet. We have SOC 2 Type II experience: we led Knowby through SOC 2 Type II across all five Trust Service Criteria.
Can you prepare our product for an enterprise security review?
Yes. We build SSO, SCIM, token handling, tenant isolation tests and audit logging, and help put the controls and evidence in place for frameworks such as SOC 2.
Related
The services behind this work, and more stories like it.
Services
Case studies
KnowbyFilm the task once. Get the guide in minutes. Offline-first apps, self-hosted AI that turns a narrated video into a guide, and an MCP server for AI assistants.
KnowbyRecurring work, live on every device. Schedules stored as rules, calendar invites, and one change event per person, with an offline calendar on iOS.
KnowbyDo the task once. Get the guide. A Chrome MV3 extension that records clicks and typing, and turns a web workflow into a step-by-step guide.
Bring us the hard problem.
A 45-minute discovery call with the engineer who'll build it.