Skip to content

This repository keeps the backend implementation for the Minkan end-to-end encrypted messenger.

License

Notifications You must be signed in to change notification settings

minkan-chat/server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo
Rust CI Bors enabled
The minkan server

This repository keeps the backend implementation for the Minkan end-to-end encrypted messenger.

The client talks to this service over a GraphQL API which is reachable via a HTTP POST request at /graphql. Both Json and CBOR can be used as encoding formats (though CBOR is much preferred).
The GraphQL schema is generated from the Rust structure. We have GraphQL Playground built in, so you can browse the docs and write queries.

In order to run this software, you'll need to create a file called config.toml:

Key Value
db_uri A postgresql url string.
host_uri The address the server should listen to.
jwt_secret A random hex encoded HS256 secret used by the server to sign it's JWTs.
server_cert An unprotected OpenPGP certificate for the server armor encoded. It must consist of Curve 25519 keys only.

You can generate a jwt_secret on a system with OpenSSL installed by running:

openssl rand -hex 32

On a system with GnuPG installed, you can also generate the server_cert:

gpg2 --expert --full-generate-key --allow-freeform-uid

Note: You have to be in expert mode (--expert).
Select ECC and ECC and then Curve 25519. Set key expiry to 0.

Example config.toml:

db_uri = "postgresql://my_user:[email protected]/my_database"
host_uri = "0.0.0.0:8000"
jwt_secret = "6ff255bdb7e89351457912b3511347c76273943b96e9e7ae26bd0ce6513c917f"
server_cert = """
-----BEGIN PGP PRIVATE KEY BLOCK-----

lFgEYQgVSRYJKwYBBAHaRw8BAQdAOBjDQeLTTF4k9+p9BHUWZYiZdLFQnd2koUW4
...
JmXRvnN8owY=
=k0FA
-----END PGP PRIVATE KEY BLOCK-----
"""

License

This software is licensed under the GNU Affero General Public License v3.0 or later. If you decide to contribute, you agree to license your contribution under the same license.

About

This repository keeps the backend implementation for the Minkan end-to-end encrypted messenger.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published