Self-hosted SSO means your organization runs the identity provider (IdP) that signs users in to every connected application, on infrastructure you control. It keeps identity data, signing keys and policy inside your boundary, and it makes you the owner of uptime, patching and incident response for the one service every other system depends on. This guide covers how it works, what a sound deployment contains, what U.S. guidance expects of signing keys, and how to decide whether to operate it yourself.
TL;DR
- Self-hosted SSO (also called on-prem SSO, or self-hosted authentication when the scope is login only) is an IdP you deploy and operate, speaking SAML 2.0 and OpenID Connect (OIDC) to your applications.
- Treat it as a tier-zero service: if it fails or is compromised, every application behind it is affected at once.
- A production design needs at least two IdP nodes in separate zones, a replicated database, a hardened reverse proxy, directory connectors, MFA and log export to your SIEM.
- U.S. federal guidance sets a floor for assertion-signing key storage and favors phishing-resistant MFA; commercial teams can use it as a benchmark.
- The hard part is not installing the IdP. It is connecting your custom and legacy systems to it cleanly and keeping them connected.
What self-hosted SSO actually is
Single sign-on lets a user authenticate once and reach many applications. The applications (service providers or relying parties) never see a password. They trust a signed statement from the IdP.
The terms in the search results overlap, but the emphasis differs. “On-prem SSO” stresses where the software runs: your data center or private cloud. “Self-hosted authentication” often means a narrower login layer for one product or a small stack. “Self-hosted SSO” is the organization-wide version. One glossary defines it as a deployment the organization runs and maintains itself, owning uptime, patching, scaling, federation edge cases, logging and incident response.
That definition explains why teams choose it: data residency, regulatory boundaries, air-gapped networks, or a need to shape login flows around proprietary workflows. It also explains the cost. The same glossary argues for treating the service as tier zero, because a stolen session, a forged assertion or an abused recovery workflow can cascade to downstream systems without re-authentication.
How the sign-in flow works
The sequence is the same whichever product you pick:
- A user opens an application that has no session for them.
- The application redirects the browser to the IdP.
- The IdP authenticates the user, including MFA, and sets its own session.
- The IdP returns a signed SAML assertion or an OIDC token.
- The application validates the signature and claims and opens a local session.
- When the user opens a second application, the IdP sees the existing session and issues a new token without another prompt.
CISA’s identity guidance notes that SAML moves authentication data through a signed assertion so service providers avoid storing passwords. It also warns that SAML and OAuth implementations can carry vulnerabilities, so patching has to cover both the SSO provider and the applications that rely on it.
Two terms worth separating: authentication answers who the user is, authorization answers what they may do. LDAP, the directory protocol many companies already run, usually serves as the user store behind the IdP rather than as the SSO protocol itself.
Choosing protocols: OIDC first, SAML where required
The U.S. federal Enterprise SSO playbook treats SAML (an XML-based standard for identity assertions) and OIDC (a JSON-based authentication layer on OAuth 2.0) as the two vendor-neutral standards. It recommends OIDC wherever the application supports it and keeping SAML for legacy applications that cannot.
That maps to a practical rule for a mixed estate:
| Situation | Protocol to use | Why |
|---|---|---|
| New internal tools, SPAs, mobile apps | OIDC | Simpler configuration, discovery endpoints, token-based |
| Purchased enterprise software with SAML only | SAML 2.0 | Often the only option offered |
| Custom legacy apps with no SSO support | Reverse-proxy forward auth, then refactor to OIDC | Protects the app now, removes the proxy dependency later |
For browser and mobile clients, one design guide recommends the Authorization Code flow with PKCE, exact pre-registered redirect URIs, state and nonce binding, signing-key rotation, and separate lifetimes for IdP session, application session, access token and refresh token. Those are the settings that usually get left at defaults and later cause trouble.
Configuration differs by protocol. SAML trust is set up by exchanging metadata files with keys and endpoints, while OIDC is often more automated through discovery. In both cases the playbook calls for a non-production test cycle after each application is configured, covering a test account, assertion integrity and automated provisioning and de-provisioning.
What a production deployment contains
A single container running an IdP is a lab. A production design for workforce SSO is closer to this:
- Two or more IdP nodes in separate availability zones, sharing session state.
- A replicated database with automated failover and a point-in-time restore you have actually rehearsed.
- A reverse proxy that terminates TLS and keeps administrative endpoints off the public internet.
- Directory connectors to Active Directory, LDAP or the HR system, with tested handling for disabled, moved and deleted accounts.
- An MFA tier (TOTP, WebAuthn, FIDO2) inside the authentication flow.
- Structured logs and metrics exported to the SIEM, with alerts on the logging pipeline itself.
The same guide stresses that if the cluster loses quorum or its only zone fails, every OIDC and SAML relying party loses sign-in at once. It also argues that the failover test matters more than node count, and that an MFA setting that fails open when the MFA service is unreachable quietly removes the control. Products differ in clustering and session models, so the topology has to be confirmed against vendor documentation and load tests before sizing.
Vendor deployment documentation has said the same about exposure for years: place a reverse proxy in the DMZ so users reach only the service URLs, never the configuration or user data stores, as in this deployment planning guide.
If you plan to run it in a network with no outside connectivity, the same constraints apply with extra steps for updates and certificates; our notes on air-gapped deployment cover that environment, and the broader picture is in our guide to self-hosted enterprise software.
U.S. guidance on signing keys and assurance levels
The signing key is the crown jewel. Anyone who holds it can forge assertions that every integrated application will accept. The federal playbook states that NIST SP 800-63C-4, published in July 2025, requires at minimum FIPS 140 level 1 storage for assertion-signing keys at federation assurance levels 2 and 3. It strongly recommends hardware that prevents export of private keys, such as a FIPS 140 level 2 or higher HSM or TPM. It also prioritizes phishing-resistant MFA at authenticator assurance level 2 or higher.

