0.0.7 • Published 8 years ago

decentraleyes-utils v0.0.7

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

decentraleyes-utils

Decentraleyes.net Utils service reference implementation

Architecture

Every service in Decentraleyes.net is shipped as a standalone module to allow SysOps the freedom to:

  1. Determine whether or not they use each module;
  2. Determine when/if they upgrade them; and
  3. Change or even entirely rewrite them from scratch.

Each service module implements an interface made of public methods and routes. If the public interface is maintained, Decentraleyes.net doesn't care what amount of actual work is performed within the service as long as it succeeds and generates a result expected by the user per the documented interface contract of the service.

For example, a SysOp might not want to use MongoDB or might even want to use a database they created. Such a user could create a new service and write the logic needed to use their custom database while providing service as expected through Decentraleyes.net including beacons, notifications and so on.

service-options.json

The service-options.json file lets the SysOp set certain options that simply don't make sense to store in the database and/or edit (or even expose) through the web front end. Any standard text editor can be used to change the contents of service-options.json. It is simply a JavaScript Object Notation (JSON) file. You are, for example, free to set the value of passwordSalt to a function that does whatever you need done to generate a password salt value.

passwordSalt

Should be set to something unique to your installation such as a UUID/GUID or similar. Can be any unique string. The password salt is prepended to passwords when generating password hashes to be stored in the database. As such, the only thing that can make a password used on your node unique from the same password used on another node is your password salt.

Most Linux systems and MacOS X ship with the command line tool uuidgen to create new UUIDs. Windows users can use some sort of Microsoft tool, I'm sure of that. But, Microsoft calls these things GUIDs. So, you might be looking for a GUID tool or something of that nature. Have fun!

No, the salt doesn't need to be a UUID. It's just one of the better choices (if not actually the best choice) for generating a string of characters unique to your node. Do whatever you want. They're your users and its their trust (not mine).

Public Methods

maskPassword (password)

Produces an SHA-256 hash of the password supplied using the service's configured password salt.

Public Routes

none

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago