Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature : pki and routing #19

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

SKnight-s
Copy link

Changelog :

Refactoring :

Tests :

  • Topology system : Store data about the shoset’s configuration
  • utils_for_test : Functions to easily deploy a topology or a single shoset from a topology.
  • Example of use of the project.
  • Script (run_shoset.sh) to avoid using aliases to clear the .shoset folder before testing.
  • Test multiprocesses :
    • VScode task to launch many scripts in many dedicated terminals at once (need an IDE agnostic way of doing it).

Other :

  • message :

    • syntax has changed
  • change the ConfigFunc, EventFunc,... to handlers with a common interface

  • stdout prints now proper logging

  • Acknowledge on join and link to know when the connection is ready. (Move storage of the connection after the acknowledge is received.

  • Add protocol field to shosetConn.

  • Change in the behaviour of the configuration storage :

    • Configuration folder for a shoset is in a folder named after the Lname (for readability).
    • Every connection established is stored in the config folder (not only out).
    • When a connection is established, any prior connection to the same Lname on the same IP address is deleted.
    • When an OEF is received, the connection is deleted.
    • Connections can switch from “in” to “out” if a shoset is relaunched.
    • Update script cert_checker.sh (not fully working).
  • mapsyncmap : Generic accessor for append, get and delete.

  • config : Generic accessor for append and delete.

  • Generic function for receiving (Wait) and sending (Send) a message of any type (for which the speceific fonctions are defined).

  • Event bus :

    • Event based Wait function for increased speed and efficiency (not benchmarked) (only for simpleMessage and event).
    • Used in concurentSlice, allows to wait for changes or the slice to be empty. (Used to know when every connection of the shoset is ready.)
  • const.go : to store all the constants used in the project.

  • Various list of message types to define which can do what. (See guide on how to create a new message type.)

Documentation :

  • Guide on how to use the project.
  • Script to generate class diagram and call diagram. (see guide)

Fixes :

  • Data race elimination :
    • Add missing Lock on IsEmpty() and way to lock it from the outside in queue.go.
    • Add RWMutex to Shoset and ShosetConn.

Features :

New PKI :

  • authentication with a certificate authority (CA)
  • single and double way shoset connection

New Routing system :

  • See guide for general principle.
    • Logic to forward receive and send forwardable messages.
    • Message type routingEvent to advertise Lnames in the network.
    • Message type simpleMessage to test message forwarding.
    • Message type forwardAck to confirm the reception of the forwarded message.

Others :

  • ci: Dockerfile
  • CPU/memory profiler and tracer.

Work to be done :

Tests :

  • not all the changes have been fully tested. (but basic tests are working)
  • It lacks unit tests (sonarcloud tests won't pass)

PKI :

  • For now, no password is needed to ask a certificate from the CA.

Routing system :

  • The routing system is not used by the majority of messages yet.

@SKnight-s SKnight-s requested a review from Zorin95670 February 24, 2023 09:10
@SKnight-s SKnight-s self-assigned this Feb 24, 2023
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 18 Code Smells

0.0% 0.0% Coverage
3.5% 3.5% Duplication

@SKnight-s SKnight-s mentioned this pull request Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant