Sign inSign up

nickmsft/e2eeservices

By nickmsft

•Updated almost 5 years ago

End-to-End Encryption Service

Image
0

364

nickmsft/e2eeservices repository overview

End-to-End Encryption Service With OpenSSL by Rust

Prerequisite

  • MySQL
  • Redis

Create docker network

docker network create --driver bridge e2eeservice_network

Docket network inspect

docker network inspect e2eeservice_network

Run E2EE Service

docker stop e2ee_service
docker rm e2ee_service  

docker run --name e2ee_service --network e2eeservice_network  -v $(pwd)/config/config.toml:/usr/local/bin/config.toml -p 8080:8080 -d nickmsft/e2eeservices:1.0-alpha

Create database and users

CREATE DATABASE user_profile CHARACTER SET utf8 COLLATE utf8_general_ci;

use user_profile;

GRANT ALL PRIVILEGES ON user_profile.* TO 'user_profile'@'%' IDENTIFIED BY 'password1234';
GRANT ALL PRIVILEGES ON user_profile.* TO 'user_profile'@'localhost' IDENTIFIED BY 'password1234';

Config.toml

[application]
http_worker = 20


[redis]
e2ee_cache_url = "redis://172.18.0.3/"


[database]
user_profile_url = "mysql://root:[email protected]:3306/user_profile"

Step 1) Create Module

curl -v --header "Content-Type: application/json" \
  --request POST \
  --data '{"module_name":"nick sprint v2"}' \
  http://localhost:8080/v1/registering_module

Step 2 ) Create User Id Under System Module

curl -v --header "Content-Type: application/json" \
  --request POST \
  --data '{"module_id":1,"login_id":1}' \
  http://localhost:8080/v1/register_user_id

Step 3) Request pre-auth code

curl -v --header "Content-Type: application/json" \
  --request POST \
  --data '{"login_id":1,"module_id":1}' \
  http://localhost:8080/v1/preauth

Tag summary

Content type

Image

Digest

Size

33.6 MB

Last updated

almost 5 years ago

docker pull nickmsft/e2eeservices:1.0-alpha