6
1
mirror of https://git.mills.io/saltyim/saltyim.git synced 2024-06-16 03:48:24 +00:00
Commit Graph

9 Commits

Author SHA1 Message Date
lyse
c67f5c69b2 Fix typos (#186)
Disclaimer: I have no idea what I'm looking at.

Some tests fail, but I believe they have nothing to do with my changes
(fingers crossed). `make certs` doesn't work, I don't have `minica`
installed and don't want to litter my system with even more stuff. It's
bad enough that I got a shitload of Go dependencies downloaded when
running `make test`.

Co-authored-by: Lysander Trischler <twtxt@lyse.isobeef.org>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/186
Reviewed-by: James Mills <james@mills.io>
Co-authored-by: lyse <lyse@noreply@mills.io>
Co-committed-by: lyse <lyse@noreply@mills.io>
2023-01-27 23:24:19 +00:00
James Mills
14857206cb Add client e2e integration tests (#180)
Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/180
2023-01-26 22:30:16 +00:00
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
James Mills
95663345d4 Adds support for multiple chats (#174)
Closes #146

See attached screenshots.

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/174
Reviewed-by: xuu <xuu@noreply@mills.io>
2023-01-11 22:58:07 +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
3fccb3ae5f Add Avatar service and cli for updating avatar on a broker (#116)
This PR also:

- Tidies up the default options and config
- Tidies up the service user code

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/116
2022-04-02 02:59:39 +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
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
801d6b93bb Add support for client and server (broker) registration (#43)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/prologic/saltyim/pulls/43
2022-03-22 22:59:09 +00:00