summaryrefslogtreecommitdiffstats
path: root/docs/rfc.txt
diff options
context:
space:
mode:
authorbt <bt@rctt.net>2026-04-18 23:12:11 +0200
committerbt <bt@rctt.net>2026-04-18 23:12:33 +0200
commitd63176e22d21e347cf1c197084afe8eb1d5376b4 (patch)
tree501b77a9094dfa09acccaebd7698aee256309925 /docs/rfc.txt
parente9aebac1a2a4732763c2f7e4428a23983d4eb6a3 (diff)
downloadsolec-d63176e22d21e347cf1c197084afe8eb1d5376b4.tar.gz
solec-d63176e22d21e347cf1c197084afe8eb1d5376b4.zip
[docs] Update protocol docsv0.2.0
Diffstat (limited to 'docs/rfc.txt')
-rw-r--r--docs/rfc.txt56
1 files changed, 35 insertions, 21 deletions
diff --git a/docs/rfc.txt b/docs/rfc.txt
index ffd2f67..83cd029 100644
--- a/docs/rfc.txt
+++ b/docs/rfc.txt
@@ -34,9 +34,10 @@ Table of Contents
2.4.6. Message
2.4.7. Test
2.5. Sequential operations
- 2.5.1. Client-Server connection initialisation
- 2.5.2. Server-Server connection initialisation
- 2.6. Server
+ 2.6. Client-Server connection initialisation
+ 2.7. Exchanging messages between servers
+ 2.7.1. Authentication
+ 2.7.2. Server-Server connection initialisation
1. Introduction
@@ -167,7 +168,7 @@ Table of Contents
+------+------------+------------+
| 0x03 | Handshake | SC |
+------+------------+------------+
- | 0x04 | UserAuth | C |
+ | 0x04 | UserAuth | C |
+------+------------+------------+
| 0x05 | Message | SC |
+------+------------+------------+
@@ -202,8 +203,6 @@ Table of Contents
| 0x02 | Not found. User or channel cannot access user or |
| | channel. |
+------+------------------------------------------------------------+
- | 0x03 | Server auth failed. Unknown name. |
- +------+------------------------------------------------------------+
Table 3
@@ -310,7 +309,7 @@ Table of Contents
this specific operation (for example incoming message) cannot
interrupt this process.
-2.5.1. Client-Server connection initialisation
+2.6. Client-Server connection initialisation
+--------+ +--------+
| Client | | Server |
@@ -322,20 +321,40 @@ Table of Contents
| Send [Handshake] |
+--------------------------->|
| |
- | +- If [ver_major] does not match server
- | | protocol version close the connection
+ | +- If [ver_major] does not match
+ | | server protocol version close
+ | | the connection.
| |
- | Send [UserAuth] |
+ | Send [UserAuth] |
+--------------------------->|
| |
| Send [Error 0x01] |
- |<---------------------------+- If [username] or [password] does not match
- | | and close the connection
+ |<---------------------------+- If [username] or [password]
+ | | does not match and close
+ | | the connection.
| |
| Send [Sucesss] |
|<---------------------------+
-2.5.2. Server-Server connection initialisation
+2.7. Exchanging messages between servers
+
+ Exchanging messages between SOLEC servers is a core concept behind
+ the project. Sending message to user residing on a different server
+ require estabilishing a connection between both servers.
+
+2.7.1. Authentication
+
+ Server authentication is crucial to prevent message spoofing and
+ other forms of abuse. Server cannot use same auth process as clients
+ because that would require creating account for each server on any
+ other server which is impossible. Possible solution are TLS or other
+ public key based protocol.
+
+ As for now the issue remains open and server authorization uses mock
+ [ServerAuth] payload which specifies just the connecting server name.
+ This is obviously insecure.
+
+2.7.2. Server-Server connection initialisation
+--------+ +--------+
| Server | | Server |
@@ -347,17 +366,12 @@ Table of Contents
| Send [Handshake] |
+--------------------------->|
| |
- | +- If [ver_major] does not match server
- | | protocol version close the connection
+ | +- If [ver_major] does not match
+ | | server protocol version close
+ | | the connection.
| |
| Send [ServerAuth] |
+--------------------------->|
| |
- | Send [Error 0x03] |
- |<---------------------------+- If [name] is not present in known public
- | | keys list.
- | |
| Send [Sucesss] |
|<---------------------------+
-
-2.6. Server