Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit b5720ac

Browse files
committed
Refine foreign actor authentication procedures
1 parent b459e2d commit b5720ac

File tree

1 file changed

+25
-17
lines changed
  • docs/Protocol Specifications

1 file changed

+25
-17
lines changed

docs/Protocol Specifications/core.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ weight: 0
4949
- [4.1 Authentication](#41-authentication)
5050
- [4.1.1 Authenticating on a foreign server](#411-authenticating-on-a-foreign-server)
5151
- [4.1.2 Sensitive actions](#412-sensitive-actions)
52-
- [4.2 Challenge strings](#42-challenge-strings)
52+
- [4.2 Challenge strings and key trials](#42-challenge-strings-and-key-trials)
5353
- [4.3 Protection against misuse by malicious home servers](#43-protection-against-misuse-by-malicious-home-servers)
5454
- [5. Federation IDs (FIDs)](#5-federation-ids-fids)
5555
- [6. Cryptography and ID-Certs](#6-cryptography-and-id-certs)
@@ -889,25 +889,33 @@ can only have one active session token at a time.
889889

890890
#### 4.1.1 Authenticating on a foreign server
891891

892-
Regardless of the authentication method used, the foreign server must verify the actor's identity
893-
before allowing them to perform any actions. This verification must be done by proving the cryptographic
894-
connection between an actors' home server's public identity key and the actor's ID-Cert through
895-
ID-Cert signature verification.
892+
Regardless of the authentication method used, polyproto deployments meant to interoperate with other
893+
polyproto deployments must accept [ID-Certs](#6-cryptography-and-id-certs) as a form of authentication
894+
from foreign actors.
896895

897-
TODO Explicitly define how this works! Might we need challenge strings after all?
896+
!!! example "Possible real-world example"
898897

899-
Before a foreign actor is allowed to send messages on the server, the server must also check with
900-
the actor's home server to ensure that the ID-Cert has not been revoked. See [section 6.4.1](#641-verifying-that-a-newly-retrieved-id-cert-is-not-out-of-date)
901-
for information on how this is done.
898+
Using a polyproto-based chat service, you'd like to join a community guild you've been invited to,
899+
hosted on another server. To do this, you retrieve a challenge string from that server,
900+
complete the challenge string, then exchange that challenge string solution for an
901+
authentication token from the server.
902+
903+
Congratulations! You can now use your invite + token to join the community guild.
904+
905+
Server must verify the identity claims presented by foreign actors before giving out an authentication
906+
token. This verification must be done by proving the cryptographic connection between an actors'
907+
home server's public identity key and the actor's ID-Cert through ID-Cert signature verification and
908+
must include ensuring that the presented ID-Cert has not been revoked.
909+
See [section 6.4.1](#641-verifying-that-a-newly-retrieved-id-cert-is-not-out-of-date) for information
910+
on how this is done.
902911

903912
#### 4.1.2 Sensitive actions
904913

905914
!!! bug
906915

907-
# Challenge strings will be removed soon.
916+
# Outdated: Challenge strings are not used for this.
908917

909-
Their concept has been thought out further and implemented in different ways. Challenge strings are
910-
no longer needed. This section will be removed soon.
918+
"Sensitive solutions" are set to replace challenge strings as an authenticator for sensitive actions.
911919

912920
The API documentation already reflects this change; expect the protocol specification to reflect
913921
these changes in upcoming beta versions of polyproto.
@@ -942,7 +950,7 @@ header value represents the second factor of authentication chosen.
942950
TOTP verification code. If the chosen second factor of authentication is a password, then the
943951
value of this header is to be that password.
944952

945-
### 4.2 Challenge strings
953+
### 4.2 Challenge strings and key trials
946954

947955
Servers use challenge strings to verify an actor's private identity key
948956
possession without revealing the private key itself. These strings, ranging from 32 to 256
@@ -2197,10 +2205,10 @@ JSON file.
21972205
Changing the publicly visible ownership of actor data requires the chain of trust to be maintained.
21982206
If an "old" account wants to change the publicly visible ownership of its data, the "old"
21992207
account must prove that it possesses the private keys that were used to
2200-
sign the messages. This is done by signing a [challenge string](#42-challenge-strings) with the private
2201-
keys. If the server verifies the challenge, it authorizes the new account to re-sign the old
2202-
account's messages signed with the verified key. Instead of overwriting the message, a new message variant
2203-
with the new signature is created, preserving the old message.
2208+
sign the messages. This is done by signing a [challenge string](#42-challenge-strings-and-key-trials)
2209+
with the private keys. If the server verifies the challenge, it authorizes the new account to re-sign
2210+
the old account's messages signed with the verified key. Instead of overwriting the message, a
2211+
new message variant with the new signature is created, preserving the old message.
22042212

22052213
Implementations and protocol extensions should carefully consider the extent of messages that can be
22062214
re-signed.

0 commit comments

Comments
 (0)