Going on 5 years ago, I had to do some integrations with SimpleSAMLPhp for a client. Now, in a Day Job, one of my colleagues is trying to get an integration working, and I’m amused that they find that my post is top hit when they google the error.

Anywho… what I wrote in my post wasn’t working, so I had to dig a little deeper.

Logins were working, but not from Chrome.

After digging into it a little, I found that SameSite headers were being set on the cookie, but no Secure flag.

This is Not Good, and so a lot of the more security focussed browsers will ignore these headers. You can even see this if you look at your developer tools.

Ok, so set the secure flag in your app, and job done, right?

Well. Normally, yes. But the added complexity comes from how our estate is currently configured – containers sat behind a load balancing gateway. This gateway, running haproxy, performs SSL offloading (yes, I know, NSA Smiley, but this is just temporary).

Solution

Once I figured out what was going on, the fix is quite simple. Namely, rewrite any cookies coming from the backend containers to include the secure flag.

This is fine, since none of our services are available over vanilla HTTP.

Adding the following:

rspirep ^(set-cookie:.*) \1;\ Secure

Did the trick after a restart.

Of course, previous tips still apply, you’re going to want to clear your caches etc so that the old cookie isn’t preserved, etc.

Hope this helps!

React Native, is a version of React, that can be used to build native iPhone (and iPad and other iOS devices) and Android applications. It lowers the bar significantly for building on these platforms, meaning you can develop in comparatively simple React Javascript, and have that cross compiled to various devices.

This is all pretty neat.

Some time ago, I began work on a native iOS client for Known. I got quite a way to getting it all to work – you can log in, post status updates, photos and even check in.

However, I simply no longer have time to maintain it, and quite honestly I never figured out the last step of getting the code on Testflight or the App Store.

So, rather than let this languish in a folder on my laptop, I figured I’d stick it out there. Hopefully it’ll be useful to someone, and hopefully someone might have some time to help maintain it.

Sorry in advance for my spaghetti code, I’m far from being a React developer!

» Visit the project on Github...