6
1
mirror of https://git.mills.io/saltyim/saltyim.git synced 2024-07-05 09:31:25 +00:00
Commit Graph

18 Commits

Author SHA1 Message Date
James Mills
ddd16c202f Add blob service and support for signing and verifying HTTP requests (#178)
Alternative to #177

The way this works is:

Client:

- Client creates a normal `net/http.Request{}` object using the `Request()` function in `utils.go`. The `http.Request{}` object is then signed using the Client's Ed25519 private key.
- The HTTP Method and Path (_note this is important_) are hashed, as well as the request body (if any) using the FNV128a hashing algorithm.
- This hash is then signed by the Client's's Ed25519 private key.
- The resulting signature is then encoded to Base64 (_standard encoding_) and added to the HTTP headers as a `Signature:` header.
- In addition the Client's Ed25519 public key is added to the HTTP headers as `Signer:`

Server:

- The server calculates the same FNV128a hash of the HTTP Request Method and Path and the body (if any)
- The server decodes the HTTP header `Signature:`
- The server then uses the Client's Ed25519 public key in the HTTP header `Signer:` to verify the signature of the `Signature:` HTTP header which gives us back the original FNV128a hash the Client calculated for the request.
- The server then compares the Client's hash with the expected hash to see if they compare equally.

Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
Co-authored-by: Jon Lundy <jon@xuu.cc>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/178
Reviewed-by: xuu <xuu@noreply@mills.io>
2023-01-25 23:05:29 +00:00
mlctrez
fcc4f53f20 navigation drawer is now fixed for > 900px windows (#157)
Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/157
Reviewed-by: James Mills <james@mills.io>
Co-authored-by: mlctrez <mlctrez@noreply@mills.io>
Co-committed-by: mlctrez <mlctrez@noreply@mills.io>
2022-04-07 03:43:09 +00:00
James Mills
832fb124fe Improve the registration process, add feedback to the PWA's UX adn use an API for registration (#147)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/147
Reviewed-by: xuu <xuu@noreply@mills.io>
Co-authored-by: James Mills <james@mills.io>
Co-committed-by: James Mills <james@mills.io>
2022-04-04 16:04:38 +00:00
James Mills
908e4cf525 Fix SyntaxError :D (#132)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/132
Reviewed-by: xuu <xuu@noreply@mills.io>
Co-authored-by: James Mills <james@mills.io>
Co-committed-by: James Mills <james@mills.io>
2022-04-03 01:11:33 +00:00
xuu
5b01e82897 fix: outbox-subscribe (#131)
Co-authored-by: Jon Lundy <jon@xuu.cc>
Co-authored-by: xuu <me@sour.is>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/131
Co-authored-by: xuu <xuu@noreply@mills.io>
Co-committed-by: xuu <xuu@noreply@mills.io>
2022-04-03 01:03:45 +00:00
xuu
35c4ecca6f feat: sbscribe to outbox (#128)
Co-authored-by: Jon Lundy <jon@xuu.cc>
Co-authored-by: xuu <me@sour.is>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/128
Reviewed-by: James Mills <james@mills.io>
Co-authored-by: xuu <xuu@noreply@mills.io>
Co-committed-by: xuu <xuu@noreply@mills.io>
2022-04-02 22:32:12 +00:00
James Mills
6a92c9d30a Add support for indexing and persisting inbox index state (#121)
TODO:

- [ ] Remove `replace` directive after testing...

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/121
2022-04-02 14:15:46 +00:00
James Mills
b885d2cf4d Fix some minor UX issues with the input box (#118)
Partially fixes some of the issuses found in #117

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/118
Reviewed-by: xuu <xuu@noreply@mills.io>
2022-04-01 12:36:38 +00:00
James Mills
95be492208 Add support for sender interfaces and the pwa to fallback to sending via a broker as fallback (#101)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/101
Reviewed-by: xuu <xuu@noreply@mills.io>
2022-03-31 03:46:12 +00:00
James Mills
57a6ff5ec1 Add support for performing lookups via the broker we were served from (#99)
Depends on #95

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/99
2022-03-31 00:51:38 +00:00
mlctrez
d6fcad992c new chat should also update contacts (#92)
Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/92
Co-authored-by: mlctrez <mlctrez@noreply@mills.io>
Co-committed-by: mlctrez <mlctrez@noreply@mills.io>
2022-03-30 00:35:43 +00:00
James Mills
f9fa628e75 Add support for new contacts appearing in contact list automatically (#89)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/89
2022-03-29 22:06:06 +00:00
James Mills
07d28ba5d4 Use the Client's builtin cache for addr lookups and do the send async (#84)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/84
2022-03-29 00:24:03 +00:00
mlctrez
969a263d06 support for contacts, multiple chat threads, and persistence (#77)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Co-authored-by: James Mills <james@mills.io>
Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/77
Co-authored-by: mlctrez <mlctrez@noreply@mills.io>
Co-committed-by: mlctrez <mlctrez@noreply@mills.io>
2022-03-28 21:49:01 +00:00
xuu
38a6d71644 xuu/bot (#64)
Co-authored-by: Jon Lundy <jon@xuu.cc>
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/64
Co-authored-by: xuu <xuu@noreply@mills.io>
Co-committed-by: xuu <xuu@noreply@mills.io>
2022-03-26 14:43:05 +00:00
James Mills
211f725986 Fix Lookup to actually use SRV records (where available) and refactor (#62)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/62
Reviewed-by: xuu <xuu@noreply@mills.io>
2022-03-25 23:49:44 +00:00
James Mills
d0ecf8eb16 Fix support for 2-way chat (receive works 🥳) 2022-03-25 22:47:06 +10:00
James Mills
3b300f09fd pwa: Fix the name of the main component to be SaltyChat 2022-03-25 21:28:35 +10:00