111 karma · joined September 7, 2018
In the words of Alan Watts: You can't touch the tip of your finger with the tip of the same finger, you can't bite your own teeth.
It's an irreducible problem. Lest there is some social way we can achieve it...
The skiny is that you place a copy of some monotonic counter inside every JWT you issue, you keep track of the counter server side and compare with each request's JWT copy + some delta (which is the equivalent of maximum number of concurrent sessions you wish the user to have).
Thanks for the additional info! Interesting to hear. I will check out Daniel Schmachtenberger.
To expand on 'out of date' - systems thinking is centred around command and control, IIRC it came out of Cybernetics ala Norbert Weiner, Ashby and others. The command and control angle is based on the assumption that with enough information any system can be mapped, predicted and controlled. Whilst not wrong, it excludes another type of system which is truly complex and precludes mapping and prediction by the fact there are either/all too many variables to model or the very act of measuring or acting changes the system or the agents of the system can change the rules of the system.
These systems are deemed by the sense-making community to be Complex Adaptive Systems or Anthro-Complex (specifically for human systems). To approach these systems you have to become comfortable with uncertainty and re-arrange your thoughts on cause-and-effect, which is a whole new world view for many of us in software.
https://cynefin.io/ is great resource, Dave Snowden is a big name in naturalising sense-making and these broader views of complexity.
You said there are other reasons, what are those reason? I've gone to restaurants to meet friends... and ultimately we all eat to satisfy our hunger.
My point is that tasks are derived from functional requirements, they aren't context free, and if you make them context free then we're just doing what ever we want? To analogise, why do you have relationships in databases and indexes? An index is a flat map to speed up lookups on known queries, you don't get at the meat of your query in the index, the meat of what you want is in the row and it's relationships. You have an object graph for a reason, and yeah it was the hard part, but it's what makes a model useful.
... and to counter the quote... What's the point of your users experience if it's not to get them to where they are deriving value?
To clarify I picked /some/ value for the restaurant guest, but we could negotiate what the /true/ value is. I go to restaurants when I'm hungry and I'm sure others do, but you're right there are other reasons why you might go, but that doesn't detract from my point being made.
User stories capture functional requirements:
```
As a restaurant guest
I want to consume food
Because I am hungry
Scenario: Guest is provided with menu when they are sat at their table
Given there is a free table
When I am sat at my table
Then I should be given a menu
```This is BDD style, I don't really care what you think of BDD it covers what I need to make the point... First of all context is king, there should be NO scenarios here that do not satisfy the guest being hungry, thats scope creep. Equally there is NOTHING here about HOW you implement this, it does not mention who gives the menu, what the menu contains, how it looks or anything about the rest of the restaurant. Why is that the case? Because we are at a level of abstraction that is talking about delivering value, not about the quality of what we deliver. You can only deliver value to users so we can only talk about users and their experiences. Now as for tasks, they are derived from these functional requirements, they connect what currently IS to what needs to be, e.g. if we currently give guests a menu when they enter the door, thats what IS, now we need to go about creating a task to change that to when the guest sits down, thats the task and it is a poignant task because it's derived from our functional requirements, there is no room for scope creep here.
Please do not write context free tasks, you'll run yourself into the ground in scope creep, because you're detached from what matters. That's why user stories are important... but most people don't write user stories correctly, they treat them like a task template and forget the value delivering aspect and all the context that goes with it.
As I understand ST is in effect making the client act as the cache by giving them a refresh token (RT), you delay having to do a central DB lookup until the AT expires and RT is used... You could do the same with CAA, check the DB every X interval (30s) instead of every request, the security implications would be the same (some period of time that no matter who is using the token it will work) as I understand?
From what I've read Theft Protection is a matter of detecting reuse of RT (as I've understood), again with CAA and using the above, you could track each periodic "check" against the master with another counter and embed into the token, if you see a tracking number < or > what you've seen then a Theft has occurred. Would that be the same as ST?
Ah I think you've slightly misunderstood, there is a 'counter' per entity, each user has their own separate counter so when you are revoking it is only relevant to sessions related to that users account. This would fall under your database lookup version of JWT management, it's centralised but in the smallest way possible.
That might clear up your second question, you'd want to revoke all sessions like I'd want to 'Log out all other active sessions', logging in to my Spotify on my friends computer last week, and my sisters the week before, I want to log them ALL out.
What sort of verification have you done on your solutions? What are the down falls of your solution?
A great place to start is Dave Snowden's Cynefin sense-making framework [1][2]. Study it and embed it into your core thinking, it can underpin how you approach almost every problem you come across in life. I was fortunate enough to attend a masterclass with Dave Snowden and Simon Wardley (Wardley maps, another thing worth understanding and practising related to strategy, he's published the whole thing for free on Medium [3]). What was fascinating and part of the result of the 2 day class is that Simon Wardley had been using a Cynefin like model in his head whilst making decisions and when he came up with his mapping method, additionally they had both been inspired by Max Boisot [4].
[0] https://en.wikipedia.org/wiki/Complexity_theory_and_organiza... [1] https://en.wikipedia.org/wiki/Cynefin_framework [2] http://cognitive-edge.com/videos/cynefin-framework-introduct... [3] https://medium.com/wardleymaps/on-being-lost-2ef5f05eb1ec [4] https://en.wikipedia.org/wiki/I-Space_(conceptual_framework)
Act 2 - is really about process rather than G/W/T (which is really just AAA, arrange, act & assert).
Act 3 - again process, G/W/T isn't the solution to domain understanding, conversations are. You should be continually communicating to between all stake holders to maintain a current domain understanding.
We wrote an article recently on the limits of BDD [1], G/W/T didn't really come up, there are other more glaring issues with BDD when it comes to systems that intersect mismatched understandings of the real world between experts and users. Unrealistic wants and goals are killer. Additionally we started writing a tool to attach metadata to scenarios (G/W/T) so you can capture technical details about things called SpecStack [2]
[1] https://endian.io/articles/limits-of-bdd/ [2] https://github.com/endiangroup/specstack
[1] https://github.com/endiangroup/compandauth [2] https://endian.io/articles/compandauth/
The core concepts can be translated into any language that supports integers, happy to reference any alternative implementations.