a beautiful robot, dancing alone · showgirls über alles: kylie, angèle · masto · last.fm · listenbrainz · lovekylie

  • 24 Posts
  • 25 Comments
Joined 1 year ago
cake
Cake day: June 5th, 2023

help-circle










  • Prerequisites

    • Internet-facing web server with reverse proxy and domain name (preferably SSL of course)
    • Server behind the reverse proxy with Rust environment

    Installation

    • Don’t bother downloading the source code to your server; installing it that way gives you a big debug executable
    • Instead just cargo install mollysocket
    • Move the mollysocket executable if desired
    • Run mollysocket once so that it will emit the default config

    Configuration

    • Fish the config file out of .config/mollysocket/default-config.toml and copy it somewhere.

    config.toml

    • In the new file, replace the allowed_endpoints line with allowed_endpoints = ['*']. The default 0.0.0.0 config appears to be a bug; this setting controls access to endpoints within the app, not IPs from outside. Leaving the original value causes mollysocket to reject everything.
    • Put a proper path in the db = './mollysocket.db' line rather than just having it land wherever you’re sitting.
    • Delete the mollysocket.db that was created on first run (even if it’s already where you’re intending to put it). This is just to make sure the web server creates it and has the correct permissions.

    Run script

    • The environment variable ROCKET_PORT must be set or the server will sit and do nothing. It’s best to create all of the environment variables mentioned in the README, whether that is in a user profile script or in a shell script that wraps startup. You can change any of these values, but they must exist.
    • export ROCKET_PORT=8020
      export RUST_LOG=info
      export MOLLY_CONF=/path/to/your/config.toml
      

    Proxy server

    • You’ll need to proxy everything from / to your mollysocket server and ROCKET_PORT.
    • Exclude anything that you may need served from your web server, such as .well-known.

    Things to know






  • if your threat model were ‘encrypt everything at rest’, invitations to people outside your own service would be tricky as they have to be machine-readable text in a specific format. i’m sure it’s possible but you’d have to be specific in looking for that as a feature.

    my needs are more modest - don’t store email in GAFAM or particular regimes - and i use runbox, which is bog-standard except for being stored somewhere else, being paid, and having slightly more homely webapps. using ‘evolution’ on linux, a bog-standard email program that’s also a bit more homely than alternatives, invitations go out to whomever i choose and look normal. i make recurring events for myself all the time and remove individual occurrences. i’ve added on ical subscriptions for things like country holidays, which are the first thing you’ll notice missing when you leave outlook.

    the mail’s just imap and the calendar’s just caldav. when you get into providers that don’t provide imap or caldav for (valid) security reasons, that’s when you’re more likely to get integration issues with regular people.






  • summary (not sure why it didn’t get included here): jmp.chat pilots another way to detect unauthorized certificates

    We’ve been hard at work on a different tool that can also help with defense-in-depth for this kind of situation. Ultimately, a MITM will use a different public key from the one the server uses, even if it is wrapped in a signed certificate declared as valid by a trustworthy authority (like Let’s Encrypt). If we know what key is seen when trying to connect, and we know what key the server administrator expects us to see, we can detect an ongoing MITM of this variety even when the certificate presented is valid. The tool we have developed is in early testing now. We call it CertWatch.

    The premise is simple. The server administrator knows exactly what public/private keypair they are using (or can easily find out) and publishes this in DNSSEC-signed DNS records for our tool to find. The tool then periodically polls the XMPP server over Tor to see what certificate is presented. If the key in the certificate matches the key in the DNS zone, we know the session is not MITM’d (some caveats below). CertWatch checks the current setup of any domain entered, and if not yet declaring any keys, it displays setup instructions. It will either tell you to enable DNSSEC or it will tell you which DNS records to add. Note that these records are additive, so it is safe to add multiple sets when serving multiple domains from one host through SRV records. Once everything looks good, running a domain through CertWatch will display a success message and instructions for getting notified of any issues. It will then poll the domain periodically, and if any key mismatches are found, those subscribing to notifications will receive an alert.