I'm just guessing, but... "developer gets a great idea - let's push an update to the API as a GET request so we can cache this on the CDN... forgetting that the JWT token is potentially returned in the call. Now, whoever makes the call first gets their JWT token stored for everyone else to load instead when the API call is made." Ta-da, Klarna.
I can 100% see this being the cause if this comes out as the root. But... API's really shouldn't be cached? At least not at the CDN level. The risk of serving up stale dashboard data alone makes users go ????... and we definitely don't want - not even mentioning the problem here, that's crazy.
Klarna users are being signed in to random accounts
301–310 of 517 posts
Re: Klarna users are being signed in to random accounts
#302Does Klarna still do the IQ test as part of their hiring process?
Although, I guess Google does IQ tests too in effect? But it's called "solve this puzzle" and "here's a riddle".
Re: Klarna users are being signed in to random accounts
#303Totally anecdotal, and probably unrelated, I interviewed for Klarna a few years ago. Mid process, they sent me some sort of timed bizarre IQ test that the recruiter claims EVERYONE who works there has to take. That's when I knew that kind of working culture wasn't for me.
A recruiter contacted me aswell and I asked about their salary. They pay 50k euro for juniors in berlin with afaik no stock vesting. How they even manage to get qualified personnel is beyond me, I would expect much more for a fintech with over 3B evaluation
Re: Klarna users are being signed in to random accounts
#304As a software engineer, I hate when I add a check for something "that will never happen" but that if happens is awful, and people complain. A classic example: you need to get a user from a session, check against a database, and continue if they're signed in. Then I add a simple if databaseUser.Username != form.Username and people will say "if that happens we've something worse wrong". Geez, something might be wrong a…
I think there's merit in objecting to "that will never happen" checks in some cases (though, to be clear, I'm not saying the people objecting to your code are thinking about the same thing I am). Specifically, if you have data that is loaded from some other source, your extra safety check might be checking data that's loaded from the same source, in a way where if something did go wrong, it went wrong in both places…
One such thing is the abuse of layers and layers of abstractions. For example, many people (unfortunately, in my view) love to use ORMs and query builds, and things like these are much more easier to happen when things are too generic.
And signing the entire database row and validating it, and so on, might be unjustified for most people, especially if you already count with correction from a TLS layer, and you can just have the trade-off of adding a simple conditional to check if the data you receive is sane.
This is not something essential for everything, but that is nice to have, especially the further you're out of control.
For example, if you retrieve data from an external API you should not trust it blindly, but rely on your internal references (security concerns aside, I'm talking about other kind of erratic behavior or bad data).
Re: Klarna users are being signed in to random accounts
#305Earlier quoted context omitted.
I don't understand your perspective here. Debates about Agile have gone on for ages, that's not a 'lately' thing. I have no idea what 'hipster' has to do with banks and tools... or what you mean by 'old proven methods'.
Not looking for a debate myself :)
Re: Klarna users are being signed in to random accounts
#306As a software engineer, I hate when I add a check for something "that will never happen" but that if happens is awful, and people complain. A classic example: you need to get a user from a session, check against a database, and continue if they're signed in. Then I add a simple if databaseUser.Username != form.Username and people will say "if that happens we've something worse wrong". Geez, something might be wrong a…
So we generated our parser to fail if field ORG/1457 (made up) was not numeric max 8 digits. Or missing where mandatory.
Even if we never touched the data in that field.
Turns out that no-one else used the spec that way. No two were the same, so we had to basically implement two layers of parsing. One to put the data in a common parse tree, and the other to per-sending-mainframe interpret the data as how the sender had implemented.
We assumed that the mainframe would never send illformed data, and indeed that-could-never-happen. But they differed in what they thought was well formed.
Re: Klarna users are being signed in to random accounts
#307Earlier quoted context omitted.
That only protects the user's password. The auth cookie will be sent in all subsequent requests in plain text. EDIT: that's how firesheep ( https://en.wikipedia.org/wiki/Firesheep ) hijacked sessions for e.g.
That's not true. Cookies can have a 'secure' attribute which tells the browser to send them only over TLS
Re: Klarna users are being signed in to random accounts
#308As a software engineer, I hate when I add a check for something "that will never happen" but that if happens is awful, and people complain. A classic example: you need to get a user from a session, check against a database, and continue if they're signed in. Then I add a simple if databaseUser.Username != form.Username and people will say "if that happens we've something worse wrong". Geez, something might be wrong a…
Re: Klarna users are being signed in to random accounts
#309Earlier quoted context omitted.
That only protects the user's password. The auth cookie will be sent in all subsequent requests in plain text. EDIT: that's how firesheep ( https://en.wikipedia.org/wiki/Firesheep ) hijacked sessions for e.g.
That's not true. Cookies can have a 'secure' attribute which tells the browser to send them only over TLS
Re: Klarna users are being signed in to random accounts
#310I'm just guessing, but... "developer gets a great idea - let's push an update to the API as a GET request so we can cache this on the CDN... forgetting that the JWT token is potentially returned in the call. Now, whoever makes the call first gets their JWT token stored for everyone else to load instead when the API call is made." Ta-da, Klarna.
When you test features like this or caching a response with a JWT it can be very easy to default to the happy path or ignore the impact of a large volume of concurrent users.