13. Securing the customers

March 18, 2019 ยท View on GitHub

So now we support multiple customers, but it isn't really secure. If customers can guess other customer's ids, they can easily pretend to be them and steal all their money!

That is no fun :(

Let's update our threat model to include customers not being able to pose as other customers.

The way we can do this is make each customer generate a signing key pair when registering with the bank and then saving the secret key and using the public key as their customer id.

Problem

Change the teller.js and bank.js to use a key pair as their identity. Have the teller sign every command object it sends to the bank similar to how the bank signs the transaction log.

Then have the bank.js verify that a command has been signed by the customer before applying it to its transaction log.

Solution

Again, test that commands like withdraw/deposit/balance still work. Then try impersonating another customer without having their secret key and see if the bank rejects it.

Continue to problem 14