Skip to content

Latest commit

 

History

History
120 lines (82 loc) · 5 KB

README.md

File metadata and controls

120 lines (82 loc) · 5 KB

WeChat

Table of Contents

  1. About
  2. What we Learnt ?
  3. Features
  4. Project structure
  5. Dependencies
  6. Setup
  7. Demo

About

A chatroom application written in python , that is based on RabbitMQ using LDAP for authentication and RSA encryption

What we Learnt ?

  • Objective 1: LDAP server configuration, managing user authentication.
  • Objective 2: How to set up a certificate authority server that accepts certification requests, creates them, then signs them in order to verify their state
  • Objective 3: How to use RabbitMQ for chatting.
  • Objective 4: How to use RSA encryption/decryption for secure communication

Features

1- Client side :
      . Register -> Enter credentials To create an account
      . Login
      . View all connected users
      . Select a chat room
      . View all users in that room
      . Using RSA technique to encrypt/decrypt all messages sent between clients.
      . Quit the application

2- Server side :
      . Add new user to the active directory via LDAP
      . Get a x509 certificaton via certificate authority server
      . On login,verify user in the active directory via LDAP
      . Verify the Certificate signature via authority server
      . Start communication with RabbitMQ server
      . Encrypt /decrypt messages while exchanging them between users

Project structure

 WeChat/
   └── certificate_authority/
     ├── ...
     ├── ca_server.py
     ├── ...
   ├── ...
   ├── controller.py
   ├── home.py
   ├── welcome.py
   ├── client_interface.py
   ├── ...

Dependencies

  • RabbitMQ: Messaging Broker based on AMQP protocol.
  • pycryptodome: A python library for encryption/decryption.
  • Tkinter: Tkinter is the de facto way in Python to create Graphical User interfaces (GUIs) and is included in all standard Python Distributions.
  • cryptography: python library for X509 certs.
  • OpenLDAP: is an open-source implementation for LDAP protocol
  • LAM: LDAP Account Manager (LAM) is a webfrontend for managing entries stored in an LDAP directory
  • Pika: Rabbitmq python client

Setup

1. Open LDAP server in your machine

2. Run rabbitMQ service

3. Clone the WeChat repository locally

4. Install dependencies

5. Add .env file that contains:

    - CA_SELF_CERT (the path to the self signed certificate of the certificate authority)
    - CA_PRIVATE_KEY (the path to the certificate authority private key)
    - CA_CLIENT_CERT_DIR (the path to the directory which will contain the clients' certificates)
    - CA_CLIENT_KEY_DIR (the path to the directory which will contain the clients' private keys)
    - CA_CLIENT_CSR_DIR (the path to the directory which will contain the clients' certificate requests)
    - LDAP_DC (the domain's name in the connection string of LDAP server)

6. Create an Instance of Authority-server

$ python3 ./certificate_authority/ca_server.py

7. Create an Instance of Messaging controller

$ python3 ./controller.py

8. Run

$ python3 ./home.py

Demo

Demo Video