[!Note] For English, scroll below the French part
Ce repository a deux objectifs principaux:
- Permettre de tester eo-connect en avance de phase des développements par Vestalis (branche
testing) - Servir d'implémentation de référence pour Vestalis (branche
main)
Ce code a été écrit en rust 1.69.0 et doit donc être installé soit manuellement via rustup, soit via nix en utilisant le fichier shell.nix fournit.
Trois variables d'environnement doivent être présente pour pouvoir lancer le serveur :
- SIGNATURE_KEY doit contenir le chemin vers la clé privée utilisé pour la signature.
- CIPHER_KEY doit contenir la clé de chiffrement partagée entre Eove et Vestalis.
- CONNECT_NAME doit contenir le nom du serveur eo-connect à utiliser.
Le fichier secrets.nix.template donne les valeurs à utiliser en cas d'utilisation locale et peut être copié en secrets.nix pour être chargé automatiquement par nix.
Pour une utilisation standard (en local), des secrets ont été commités, ainsi aucune génération n'est nécessaire. Les scripts de génération sont toute fois documentés à toute fin utiles.
Les clés de signature ed25519 peuvent être générées via :
bash ./scripts/generate-ed25519.shElles seront alors disponible dans security/keys.
La communication avec le serveur est sécurisée via HTTPS. Il faut donc créer une authorité et un certificat pour le serveur. La commande :
bash ./scripts/generate-ca.shCrée une autorité dans le dossier security/ca.
Le mot de passe de l'autorité commité est iMe*Fa$YJ3$E%^psDUMQA9Swc2AT8q
La commande :
bash ./scripts/generate-server-certificate.shCrée un certificat pour le serveur pour qu'il tourne sur localhost dans le dossier security/server.
Si le nom de domaine souhaité est différent, alors il faut créer un fichier .ext en s'inspirant de scripts/vestalis.ext et renseigner la variable d'environnement SERVER_CERTIFICATE_EXTENSION_PATH pour contenir le chemin vers ce fichier.
La commande précédent créera alors un certificat adapté.
Enfin, si le certificat et/ou l'autorité ne sont pas crées dans les dossiers mentionnés, alors il faudra mettre à jour le fichier Rocket.toml en fonction.
Pour lancer le serveur, lancer la commande suivante :
cargo runLe serveur sera alors accessible sur le port 8042.
L'exemple décrit par les spécifications a été implémenté en tant que test. Le test peut être lancé via :
cargo testThis repository has two main aims:
- Allows to test eo-connect in early phases of development (
testingbranch) - Serves as an implementation reference (
mainbranch)
This code was written using Rust 1.69.0 and must therefore be installed manually using rustup, or with nix using the shell.nix file.
Three environment variables must be available to launch the server:
- SIGNATURE_KEY must contain the path to the private key used for the signature.
- CIPHER_KEY must contain the shared cipher (agreed upon between Eove and the partner).
- CONNECT_NAME must contain the name of the eo-connect server to use.
The secrets.nix.template gives the values to use locally and can be duplicated as secrets.nix to be loaded automatically by nix.
For a standard usage (locally), some secrets were committed, that way no generation is necessary. The generation scripts are still documented below to ease any development.
The ed25519 signature keys can be generated using:
bash ./scripts/generate-ed25519.shThey will then be available in security/keys.
The communication with the server goes over HTTPS. It's therefore necessary to create a certificate authority and a certificate for the server:
bash ./scripts/generate-ca.shThis creates the certificate authority in the folder security/ca.
The password of the committed authority is iMe*Fa$YJ3$E%^psDUMQA9Swc2AT8q
Then generate the certificate using:
bash ./scripts/generate-server-certificate.shThis creates a certificate for a localhost server, it is available in security/server.
If the desired domain name is different, an .ext file must be created, using scripts/vestalis.ext as an example, and providing the environment variable SERVER_CERTIFICATE_EXTENSION_PATH containing the path to this file.
The previous command will generate the correct certificate.
Finally, if the certificate and/or authority are not created in the aforementioned folders, then the Rocket.toml file must be updated with the correct values.
To launch the server, using the following command:
cargo runThe server will then be available on the port 8042.
The example described in the specifications was implemented as a test in this project. It can be launched using:
cargo test