|
| 1 | +--- |
| 2 | +layout: ../../layouts/BlogPostLayout.astro |
| 3 | +categories: |
| 4 | + - programming |
| 5 | +date: "2025-06-21" |
| 6 | +unlisted: true |
| 7 | +title: My Approach to Authentication |
| 8 | +--- |
| 9 | + |
| 10 | +I have been working on making sure my family is taken care of in case I |
| 11 | +unexpectedly die or am incapacitated. I take authentication fairly seriously, |
| 12 | +which turned out to make it challenging to actually prepare for giving my family |
| 13 | +access to my accounts and data. I especially realized this as I tried to explain |
| 14 | +to my wife how |
| 15 | +[TOTP](https://en.wikipedia.org/wiki/Time-based_one-time_password) codes work. |
| 16 | + |
| 17 | +Me: |
| 18 | + |
| 19 | +> So the codes change every 30 seconds, but there's an underlying secret key |
| 20 | +> that doesn't change. If you somehow can't access the generated codes, here's |
| 21 | +> where the secret keys are. Ask one of our programmer friends to help you use |
| 22 | +> them to generate the codes. |
| 23 | +
|
| 24 | +Her: |
| 25 | + |
| 26 | +> 🤔 |
| 27 | +
|
| 28 | +So this post is mainly documentation for my family (and whichever friend my wife |
| 29 | +might end up calling upon), though I am making it public in case anyone finds it |
| 30 | +useful or is also inspired to think about creating some form of a digital will. |
| 31 | + |
| 32 | +I do already have Google's [Inactive Account |
| 33 | +Manager](https://support.google.com/accounts/answer/3036546?hl=en) turned on, |
| 34 | +and there are other forms of a digital [dead man's |
| 35 | +switch](https://en.wikipedia.org/wiki/Dead_man%27s_switch) like [Legacy |
| 36 | +Contacts](https://support.apple.com/en-us/102631) for Apple. But this is a more |
| 37 | +general solution for myself. |
| 38 | + |
| 39 | +## Background |
| 40 | + |
| 41 | +My career has been in software engineering, and I like to think I have a fairly |
| 42 | +secure setup. But it wasn't always like that. I used to use the same password |
| 43 | +for everything. Though as far back as high school, at least it was a string of |
| 44 | +ten random letters. |
| 45 | + |
| 46 | +In college, I switched to using variations of the same password. I did something |
| 47 | +like add the first two letters of the service/website to a common base password. |
| 48 | +Of course, I ran into the obvious problem of differing password requirements, |
| 49 | +which made it impossible to keep all the passwords in my head. |
| 50 | + |
| 51 | +For some time, I recorded them in a `p.txt` file. I eventually switched to using |
| 52 | +[LastPass](https://www.lastpass.com/) as my password manager. But after they had |
| 53 | +[enough security |
| 54 | +incidents](https://en.wikipedia.org/wiki/LastPass#Security_incidents), I |
| 55 | +migrated to [1Password](https://1password.com/). I still use 1Password today, |
| 56 | +with a [family account](https://support.1password.com/explore/families/). |
| 57 | + |
| 58 | +## Passwords |
| 59 | + |
| 60 | +So 1Password stores almost all of my passwords, and I generate highly random, |
| 61 | +unique passwords with it. But there are a few passwords that I still rely on my |
| 62 | +memory for, mainly because I consider them to be too important: |
| 63 | + |
| 64 | +1. My 1Password password |
| 65 | +2. My Google password for my personal Google account |
| 66 | +3. My Google password for my [Google Workspace](https://workspace.google.com/) |
| 67 | + account for my custom domain email |
| 68 | +4. My [Bitwarden](https://bitwarden.com/) password (I'll explain in a bit why I |
| 69 | + use Bitwarden in addition to 1Password) |
| 70 | +5. My "local" password for my laptop and phone |
| 71 | + |
| 72 | +In retrospect, I should probably add the domain registrar for my custom domain, |
| 73 | +since getting access to that would allow someone to take control of my custom |
| 74 | +domain email. |
| 75 | + |
| 76 | +Besides my memory, I have these passwords written down in a plain text file on |
| 77 | +my various encrypted external hard drives that I use for backing up my data. |
| 78 | +I'll have a separate post on how I deal with data backups, but this is what will |
| 79 | +allow people to get access to my "root" passwords. All they need is the hard |
| 80 | +drive and the password to decrypt it. |
| 81 | + |
| 82 | +Crucially, 1Password also requires a [34 digit secret |
| 83 | +key](https://support.1password.com/secret-key-security/) to log in. So that is |
| 84 | +also stored in that plain text file. |
| 85 | + |
| 86 | +## Two-factor Authentication |
| 87 | + |
| 88 | +I always enable two-factor authentication when it is available. I prefer to use |
| 89 | +TOTP and [security |
| 90 | +keys](https://www.nytimes.com/wirecutter/reviews/best-security-keys/) when |
| 91 | +possible. |
| 92 | + |
| 93 | +### SMS |
| 94 | + |
| 95 | +I only use SMS-based two=facotr authentication when I am forced to. I've never |
| 96 | +liked being reliant on cell service (which is vulnerable to things like SIM |
| 97 | +swapping) and access to my cell phone (which can be stolen or broken) to be able |
| 98 | +to log in to things. This wasn't so bad when I was on [Google |
| 99 | +Voice](https://en.wikipedia.org/wiki/Google_Voice) and could access my texts |
| 100 | +from any device, but Google Voice [recently banned |
| 101 | +me](https://www.dannyguo.com/blog/google-banned-me-from-google-voice), so now I |
| 102 | +am stuck with needing my phone to get verification codes. If I die, someone will |
| 103 | +need to work with Verizon to get access to my phone number. |
| 104 | + |
| 105 | +### TOTP |
| 106 | + |
| 107 | +But a decent number of services do support TOTP, so I use that whenever I can. |
| 108 | +While 1Password [does handle TOTP |
| 109 | +codes](https://support.1password.com/one-time-passwords), I didn't want to store |
| 110 | +my passwords and my TOTP secrets in the same place. That was a degree of putting |
| 111 | +everything into the same place that I wasn't comfortable with. So that's why I |
| 112 | +also use Bitwarden. I don't have any passwords in there. Only TOTP secrets. |
| 113 | + |
| 114 | +When I set up TOTP for a new service, I'll add the secret key to Bitwarden, but |
| 115 | +for redundancy, I'll also add it to a plain text `otp.txt` file that I keep in |
| 116 | +Google Drive. And that file is included in my data backups. |
| 117 | + |
| 118 | +Many services also generate recovery codes when setting up two-factor |
| 119 | +authentication. I put those codes in `otp.txt` as well. |
| 120 | + |
| 121 | +### Security Keys |
| 122 | + |
| 123 | +I also have a set of [YubiKeys](https://www.yubico.com/products/) though there |
| 124 | +still aren't that many services which support |
| 125 | +[WebAuthn](https://en.wikipedia.org/wiki/WebAuthn). I set them up when I can, |
| 126 | +though I won't do it if TOTP and security keys are mutually exclusive. I want |
| 127 | +them to be alternatives. I don't want to be fully dependent on having one of my |
| 128 | +security keys to log in. |
| 129 | + |
| 130 | +I have one key that's always plugged in my personal laptop, one key on my |
| 131 | +keychain, one key in my [fireproof bag](https://amzn.to/44bqMM1) at home, and |
| 132 | +one key that I store at a family member's home. This is overkill, especially |
| 133 | +considering that I refuse to let them be the only two-factor authentication |
| 134 | +method for a service. But being overly prepared makes me feel warm and fuzzy |
| 135 | +inside. |
| 136 | + |
| 137 | +## Bootstraping Authentication |
| 138 | + |
| 139 | +Speaking of being overly prepared, one thing that has motivated some of my |
| 140 | +decisions has been to consider how hard it would be to get access to my digital |
| 141 | +accounts and data if I unexpectedly lose access to my device(s). So what does it |
| 142 | +take to bootstrap authentication? What happens if I'm in a foreign country and |
| 143 | +lose my phone and laptop? |
| 144 | + |
| 145 | +Today, the answer is that I can bootstrap with very little. I mainly need to get |
| 146 | +into my 1Password, Bitwarden, and Google accounts. Those passwords are in my |
| 147 | +head. For two-factor authentication for those accounts, I can use any of my |
| 148 | +security keys. |
| 149 | + |
| 150 | +But one thing that I think is easy to forget is 1Password's separate secret key. |
| 151 | +My solution for that is to store the secret key in my YubiKeys. So for every |
| 152 | +YubiKey except for the one that is in my laptop, I use the [static password |
| 153 | +feature](https://support.yubico.com/hc/en-us/articles/360016614980-Programming-a-static-password-into-your-YubiKey) |
| 154 | +to store the secret key. I can long touch the YubiKey to output the value. |
| 155 | +Though continuing in the spirit of overkill, I've also made a slight |
| 156 | +modification to the value so that someone won't immediately have my secret key |
| 157 | +just be getting access to my YubiKey. |
| 158 | + |
| 159 | +But what happens if I also lose my YubiKey(s)? This goes back to my decision to |
| 160 | +only set up my YubiKeys if I can also set up TOTP. So as an alternative, I just |
| 161 | +need the TOTP secret keys for 1Password and Bitwarden. I have those secret keys |
| 162 | +written on a piece of paper that I then put in a [waterproof, laminated |
| 163 | +pouch](https://amzn.to/40du14g). Again, with some minor modification to the |
| 164 | +values. And they are unlabeled, so to an outsider, it'd be unclear what they are |
| 165 | +for. The piece of paper also has the modified 1Password secret key. |
| 166 | + |
| 167 | +I carry this with me. When I travel, I can also leave a copy in my hotel room. |
| 168 | +I've also considered sticking a copy under the sole of my shoe. So someone could |
| 169 | +rob me, but as long as they leave me with my shoes, I can still bootstrap into |
| 170 | +my online life. |
| 171 | + |
| 172 | +The big remaining caveat I can think of is the fact that I am now reliant on |
| 173 | +cell service for some two-factor codes. Verizon used to have a way to access |
| 174 | +texts on the web, but that's not available anymore. |
| 175 | + |
| 176 | +I've never come close to actually needing any of this, so my future robber will |
| 177 | +probably be bewildered by how much I am smiling after they take my phone and |
| 178 | +wallet. Part of me really wants a reason to pull that laminated card out of my |
| 179 | +shoe. |
0 commit comments