TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

OAuth vs. SAML vs. OpenID Connect

123 pointsby willow9886over 8 years ago

14 comments

philipsover 8 years ago
&gt; If you are writing a new application, use OpenID Connect–skate to where the puck is going!<p>I am glad to see this advice. At CoreOS we have now built API servers, command line tools, and web apps using OpenID Connect and are happy with its development in Open Source and third-party services as well.<p>&gt; OAuth2 was left generic so that it could be applied to many authorization requirements,<p>When we started developing Dex[1] we lovingly referred to OpenID as &quot;OAUTH 2.0 with types&quot;.<p>Overall, from integrating OpenID Connect into our products, enabling Kubernetes[2] to use OpenID Connect Providers, and building both an OpenID Connect provider and clients we are pretty happy with the choice we made.<p>My only complaint is the name of OpenID Connect is simply confusing.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;coreos&#x2F;dex" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;coreos&#x2F;dex</a> [2] <a href="http:&#x2F;&#x2F;kubernetes.io&#x2F;docs&#x2F;admin&#x2F;authentication&#x2F;#openid-connect-tokens" rel="nofollow">http:&#x2F;&#x2F;kubernetes.io&#x2F;docs&#x2F;admin&#x2F;authentication&#x2F;#openid-conne...</a>
评论 #13127960 未加载
评论 #13129023 未加载
评论 #13127110 未加载
clintonbover 8 years ago
The problem with OIDC (from my point of view) is the lack of good libraries for Python&#x2F;Django projects. We ended up building our own atop the now-defunct django-oauth2-provider. Unfortunately, no one (myself and my company included) has committed to adding the functionality to the more-popular django-oauth-toolkit.<p>This has lead to our questioning the need for OIDC given that we can generate JWTs as access tokens. If the identity info is embedded in the access token, there is no need for the ID token and (more importantly) micro-services no longer need to check in with the authentication provider to validate bearer tokens.<p>I do like the discovery aspects of the OIDC protocol that make it easy to distribute public keys.
评论 #13134752 未加载
评论 #13131043 未加载
评论 #13134184 未加载
评论 #13130169 未加载
评论 #13141549 未加载
评论 #13128708 未加载
评论 #13129270 未加载
scwoodalover 8 years ago
Having recently been apart of a new SAML implementation, avoid it if you can.<p>The technology behind it feels solid (passing signed&#x2F;encrypted messages around) and using an Identity Provider like Active Directory is an easy choice but after that is where things get difficult.<p>The client support, at least in Python, is terrible and the resources to understand SAML are sparse. Everyone does something just a little bit different and there isn&#x27;t much choice.<p>We have some Django applications that needed to be SAML aware. While I was able to finally able to make it work after two weeks (yikes!!) most of my problems resulted in bugs within the client.<p>SAML requests can have more than one signing&#x2F;encryption certificate defined so when one certificate gets close to expiring you can add a second (or third...), let the first one expire then well behaved clients would automatically use the second one. Except when your client always grabs the first one and if the signing fails because the Idp signed the message with the other certificate and it doesn&#x27;t try the second one =(<p>Then debugging errors is cumbersome. Always pasting XML snippets and x509 certificates into tools to view the actual messages. Google&#x27;ing the error messages with little to nothing out there.<p>Perhaps it&#x27;s just a bad experience with a specific python module but given the complexity of SAML, little knowledge out there, I&#x27;d stick with CAS if given the choice. It might help the technology if whoever is behind it would maintain clients that adhere to the spec.
评论 #13130164 未加载
spydumover 8 years ago
Great write up. Dealing with my own employer and the constant confusion around oauth vs OIDC vs JWT, and having to explain they aren&#x27;t VS at all! They are all stacked on oauth itself, and don&#x27;t really have much to say about the actual <i>authentication</i> of a user (that is just up to the identity provider).
评论 #13127848 未加载
评论 #13130190 未加载
willow9886over 8 years ago
There&#x27;s been some discussion regarding the merits of using JWT&#x27;s (JSON Web Tokens) instead of Connect. Mike added some clarification in the form of a comment on the blog.<p>I also added it here [1]. Feel free to join the discussion on the blog.[2]<p>[1] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13134752" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13134752</a><p>[2] <a href="https:&#x2F;&#x2F;www.gluu.org&#x2F;blog&#x2F;oauth-vs-saml-vs-openid-connect&#x2F;#comment-3042980417" rel="nofollow">https:&#x2F;&#x2F;www.gluu.org&#x2F;blog&#x2F;oauth-vs-saml-vs-openid-connect&#x2F;#c...</a>
评论 #13188778 未加载
djedipusover 8 years ago
In defense of SAML for enterprise customers.<p>I built an enterprise site that needed SSO to work for a number of different enterprises.<p>I tried 3rd party solutions, ping fedeate, Auth0, Azure etc. and these were nightmares to configure and get working.<p>Turns out it was way easier just to read the SAML RFC and handle the tokens myself.<p>SAML 2.0 is finally old enough that most enterprises support it.<p>So for me Enterprise SSO is a solved problem. For others having a hard time finding 3rd party plugins &#x2F; services etc. I highly recommend whipping out the RFC and DIYing a solution. Only took me a couple of days. Far less than what I spent on other solutions.
koliberover 8 years ago
I can only speak to OAuth and SAML. I&#x27;ve done many integrations of each.<p>OAuth is a bit easier to understand.<p>SAML is tougher to grasp. I think it is a terminology and flexibility thing. It seems like each vendor or implementation is using their own terms for the same things. SAML has many super configurable levers, but in reality people tend to use only one or two common variants.<p>SAML is nice that it does not require a direct access between the backends of the client system (SP, or service provider) and the identity provider. All data flows through the web browser. As long as the web browser can access the identity provider (often on a private network) and the client system, it can work.<p>As far as different people implementing SAML in different ways, it is absolutely true. Getting two systems to work together takes real effort. I&#x27;ve had similar, albeit less fatiguing, issues integrating OAuth. One system has exact redirect URLs; others have partial matching some; some require the redirect URL in each call, others in some; and then there&#x27;s the case where human intervention is required to deliver data that would normally be sent to the redirect URL (Looking at you AWeber!). At least in the OAuth world, people call a duck a duck and it is usually clear what is being referred to.<p>I&#x27;m by no means an expert in SAML (like with general relativity, I think there are only five people in the world that truly understand SAML), but have a good working practical grasp of the technology.
评论 #13136422 未加载
fusiongyroover 8 years ago
Interesting. I have used CAS extensively and was involved in building SAML support for a commercial app at one time. I didn&#x27;t understand the post-binding thing really at all--CAS mostly uses the back channel method.<p>My experience with SAML was that, not only was it a bear to get set up, the second client who wanted to use it was using a different SAML implementation and found things weren&#x27;t as standardized as we had assumed. Both implementations supplied a principal, only one supplied an email address by default. I think it got sorted out after I left.<p>I don&#x27;t love CAS a lot, but it is a lot more turnkey than SAML.<p>We&#x27;re investigating JWT now, but I have a feeling it will turn out to be an implementation detail within a larger solution that we haven&#x27;t even begun to conceive.<p>I&#x27;ve also implemented shitty poor-man&#x27;s federation on top of CAS. My recommendation there would be: don&#x27;t do it. If you need federation CAS really can&#x27;t help you, don&#x27;t hack on it.<p>The other thing I&#x27;ve learned is that none of these things is going to help you with authentication at all, and that tends to be something that isn&#x27;t well thought-out before implementation time comes.
评论 #13127706 未加载
评论 #13127656 未加载
tscs37over 8 years ago
I was a bit skeptical when I first heard about OpenID Connect, especially considering the failures of the first OpenID protocols.<p>I&#x27;m still looking for a decent OpenID server to run, but dex seems to be good enough.<p>I hope OIC catches on, I&#x27;d love some proper identity federation.
willow9886over 8 years ago
Thanks for all the upvotes everyone! If you&#x27;d like to connect with the author of the blog, Mike Schwartz, feel free to do so on LinkedIn: <a href="https:&#x2F;&#x2F;www.linkedin.com&#x2F;in&#x2F;nynymike" rel="nofollow">https:&#x2F;&#x2F;www.linkedin.com&#x2F;in&#x2F;nynymike</a>
chris_wotover 8 years ago
SAML is freaking hard to setup, and even worse to troubleshoot.
vittoreover 8 years ago
Anyone here knows of solid FOSS alternatives to gluu? Is there is something that is close to okta functionality-wise?
评论 #13127927 未加载
评论 #13128075 未加载
misja111over 8 years ago
When I try to open the link, it gives me the error &quot;Error opening database connection&quot;
评论 #13130142 未加载
intrasightover 8 years ago
I&#x27;m a fan of auth0 since it can glue all that identity stuff together.