Skip to content

Clever Software Security Patterns For Young Ladies

Programming 12:42 of narration 3 min read
Cover for Clever Software Security Patterns For Young Ladies

Listen · 12:42

MP3

An autonomous company,
is easy to launch, but also built on clever principles.

AI does some poking around,
and you have a website, sign‑ups, plans, buy more usage credits.

Credits are interesting, the account is already there,
with a free credit or two, you just add more abstracting away payments.


And just as important is the fact that it is a secure system,
secured through a trick.

Another server that can’t be accessed through the internet,
and only answers simple questions.

An example of such a trick is Stripe, they process credit cards,
but your server only has access to a transaction id.

If you got hacked, the hackers can’t even install software,
that snoops on the credit cards, credit cards don’t reach your system.

The trick is called Tokenization,
vault‑based architecture.

Replacing sensitive information that isn’t meant to reach you with a token,
is like a logical barricade - and you should use it for other things.

All you need is a tiny separate specialist server,
that you share a transaction id with.

And then you tell it to perform an action,
on an object that is never sent to you.

For example you can ask, “Is this password valid”,
but can’t ask “Give me the password”; I will compare.


But even if it is a document that must be sent to you, anyway
Tokenization gives you the ability to create a short‑lived expiring token.

You only give the user 10 minutes to get the document,
if that token is copied, the hacker has 10 minutes to download the file.

And you can keep tightening the noose; the token is only for reading,
not changing or deleting.

You could even add a source check: it must come from the user’s address
captured during their login.

And of course, the tokenization of document access,
checks if the user has the permission to even access the document.

This can get pretty wild and confusing,
which is why I dump a lot of access concerns to Linux.

In my Linux account model, nothing the user sends is ever executed,
the Linux account just makes the files private, unreadable to others.

There are thousands of kernel exploits, but they all demand execution,
I only use accounts for storage, making privilege escalation hard.


You are not programming complex math here,
you are creating basically physical barriers.

Things that are more mechanical,
than algorithmic.


In one of my own security models, I use text‑adventure games,
I put the users into their own worlds so that they can’t access others.

The Virtual File System on Plan9, a forlorn version of a better Unix,
does that too; there is no shared operating system unless you share.

And in the text‑adventure game, you need a card to open a door,
if a card is not in your inventory, the door will not work.

I could manufacture glowing crystals that only glow for 10 minutes,
that is Tokenization.

And tools that rust or break after the first use,
without a tool you can’t operate machines.

I view my model as superior,
because it is clear for humans to comprehend.


My final trick is my best trick: JavaScript.
People used to make fun of JavaScript, some still do.

But you see, JavaScript uses your customers’ CPU or GPU,
software written in the latest leaky‑typed language needs a server and bills.

The people who make fun of JavaScript go home and pay the bills,
and guess what, for all the safety that they think they get.

They now execute on a shared host with undiscovered kernel exploits,
the memory safety, which is theoretical at best, was not worth the cost.


When your programs run in the user’s browsers,
and use their server accounts for light storage only…

You don’t have to worry about bills, and when you store data in users’ browser,
you don’t even need the spacious Linux, just a vault or authorization server.

Or a little text‑adventure game,
that will invite the hacking AI on an adventure of a lifetime.

Imagine the hacker receiving a report for her hacking AI,
that includes words like Hobbits, mayonnaise, fat horse (the animal), and alcohol.

authorizationpaymentstokenizationvaultsecure-architecture