Enterprise clients
A bigger client
The Northstar agent works, so your company now offers it to other institutes. The first to sign is Meridian Learning, a chain of 40 centres with its own IT team.
Northstar asked "does it answer well?". Big clients ask that, and then ask who can get in, where the data goes and how it connects to their systems. Clients like this are called enterprise clients.
- sign-in"Our staff won't remember another password. They sign in with their Meridian accounts."
- roles"Counsellors see their own centre. Only managers can download leads."
- data"Our leads must never mix with another client's."
- review"Our security lead, Sanjay, needs answers in writing before we sign."
- systems"Leads go into our CRM, not a spreadsheet."
Start with signing in.
Sign in with their accounts
With SSO (single sign-on), staff sign in to your dashboard with the accounts they already use at work. Your app never stores their passwords. Meridian's login system tells it who they are.
The big win is when someone leaves. IT switches off one account, and access ends everywhere at once.
She's signed in. What may she do?
Who can do what
Give each person a role, and write down what each role may do. Meridian has two: counsellors and managers.
Anything not written down is a no. That way a new feature is locked until you decide who gets it, not open by accident.
Now the rule Meridian cares about most.
Keep each client's data apart
Both clients' leads now sit in one database. Each client is called a tenant, and every row is labelled with its tenant.
Every query must filter by the tenant of the person signed in. Take the tenant from their sign-in, never from the request, so nobody can see another client's data by changing a web address. Then test it: sign in as each client and search for the other's leads.
Practise the numbers.
✏️ Practice E.1
Without SSO, every system a leaver used needs its own account switched off. With SSO, there's one account.
Pass the security review
Before a big client signs, their security team asks how you protect their data. This is a security review. Northstar wants one too now that the agent serves others, so Kevin runs it.
Answer only what's true. "We don't do that yet; here's the plan" beats a guess they'll find out later. Logging every view and download, with who and when, is called an audit log.
Last ask: their CRM.
Connect to their systems
Meridian's CRM has an API. Your code calls it to add each new lead. When a lead enrols, the CRM calls your web address to tell you. That call is a webhook.
Anyone can call a web address, so each webhook carries a signature made with a secret only the CRM and you know. CRMs also retry, so the same event can arrive twice. Each event has an ID: if you've seen it, do nothing.
Practise the numbers.
✏️ Practice E.2
A repeated event ID changes nothing. A bad signature is refused.
time = calls ÷ calls allowed per second
Do it for real
In the notebook, one store holds both clients' leads. You'll make a leak happen, write a test that catches it, and fix it.
Then you'll write the role rules, check sign-in tokens, handle fake and repeated webhooks, and keep an audit log you can show Kevin.
No API key needed. About 40 minutes.
Then check what stuck.
Check yourself
Four questions, all on new examples.
Back to Northstar
In interviews, expect at least one of these: SSO, keeping tenants apart, or a security review. You now have an answer, and code, for each.