Scrivio Interview library
LeadershipPrincipal5 min read · updated 12 November 2026

Should your company build its own identity platform on Spring Authorization Server or buy a commercial identity provider? Make the case for both and how you would decide.

Building on Spring Authorization Server gives full control, no per-user licence and deep integration, but we own security, availability, MFA, compliance and the staff to run it for as long as the company exists. Buying gives features and certifications ready with a small team, at a cost per user, with vendor limits and lock-in. Because identity is a security-critical, always-on system, I would decide on five-year total cost including incidents and audits and on our real operating capability, and keep applications on standard OIDC and OAuth2 so we can change later.

Why this question is asked

Build-or-buy questions sound like procurement, but for identity they are architecture: whichever we choose, every application will depend on it, every login will pass through it, and moving away later is a multi-year project. Interviewers ask this at senior level to see whether we can argue both sides honestly and decide with evidence rather than preference. In this answer, we will make the case for building, make the case for buying, explain why operating capability matters most, compare five-year costs with an example, and set the rules that keep the decision reversible.

1The Case for Building

Spring Authorization Server gives us the standard OAuth 2.1 and OpenID Connect endpoints as a framework on a stack our engineers already know. Building on it means full control: we can add unusual grant types or claims, embed the server into a product we sell, keep all data in our own regions, and integrate deeply with internal systems such as entitlement databases. There is no per-user licence, which matters a great deal for a consumer product with ten million users, where per-user pricing can reach millions a year.

Those are real advantages, and for some companies they are decisive. An identity vendor's roadmap will never match ours exactly.

2The Case for Buying

A commercial identity provider gives us, on day one, the parts that are hardest to build well: MFA and passkeys, account recovery, brute-force and credential-stuffing protection, anomaly detection, admin consoles, audit logs, and certifications such as SOC 2 or ISO 27001 that our customers' auditors ask for. A small team can run it, because the vendor runs the servers and patches them.

The costs are a price per user or per active user that grows with the business, limits on what we can customise, data residency questions in some markets, and lock-in through proprietary features such as rules engines and hosted login pages.

3Why Operating Capability Matters Most

The trap in this decision is to compare the cost of building the first version with the licence. Writing the first version on Spring Authorization Server might take a team three to six months. But identity is a system that must be up 24 hours a day, because when it is down nobody can log in to anything, and it is the first target of every attacker. The real work starts after launch: patching within days of a vulnerability, rotating keys, defending against credential stuffing, keeping MFA methods current as passkeys replace SMS, passing audits every year, and having someone on call at 3 a.m. who understands the protocols.

So the deciding question is not whether we can build it, but whether we can run it securely for ten years, with people to spare when the original authors leave. If the honest answer is no, buying is the safer choice even if it costs more on paper.

4Comparing Five-Year Cost

We compare total cost over five years, not first-year cost, and we include the items people forget. A rough example for a company with 500,000 monthly active users helps show the shape.

Example five-year cost, 500,000 monthly active users
ItemBuild on Spring Authorization ServerBuy a managed provider
Initial build or integration4 engineers x 6 months2 engineers x 2 months
Licencesnoneper-user fee, e.g. 0.5 to 1.5 million over 5 years
Staff to operate3 to 4 people, on call, for 5 years1 to 2 people
Infrastructuremulti-zone servers, HSM or KMSincluded
Audits and pen testsours, every yearvendor reports, plus our integration
Incident riskours entirelyshared with vendor
Illustrative ranges only; the point is that staff and risk usually outweigh licences.

5How I Would Decide

I would start with requirements, written down: who logs in (employees, customers, partners), how many users in five years, which MFA and passkey features, which federation, which compliance regimes, which customisations are truly unique to us. Then I would price both options over five years with the table above, and score the risks: our hiring market for identity engineers, the vendor's financial stability, and data residency.

A common outcome is a split: buy for workforce and standard customer login, and run Spring Authorization Server for a narrow purpose where its control pays off, such as a token service for machine clients or an embedded server in a product. Whatever we choose, I would make it reversible. Applications speak only standard OIDC and OAuth2 through Spring Security, never a vendor SDK; tokens follow our own claims contract; and vendor-specific features stay at the edge. Then a later move, in either direction, is a migration of the provider rather than a rewrite of every application.

6Follow-up questions

What would make you choose to build despite the operating cost?

A product requirement no vendor can meet, such as shipping an authorization server inside software customers run themselves, or a scale where per-user licences clearly exceed a well-staffed team, combined with a company that already runs security-critical infrastructure with strong on-call and security engineering.

How do you avoid lock-in if you buy?

Applications talk to the provider only through standard protocols, user data can be exported, custom logic lives in our code rather than in the vendor's scripting features, and we test once a year that our resource servers could trust a different issuer with only configuration changes.

Who should make the final decision?

The architecture lead brings the analysis, but security, finance and the product owners must agree, because the choice sets risk, budget and user experience for years. Writing down the reasons also helps when the decision is revisited at contract renewal.

7Conclusion

In this answer, we argued both sides. Building on Spring Authorization Server gives control, deep integration and no licence fees, but makes us responsible for security, availability, MFA and compliance forever. Buying gives ready features and certifications with fewer staff, at per-user cost with vendor limits and lock-in. Because identity is security-critical and always on, we decided on five-year total cost including staff, incidents and audits and on our real capability to operate it, and kept applications on standard OIDC and OAuth2 so the choice can change.

What to say in the interviewAbout 80 seconds aloud

Open with

I would make both cases honestly. Building on Spring Authorization Server gives us full control over flows and claims, deep integration with our systems, data where we want it, and no per-user licence, which matters at consumer scale.

Then, if they want more

But we then own security patching, key management, high availability, MFA and passkeys, account recovery, abuse protection, audits and on-call, for as long as the company exists. Buying gives us those features and certifications on day one with a small team, at a per-user price, with limits on customisation and some lock-in.

The deciding factor for me is operating capability, because identity is security-critical and always on: if it is down, nobody logs in to anything. So I compare total cost over five years, including the staff to run it, audits, pen tests and the risk of incidents, not just build effort against licences.

Often the answer is to buy for workforce and standard customer login and use Spring Authorization Server for a narrow case, like a machine-to-machine token service. Whichever we pick, I keep applications on standard OIDC and OAuth2 through Spring Security and our own claims contract, so changing provider later is a migration, not a rewrite.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Should your company build its own identity platform on Spring Authorization Server or...": https://scrivio-interview-library.netlify.app/spring-boot/oauth2-and-oidc/455d159a32/