1- Community authentication 2.0
2- ============================
1+ Community authentication 2.0-4.0
2+ ================================
33While the old community authentication system was simply having the
44clients call a PostgreSQL function on the main website server, version
552.0 of the system uses browser redirects to perform this. This allows
@@ -63,7 +63,8 @@ The flow of an authentication in the 2.0 system is fairly simple:
6363#. This dictionary of information is then URL-encoded.
6464#. The resulting URL-encoded string is padded with spaces to an even
6565 16 bytes, and is then AES-SIV encrypted with a shared key and a 16
66- byte nonce. This key is stored in the main website system and
66+ byte nonce (v4 uses ChaCha20_Poly1305 with standard size key and nonce,
67+ but v3 is the preferred version). This key is stored in the main website system and
6768 indexed by the site id, and it is stored in the settings of the
6869 community website somewhere. Since this key is what protects the
6970 authentication, it should be treated as very valuable.
@@ -77,7 +78,7 @@ The flow of an authentication in the 2.0 system is fairly simple:
7778#. The community website detects that this is a redirected authentication
7879 response, and starts processing it specifically.
7980#. Using the shared key, the data is decrypted (while first being base64
80- decoded, of course). Since authenticated encryption using AES-SIV
81+ decoded, of course). Since authenticated encryption using AES-SIV or ChaCha20_Poly1305
8182 is used, this step will fail if there has been any tampering with the
8283 data.
8384#. The resulting string is urldecoded - and if any errors occur in the
@@ -115,6 +116,17 @@ The flow for a logout request is trivial:
115116 at the URL <redirection_url>?s=logout (where redirection_url is the
116117 same URL as when logging in)
117118
119+ Versions
120+ --------
121+ The different versions are primarily different in that they use different
122+ encryption algorithms.
123+
124+ v2 uses standard AES without authentication. This version is *deprecated *.
125+ v3 uses AES-SIV authenticated encryption. This is the *recommended * vcersion.
126+ v4 uses ChaCha20_Poly1305 authenticated encryption, for platforms that don't
127+ support AES-SIV.
128+
129+
118130Searching
119131---------
120132The community authentication system also supports an API for searching for
0 commit comments