If you’re a denizen of the atmosphere and you’ve logged into Bluesky, then you have a DID. Your posts, your followers, and everything else you’ve made are attached to it. It also tells applications how you can sign in, and apps read it before they show anyone your profile or posts.
Your DID is really important, and it needs to be kept safe, but not a lot of people know why or that they can.
What is a DID?
A DID is a permanent identifier, kind of like a URL. Mine is did:plc:cbkjy5n7bk3ax2wplmtjofq2, and it says my DID document is at https://web.plc.directory/did/did:plc:cbkjy5n7bk3ax2wplmtjofq2.
This is a trimmed view of mine:
{
"alsoKnownAs": [
"at://ngerakines.me"
],
"id": "did:plc:cbkjy5n7bk3ax2wplmtjofq2",
"service": [
{
"id": "#atproto_pds",
"serviceEndpoint": "https://vesuvius.pyroclastic.cloud",
"type": "AtprotoPersonalDataServer"
}
],
"verificationMethod": [
{
"controller": "did:plc:cbkjy5n7bk3ax2wplmtjofq2",
"id": "did:plc:cbkjy5n7bk3ax2wplmtjofq2#atproto",
"publicKeyMultibase": "zQ3shgXD6JN1f3sVeQfY9Z3ZbUfFAKJXUnWEoDqycnvN7QrBf",
"type": "Multikey"
}
]
}This small public record contains a lot of important information. Think of it as a contact card for your identity. It answers three questions: what handle the identity goes by, which server holds its data, and which key proves that a post really came from it.
First, each document contains the ID field, which is the DID, that permanent URL-like string. Related and next is the also known as list that contains your handle, the friendly name people see.
It also includes a list of relevant services, namely #atproto_pds, which is the AT Protocol PDS that hosts that identity’s data. Equally important is the verification method list that contains the #atproto entry, which is the signing key that proves your data is yours.
Lastly, and importantly, every did:plc identity also has a cryptographically signed history of every change ever made to it. Anyone who depends on one has five needs: to see what it says, to check that its history holds up, to hear quickly when it changes, to understand what changed, and to act when the change isn’t theirs.
[
{
"did": "did:plc:cbkjy5n7bk3ax2wplmtjofq2",
"operation": {
"sig": "Z234aG...vAVwsA",
"prev": null,
"type": "plc_operation",
"services": {
"atproto_pds": {
"type": "AtprotoPersonalDataServer",
"endpoint": "https://bsky.social"
}
},
"alsoKnownAs": [
"at://ngerakines.bsky.social"
],
"rotationKeys": [
"did:key:zQ3shhCGUqDKjStzuDxPkTxN6ujddP4RkEKJJouJGRRkaLGbg",
"did:key:zQ3shP5TBe1sQfSttXty15FAEHV1DZgcxRZNxvEWnPfLFwLxJ"
],
"verificationMethods": {
"atproto": "did:key:zQ3shP5TBe1sQfSttXty15FAEHV1DZgcxRZNxvEWnPfLFwLxJ"
}
},
"cid": "bafyreiaqksohlpykwyf6vt23e2lrmgt4y66n4vcbqcihlejricj6il2r7u"
},
{
"did": "did:plc:cbkjy5n7bk3ax2wplmtjofq2",
"operation": {
"sig": "LAAQzz...Y5C5mg",
"prev": "bafyreiaqksohlpykwyf6vt23e2lrmgt4y66n4vcbqcihlejricj6il2r7u",
"type": "plc_operation",
...
},
"cid": "bafyreic4wotjm3tue3cra22723fdvujhhto3nue4gtpt2bs3pgzud2r7za"
},
...
]Who has the keys?
That small card matters because apps trust it completely. When it changes, they follow along. Change the server, and apps go looking for your data somewhere else. Change the key, and someone else can post as you. So there are two questions worth asking about your DID document: who can change it, and would you know if they did?
Typically, you don’t manually update your DID document because you’d need direct access to the private cryptographic key material. Your PDS manages the #atproto key because it alone is responsible for using it.
There’s a second kind of key, and you won’t find it in the DID document. Rotation keys, which I think of as recovery keys, are part of the PLC operations themselves. You can see two of them in the rotationKeys list in the history above. They are the keys allowed to sign a change to the identity, whether that’s a new handle, a new PDS, a new signing key, or a new list of rotation keys.
Your PDS usually manages the rotation keys entirely, which lets it update your handle without you ever touching a key. That list can hold up to five keys, though, and you can add rotation keys of your own that you securely hold. A rotation key you hold lets you change your identity yourself, without going through your PDS.
Threats
A few things can go wrong here, and some of them are far more likely than others.
The most realistic threat is a stolen password. Someone who can sign in to your account can ask your PDS to sign a PLC operation for them, and your PDS will do it because, as far as it can tell, the request came from you. The reference PDS emails a confirmation code first, so in practice the attacker needs your inbox too, but those two tend to fall together. I think the more common scenario is that your email gets compromised, and then the attacker branches out to see if the credential works with other accounts, like logging into Bluesky. One operation is enough to add a rotation key of their own, point the identity at a different PDS, and swap the signing key. After that, the identity is theirs.
The next threat is a compromised PDS host. A PDS holds the signing key and a rotation key for every identity it hosts, so whoever breaks into it has everything they need to pretend to be you or take over your identity outright. The same is true for everyone else on that server. It’s less likely than a stolen password, and much bigger when it happens.
Further out are the cases where nobody is attacking you at all. A PDS operator can make a mistake, shut down, or lose its keys. If it held the only rotation key, your identity is stuck wherever it was left.
It also doesn’t take a mistake, because people, policies, and laws change. An operator that is friendly today can choose, or be told, to delete you tomorrow. If it holds the only rotation key, there isn’t much you can do.
Threat Response
Fixing a bad change means publishing a new PLC operation that puts things back, and did:plc has a rule that makes that possible. The order of rotationKeys is what matters because a key higher in the list can override an operation signed by a key lower in the list, as long as it does so within 72 hours.
That 72-hour undo rule is the whole recovery story. If you hold a rotation key that ranks above the one your PDS uses, you can undo a change it signed, whether an attacker with your password asked for it or the operator made it on its own. If you don’t hold one, or the window closes first, the change stands.
A response also depends on knowing what you’re responding to, because not every change is an attack. There’s a good real-world example coming. Bryan posted on November 24 that the spaces rollout will add an #atproto_kem key to hosted identities, signed by the PDS key. Structurally, that looks a lot like what an attacker holding the PDS key would do: a new verification method, signed by the operator. One is routine, and the other is an emergency, and you have 72 hours to tell which.
Taking Control
The structure of PLC operations and the audit log gives people tremendous power and control, and it’s unique to the Atmosphere. You can make sure that you hold rotation keys of your own, and you can use them to recover your identity when something bad happens.
Two things are at stake here. The first, and the prerequisite, is knowing when something bad happens. You need to watch for changes to your DID document. Fortunately, the global PLC service makes this relatively easy, because anyone can request an identity's audit log.
The second is being able to react. That takes a rotation key of your own that can “undo” bad changes to your identity. Creating one isn’t technically challenging, and the process is well documented with tools like pyroclastic.cloud/recovery-key.
Challenges
None of this is easy to build. I group the challenges into three areas: observability, understanding, and UX.
Observability comes first, because you can’t fix a problem you don’t know about. To know your identity has changed without your authorization, you need an app that can collect the data that makes that connection. For devices that are only online some of the time, like mobile phones, that means periodically polling identity documents. For services, that means subscribing to everything and filtering out the identities that don’t matter.
Understanding is a big one. Once you know something has changed, you need to understand the change, and that is often highly contextual. A user might intentionally migrate from one PDS to another using pdsmoover or eu-haul. A PDS operator might move them from one PDS to another within a cluster for rebalancing, or rotate a key as part of regular infrastructure maintenance. A user might add their own rotation key, change their handle, add a service, or perform many other legitimate operations. Telling apart what is healthy, what is suspicious, and what is potentially dangerous is difficult. Conveying that to people who may not be technically savvy is even more difficult.
The last area is UX. Giving people the ability to create and control a rotation key safely and securely is challenging. Expecting them to work through a complicated series of command-line tool calls and then save private cryptographic key material is unrealistic, at best.
Doing all that is hard, and there is one more layer. When something very bad has happened, the app also has to guide a person through recovering their identity, and that means communicating the right process at the right time.
Designing Solutions
Here is what I think some of the solutions to these problems look like.
First, I think a mobile-first solution is warranted. Almost everyone has a phone, and it's a physical device most people already use and protect.
That leads to a natural next step, and it fits the observability problem. Mobile notifications and time-sensitive alerts are a perfect fit. If an unauthorized change to your identity occurs, you’ll want to know immediately, and a push notification does exactly that.
A phone can also take on some of the understanding and UX problems. Because it’s what receives the notification, it’s the best place to give you context around a change, in your language and in your timezone.
I also want to highlight how important it is to hold your own key. You can pair a phone with a hardware security key, like a YubiKey, for solid, portable security. Operating system features like the Apple Secure Enclave, iCloud Keychain, and password manager integration are attractive options too.
The intention is to simplify key management and provide plain-language context and guidance on how to respond in a bad situation. Nobody should be buried in technical jargon while they’re in panic mode because their email account and PDS have been compromised.