The many problems with implementing Single Sign-On
stackoverflow.blog
stackoverflow.blog
Everyone likes to gripe (including here in this thread!) about B2B charging for Enterprise features like SSO, but withhold your judgement until you've actually lived through supporting it. The burden of helping a company like Meta integrate their weird, bespoke, homegrown identity solution into your business app could literally cost your business tens of thousands of dollars per year (and no, that's not a made up example).
Pricing is tricky, and as you said, people complain a lot. Since this is because we all have different points of view, we will never agree. But there are some things that most of us should agree, like the fact that we need to raise the security standards. Then the question is what we can do as a community - besides trying to avoid being on the sso.tax list.
This comment pretty much exactly describes why we're building WorkOS. Developing enterprise features yourself in-house is super time consuming and ends up being a huge drag on product development. We essentially want to provide "Stripe for enterprise features" so developers don't need to do this repeated work.
It's a surprisingly complex problem. We've been working on it for over 3 years[0] and still have a ton more work to do. This is not something you can hack together in a few months or solve with an open source package. Thankfully we are really well funded[1] with a long runway and hundreds of customers.
It also doesn't stop with SSO and SCIM. You end up needing of other stuff including authorization, permissions, encryption, compliance, and audit logs (which incidentally we launched today[2]).
[0] https://news.ycombinator.com/item?id=22607402
[1] https://workos.com/blog/series-b
[2] https://workos.com/audit-logs
(As a total aside, I agree it's not very clear this blog post is sponsored content. Will see if we can get the StackOverflow editorial team to make it more clear. We just wanted to use our marketing budget to ship something genuinely useful. ;))
I could dissect some of the comments in the blog post (doesn't seem to even touch oAuth) but I don't feel it's worthwhile.
Yes - implementing SSO is not trivial. But it significantly reduces risks for businesses who generally have staff turnover and need to protect company data. If you are planning to do B2B it really is table stakes these days.
p.s. please don't consider adding yourself to https://sso.tax/. :(
It took an entire meeting to get our stakeholders to understand the unfortunate implications of single sign out... Also, asking the question "do all your SSO apps operate in the same security context" was a great way to summon some additional dragons.
We ultimately wound up at something where SAML can initiate sessions in our application, but the user is forced to re-authenticate with the IdP every time (so we eliminated the first S). Additionally, once a session is initiated, there is no taking it back from an IdP perspective. The only way to revoke a session is from our software via an internal timeout or application-specific logout action.
So, really all we've done is implement same sign-on. Single sign-on is emerging as some sort of fantasy timeline where everyone still works in a secure physical office and can associate shared tokens to a time clock or badge system.
What are the implications?
When it comes to SSO, "buy" instead of "build", and focus on the core value proposition of the service with that saved time and resources.
We haven’t built an API for it though, instead opting for a UI that walks the end-user through the steps of integrating with their IDP. That’s partially because every IDP is so different that we felt you really need a UI to show exactly what to do.
It's essentially a hosted UI that allows end-customers to fully configure SSO/SCIM/etc.
Demo: https://demo.workos.com/
(I work at WorkOS. :))
To adopt an OSS approach for SSO, the startup still needs to dedicate resources to researching the OSS options, deploying the OSS, integrating it, and most importantly, operating it.
Once the startup gets into the weeds of integrating SSO functionality with customer's IdPs, in the limit, the cost of the effort will start to approach "Build".
What I would be interested to know is: What open source alternatives exist which tackle this problem and how battle-tested are they (esp. given than SSO differs between org to org)? With a product I built, I just paid the Okta tax and had Okta handle all the complexity of integrating with external systems while providing a single interface for me to interact with (which on the surface is the same thing WorkOS promises), but if I'm inclined to build this out myself, what are the alternatives?
I see a lot of devs, especially on HN, complain about http://sso.tax, but until you build a product for exterprise, you'll really not understand the time and effort this takes (and all of this takes away time and effort that could be spent building your product)
There are good open source solutions that let you plug and play these enterprise features (I am biased here). But instead of thinking about the problems with implementing Single Sign-On, I think we should focus on a bigger problem: How can we make security accessible and simple for developers? I am not saying don't charge for SSO, I know it helps startups be sustainable, but here is where I truly believe that open source is one of the key answers.
Setting it up with Google auth took me only 30 minutes or so for static pages (details at https://huijzer.xyz/posts/static-site-auth/), but I have no idea how good it would be for securing a service in production.
In most cases, I see B2B offerings supporting SAML + SCIM which helps cover the authentication (AuthN) and authorization (AuthZ) pieces of the puzzle. Or you use oAuth.
Most SAAS products also need to map users to what they can do within the app so they need the concept of roles, permissions, etc. It can get quite complex, quite quickly. Something you typically don't need with single user accounts.
Good luck with that when your boss expects it to be done by tomorrow.
Way easier, I might mention, than using the other product this guy mentions, Nylas, which is... difficult.
It’s an ad. Is that how StackOverflow makes money?
What about OAuth2? I had very little issue building auth integration with both Okta and Google using OAuth, and storing the non-secret stuff about the user in my DB.