These rules bind federal agencies, not private companies. They are still a useful benchmark for banks, fintechs and anyone handling regulated data, because auditors recognize them. The wider framework is NIST SP 800-63-4, the U.S. Digital Identity Guidelines, which defines the authentication assurance levels deployments are measured against.
If hardware-backed keys are on your roadmap, our four-phase HSM rollout walks through the sequence. For teams in finance, the financial data security practices article places identity inside the larger control set.
The operational burden, in concrete terms
Open-source IdPs carry no license fee, but they are not free to run. Four recurring duties decide whether self-hosting works.
Patching on the vendor’s clock. Keycloak, for example, now ships minor releases roughly quarterly, and the same comparison catalogs SAML-related vulnerabilities across several open-source IdPs, including signature-validation and assertion-handling flaws. Its conclusion is that enabling SAML means patching faster. Your process needs a path from advisory to production measured in days.
Stewardship and support. One independent review of Keycloak notes that the project assumes no operational responsibility for your installation: there is no SLA, no compliance certification coverage, and user and admin event storage is off by default. Licensing and foundation hosting keep the code open, but the support model is yours to build.
Onboarding every integration. Each application brings its own claim formats, certificate rotation schedule and quirks. That work never finishes, because applications are added and replaced all the time.
Audit scope. Once the IdP is yours, an auditor will ask how it is patched, backed up, monitored and access-controlled. Our SOC 2 overview for U.S. service organizations shows how that evidence is gathered.
Operational failure modes are also reputational ones: an identity outage reaches customers as downtime. For the customer-facing side of that trust, this piece on website security and customer trust is a good companion.
Does it pay off financially?
It depends mostly on scale and on in-house skills. One 2026 decision framework puts the crossover for teams with strong DevOps capability at 10,000 to 100,000 monthly active users: below that, operational overhead usually outweighs license savings; above 100,000, self-hosting nearly always wins on cost. It also notes that compliance certifications a managed vendor includes become line items you pay for yourself.
Those thresholds describe customer identity. For workforce SSO, the more useful question is how many internal applications you must connect, how many are custom, and how strict your data-location requirements are. A company with a dozen bespoke internal systems, a regulated data boundary and an existing platform team is the profile where self-hosting is rational.
Where the project really succeeds or fails: the integration layer
Installing the IdP takes days. The months go into connecting what sits behind it: the CRM that needs role claims, the finance system that must deprovision a leaver the same hour, the workflow engine that calls APIs on a user’s behalf. Teams that treat these as afterthoughts end up with a hardened IdP in front of applications that keep local passwords as a back door.
Three habits prevent that:
- Make SSO a requirement of every new system, not a retrofit. Specify OIDC support, group-to-role mapping and automated deprovisioning in the first scope document.
- Keep authorization in the application, authentication in the IdP. The IdP asserts who the user is and their groups; the application decides what those groups can do.
- Test the exit path. Disable an account in the directory and verify, application by application, that access ends. Our article on secure software integration covers the failure patterns.
What we think
At Bitecode we build custom business software from modular, ready-made components, with up to 60% of the baseline system pre-built, and our modules can be self-hosted. That vantage point shapes how we see SSO.
The identity provider is rarely the project’s bottleneck. Mature open-source options exist and the standards are settled. The bottleneck is a portfolio of internal systems, each with its own login logic, none designed to trust a central authority. A modular foundation is useful here because authentication boundaries, audit logging and role models are decided once rather than re-invented per application.
Our position is to design the systems around the identity layer, not bolt them on afterward: OIDC as the default contract, roles that map cleanly to directory groups, and audit-ready logging. Self-hosting then becomes a deliberate control choice rather than an accumulating maintenance burden.
Bitecode
Bringing your systems into the SSO design
If your plan involves new internal systems, a CRM, financial processing or workflow automation that must live inside your own boundary, the integration contract is cheapest to set at design time. Bitecode builds custom business software and advanced cloud applications from modular components, including AI assistant, financial, automation, CRM and token modules, with self-hosted functionality and audit-ready design.

