Skip to content

Accounts microservice for Convid remote access solution. This microservice handles Accounts and Machine registrations.

License

Notifications You must be signed in to change notification settings

labbsr0x/convid-accounts-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c35d4a4 · Apr 7, 2020

History

39 Commits
Apr 7, 2020
Mar 26, 2020
Mar 18, 2020
Apr 7, 2020
Apr 7, 2020
Mar 17, 2020
Apr 7, 2020
Apr 7, 2020
Apr 7, 2020
Apr 7, 2020
Mar 23, 2020
Apr 7, 2020

Repository files navigation

convid-accounts-backend

Accounts microservice for Convid remote access solution. This microservice handles Accounts and Machine registrations.

Getting started

  1. Generate your pair of keys (public/private) executing this command:
bash create-keys.sh

or go to https://8gwifi.org/jwsgen.jsp and saving the private key to test_rsa.key and the public key to test_rsa.pub

  1. Run the project using this command:
MONGODB_USUARIO=usuario MONGODB_SENHA=senha docker-compose up -d

or you can execute ./start-dev

  1. You can check the api is running calling the url http://localhost:9999

  2. Create a test account without TOTP:

curl --header 'Content-Type: application/json' -X POST http://localhost:9999/account -d '{"accountId":"00000000222200","email":"no-totp@email.com"}'
  1. Create a test account with TOTP:
curl --header 'Content-Type: application/json' -X POST http://localhost:9999/account -d '{"accountId":"00000000111100","email":"totp@email.com", "totp":true}'
  1. Fetch the created accounts:
curl -X GET http://localhost:9999/account

Now your server is up, running and able to supporte accounts with or without TOTP enrollment

Using this backend to generate SSH-JWT server enrollments

To use this Backend as a JWT Token provider with RS512 pub/priv key with a SSH-JWT you must copy the public key (.pub file) to the SSH-JWT server and pass it as a secret, as pointed at https://github.com/flaviostutz/ssh-jwt#rs512-pubpriv-signing-key

About

Accounts microservice for Convid remote access solution. This microservice handles Accounts and Machine registrations.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages