7 ms·
The Difficulties of SAML Single Logout
- hirsin 6y agoAh, the dates of the comments at the bottom helped explain the lack of modern day issues we now hit - 3p cookie depreciation and the Chrome Samesite change. Both of these break logout, but certainly weren't a concern in 2008.
- mooreds 6y agoIt was last updated in 2017 per the date at the top, but yes, it's an older article. This post indicates that 3p cookie issues only affect SSO providers without a hostname that lives within the primary websites domains: https://blogs.akamai.com/2020/01/cookies-single-sign-on-and-you.html https://blogs.akamai.com/2020/01/cookies-single-sign-on-and-... (so SaaS offerings without domain masking). Is that your understanding? Here's an interesting post on the samesite implications: https://www.troyhunt.com/promiscuous-cookies-and-their-impending-death-via-the-samesite-policy/ https://www.troyhunt.com/promiscuous-cookies-and-their-impen...
- hirsin 6y agoYup, that's precisely it. We documented the login breaks from Samesite and 3p cookies, but logout was both not particularly a concern for folks (I've gotten about three inquiries in two years), and pointless to document tombstoning patterns for Samesite since ITP would break those anyway. https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-handle-samesite-cookie-changes-chrome-browser?tabs=dotnet https://docs.microsoft.com/en-us/azure/active-directory/deve...
- alfu 6y agoIs the conclusion to just use use SameSite=None? I did some research while back and found that shibboleth supports local storage for sessions [0], unfortunately the IdP+SP I'm using do not support such a thing. [0] https://wiki.shibboleth.net/confluence/display/DEV/IdP+SameSite+Testing https://wiki.shibboleth.net/confluence/display/DEV/IdP+SameS...
- deleted 6y ago[deleted]
- 35fbe7d3d5b9 6y agoSLO is the nightmare nobody touches. In practice, logout in a federated environment seems to be * A user logs into apps A, B, C (...) * While using app C, the user clicks logout. App C trashes their cookies * With luck(!) the IdP provides a low friction logout endpoint – think "GET /logout?redir=http://foo.bar/logged-out http://foo.bar/logged-out". The app redirs to that endpoint, the IdP trashes cookies and directs back to the apps "you have been logged out" page. Apps A and B? Go with god, and good luck. Keep your sessions short.
- mooreds 6y agoDoesn't it depend on who controls apps A and B? If they are COTS or created by different parties, then all best are off. But if all three apps are created by the same org, which can specify standards, doesn't one have some hope?
- emodendroket 6y agoThe whole point of SAML is that you can manage your users for third-party applications in your normal user store instead of needing to provision accounts in multiple places.
- pionar 6y agoSomewhat, but it still requires a lot of storage of state and coordination between systems. This isn't SAML specific, it's a property of any federated login (SSO) protocol.
- varikin 6y agoI had to implement a SP SAML logic at a previous job. The customer who wanted it just kept telling us to enable some apache mod and it works, except when you have a java fat jar without Apache, you have to add your own endpoints and we had to add integration for native clients. I asked about implementing logout cause I saw it was a thing in the SAML docs. The customer didn't care so our app trashed it cookies as usual and didn't report it to the IdP. It just wasn't worth the time.
- hnick 6y ago
- mjthompson 6y agoOpening that documentation page gave me flashbacks. I made the switch out of IT to another field. Configuring a Shibboleth IdP was probably the hardest thing I ever had to do in my IT career, it really pushed my capabilities. SLO wasn't the only hard thing, the whole thing was immensely challenging and every time I'd restart Jetty I'd be holding my breath hoping it would come up again.
- mooreds 6y agoWhat are you doing now?
- mjthompson 6y agoI'm a lawyer. Very different, I know! I love IT and programming, but I knew if I made a life long career of it, I'd grow to hate it. I really like doing IT related things in my own way. I'd always want to do things to best practices and not just get the job done as I was told.
- dkdk8283 6y agoI would love to pivot to law, I helped my ex do a lot of her homework and have a false sense of understanding. Only problem is that I’m old and a new start will not be easy when competing with people 20 years younger.
- mjthompson 6y agoI know solicitors a fair bit older than me (is, in their 40s) who made the jump and find they more readily gain the respect and trust of clients, and senior lawyers within the firm, by virtue of their maturity.
- varikin 6y agoI had just started a new job and my manager handed me a project to implement the SP side of SAML into our monolith. He explicitly said, I looked at the docs and don't want to deal with that headache. Fuck, that was a pain in the ass. So many bugs just due to conflicting statements in different parts of the docs. Everything can be done 5 different ways.
- mooreds 6y agoThis article was of interest to me because my company just implemented SAML Logout: https://fusionauth.io/docs/v1/tech/release-notes/#version-1-25-0 https://fusionauth.io/docs/v1/tech/release-notes/#version-1-... and I was looking around and ran across this post from the Shibboleth project.
- robotdan 6y agoThis thread makes me feel better with struggling to implement this. I'm not the only one.
- emodendroket 6y agoI added SAML support to an application once and I feel “not as easy as it seems” is a good description for the entire standard.
- grinich 6y agoThat's exactly why we built WorkOS. It's like "Stripe for SSO/SAML." Shameless plug for my startup. Hope that's still ok on HN :) https://workos.com/ https://workos.com/
- ec109685 6y agoThis sits between a company’s ActiveDirectory and something like Okta? Or is it more like Sail Point that lets you write logic to link everything up?
- grinich 6y agoIt’s infrastructure for SaaS apps to easily connect to all the different systems used in the enterprise, including Okta, OneLogin, ActiveDirectory, Workday, etc.
- catmanjan 6y agoProbably a dumb question, everything in my sphere is active directory - why would you have more than one identity provider?
- grinich 6y agoIf you’re a developer building an app, your customers use a variety of different systems. These are fragmented and you need to support all of them, not just Active Directory.
- catmanjan 6y agoThe previous post said "the enterprise" which makes me think of a singular organisation using all of them - maybe I'm misunderstanding, but why would a single org use more than one?
- jasonjei 6y agoI’m not sure if CAS is even partially SAML compliant or even related to it at all, but the way CAS handled it was that for every service ticket issued, the authentication service was supposed to ping a URL destroying a service ticket. It didn’t have very good fallback (eg if it couldn’t successfully reach the service ticket destructor endpoint, it wouldn’t attempt to retry). Perhaps the safest way is for apps is to verify periodically if a SAML session is still valid, if there’s a mechanism to do so.
- hunter2_ 6y ago> for apps is to verify periodically if a SAML session is still valid, if there’s a mechanism to do so. In general, that seems equivalent to the SP having a short session and the IdP having a long session. Suppose it's 1 hour and 8 hours. At 1h0m1s the next request to the SP causes a redirect to the IdP, and if the IdP hasn't heard about a sign out request, it just redirects back to the SP with a valid assertion that gives you another hour on the SP. No prompt to re-auth until the 8 hour mark.
- deleted 6y ago[deleted]
- hunter2_ 6y agoI believe the desire to make SLO work well faded (or complacency with it being discouraged grew) as screen locking became widespread. Using screen lock was once the dance of security enthusiasts, but it has become a nearly ubiquitous habit for general users. Sharing of OS-level accounts remains an interesting challenge, so devices in those situations should involve identical account sharing at all application layers.
- ec109685 6y agoFeels like the end state will be adding IDP support directly into the browser / OS since it has cross domain / app visibility and can “do the right thing” in more cases.
- closeparen 6y agoAnd the pendulum swings back to Kerberos.
- bob1029 6y agoOne of our customers brought this up with us briefly when discussing integration of our application into their infrastructure. I had independently concluded that the complexity probably wasn't worth it, but I hadn't considered shorter sessions as a mitigating factor. Looks like the sands of time are the best solution yet again. I can easily spin 15 minute sessions as a superior alternative to SLO when talking to a customer. Determinism is the biggest point and I can play that against security & compliance very easily in my industry.
- 35fbe7d3d5b9 6y agoSLO is one of those things that could be good if everyone played nicely together. If you end up having to implement it, hedge with sessions as short as your compliance needs dictate. Expire your own session at the very beginning of the dance before you lose control. And do not, under any circumstances, let them talk you into front-channel SLO. They probably won't unless they're totally clueless. But if they do it's the surest way to end up blamed for someone else's problems. Otherwise you'll end up with a support ticket some day that says "I clicked log out on bob1029's app and got a Datadog error page, what?!". And I'll smile.
- bob1029 6y agoThanks for the heads-up on potential traps. I will make sure we keep a tight leash on this conversation...
- stillbourne 6y agoI've written and implemented several SAML systems. It doesn't held that SLO is only a consideration when it becomes a problem and is usually not even part of the initial scope, more of an after thought.
- robotdan 6y agoHe he... enjoy. Hopefully this doesn't trigger any nightmares. https://twitter.com/bpontarelli/status/1099067076138827776?s=20 https://twitter.com/bpontarelli/status/1099067076138827776?s...
- lupire 6y agoTweet is a reaction gif.
- lupire 6y agoCan this be solved on the device (which is where it matters, according to the article), by clearing cookies across all sites in the browser? This might require a trusted browse extension or browser feature to delete a "well-known" cookie across all sites. It's fundamentally weird to ask for a feature "I want some website to end my sessions across all other websites on this device."