To scope a project where identity, roles and audit trails are part of the architecture from day one, start from our project overview and describe the systems you need connected.
A decision checklist before you commit
- Data boundary: Does regulation or contract require identity data and signing keys to stay on your infrastructure?
- Team capacity: Can you staff patching within days, on-call for the IdP and rehearsed restores?
- Estate shape: How many applications are custom, and can they speak OIDC or SAML?
- Availability target: Are you prepared to run multi-zone, with a tested failover?
- Key custody: Will assertion-signing keys sit in an HSM or TPM, as federal guidance recommends for higher assurance levels?
- Audit: Who will produce the evidence an auditor asks for?
If most answers are yes, self-hosting fits. Where the estate is mostly custom systems, the integration plan deserves as much attention as the product choice.
FAQ
Is on-prem SSO the same as self-hosted SSO?
In practice they describe the same model: you operate the identity provider yourself. “On-prem” emphasizes your own data center, while “self-hosted” also covers a private cloud account you control. Either way you own availability, patching and incident response.
Which protocol should a new self-hosted deployment use?
Use OIDC wherever the application supports it, and keep SAML 2.0 for software that only offers it. This matches the federal SSO playbook, which also expects both to be supported for legacy applications.
Can legacy applications with no SSO support be protected?
Yes. A reverse proxy can enforce sign-in in front of the application through forward authentication, which buys time until the application is refactored to speak OIDC. Plan the refactor, since the proxy then becomes another dependency.
What happens if the identity provider goes down?
Every application that relies on it loses sign-in at once, which is why a multi-zone design with a rehearsed failover matters more than the node count. Decide in advance how emergency administrator access works and keep it separate from the primary path.
Sources
- Self-hosted SSO definition, nhimg.org
- Hybrid Identity Solutions Guidance, CISA
- Enterprise Single Sign-On Playbook, IDManagement.gov
- Self-hosted SSO design guide, gescco
- Self-hosted open source SSO implementation, DeployOpen
- Deployment Planning Guide, OpenAM 13.5
- Digital Identity Guidelines, NIST SP 800-63-4
- Keycloak and its alternatives, revisit.tech
- Keycloak review, OpenTechHub
- Build vs Buy CIAM framework, Deepak Gupta
