Expand description
Identity and authentication for Edda.
Every device (a player’s laptop, the DM’s phone) holds an Ed25519
DeviceKey that never leaves it. A campaign’s DM devices vouch for
other devices by signing a DeviceCert; the auth service only accepts
devices with a valid certificate. To use the services, a device answers a
login challenge by signing it, and gets a short-lived token (PASETO
v4.public) that every service can check with the auth service’s public
key alone.
Anything signed is signed as "edda/v1/<purpose>\0" followed
by the value’s canonical (postcard) encoding, so a signature made for one
purpose can never be passed off as another.
Modules§
- pairing
- Pairing a new device with a short code, using a PAKE (SPAKE2).
- protocol
- Requests and responses of the auth service, and what tokens say.
- server
- For services: issuing and checking tokens, and an axum extractor.
Structs§
- Device
Cert - A statement that
devicebelongs tocampaignwithrole, signed byissuer: a DM device of that campaign, or for the very first DM device (set up with a one-time code) the device itself. - Device
Key - A device’s private signing key. Generated on the device and never sent anywhere.
- Nonce
- 32 random bytes, for challenges. Shown as unpadded base64url.
- Public
Key - An Ed25519 public key. Shown as unpadded base64url.
- Signature
- An Ed25519 signature. Shown as unpadded base64url.
- Signed
Cert - A
DeviceCertwith its issuer’s signature.