For a while I had my laptop set up with a udev rule that would automatically lock it as soon as my USB Yubikey was unplugged. The Yubikey was on my keychain on a lanyard attached to my clothing.
I mostly used that at CCC events where I was paranoid about forgetting to lock my laptop when I left it unattended, but it would also defend against that scenario pretty well.
I believe windows has/had a setting where you could automatically log out if a bluetooth device was disconnected. I'm not sure how hard it'd be to do something like that on a Mac but maybe I should look into it. I think "if my watch disappears, lock the screen" would be simple enough.
It has this setting and defaults to using your phone as the proximity device. Not sure why else I should BT pair my phone with my PC.
Perhaps tie into bluetooth instead. If your Watch or iPhone goes out of range, lock the machine.
Re:Hardening macOS (2018)
by 0x6A75616E on Thursday May 06, 2021 @05:33PM
(#27069302)
BetterTouchTool has a "Bluetooth LE device moved away".. Maybe that can detect Apple Watch moving away, and then lock or even shut down the computer..
EDIT: Confirmed. This works. In a few minutes, I was able to set it up so that if my watch moves about a meter away from the mac, it'll lock the screen. It supports any Bluetooth LE device.
I had moved away from BTT for a while but would come back for this. Awesome. This stuff should be in macOS core.
Unlox app does this - its primary feature is to use FaceID on an iPhone to unlock a mac, but it also has an AutoLock feature if said phone goes out of bluetooth range. The signal level threshold is configurable so you can keep it on a pretty short leash.
(no relation, just a happy customer)
That is intriguing -- but I don't love the "enter your computer password in the app" part. Can it be configured to _not_ do that -- i.e. only do the "AutoLock" part?
I believe so, yes. you might need to do a temp password dance to get it configured initially, but after that "lock only" should work fine.
Perhaps an accelerometer for when it's snatched quickly.
Should actually be pretty easy to implement
I was thinking something tied to the accerometer - I know laptops used to have those when they had spinning disk. Sudden movement locks the screen.
This would also immediately lock the computer in the case of someone snatching it from you, even though the main use case I had in mind is just for falling asleep and for leaving the room.
Dunno if it’d drain too much battery. Also having the camera active indicator led glow all the time would be annoying. And it would also mean that you unfortunately no longer know if other software on your computer is recording your face while you are sitting there.