Giter Site home page Giter Site logo

cmass's Introduction

CMASS

####Centralized Multi-Agent Status Server (pronounced "sea mass")

CMASS allows ROS robots to communicate diagnostics to a server which can then serve them on the web.

Error finding image


Client

Launch with roslaunch cmass cmass_client

The client subscribes to ROS topics and periodically publishes them via HTTP to the server. It also sends the name of the computer (enabling it to serve as a DNS) and the name of the account that's logged in.

Server

Start with go run server/server.go

Command line args:

  • -debug print debug info

  • -file <string filename> file to save robot statuses (default ".robot_statuses")

  • -insecure don't require token to authenticate robot updates

  • -port <int portnumber> port number to run on (default 7978)

Security

If the server is running in secure mode, it will only process updates that include a valid token. Tokens are automatically generated by the ROS client and the IP Updater.

Error finding image

The security process begins by constructing a string (robot diagnostics) in the form of URL parameters. A salt, stored in /home/bwilab/.cmasskey, is appended to the parameter string and fed into a SHA-256 hash function. The salt is applied to the result of the hash and it is fed back into the hash function until 1000 hashes have been performed. (Why so many?) The result of the 1000th hash is the token, which is added to the string as an additional parameter. The string is now ready to sent to the server for evaluation.

When the server receives a request, it parses the URL into a string. The token is removed from the string and saved, which then leaves the original parameters. The hashing process is repeated on the server using its own .cmasskey. The result of the server's hash and the token received in the request are then compared; if they match, the request is valid and the server will update the robot status accordingly. If they don't, disregard the request.

A timestamp is added to the parameters to make the tokens expire. The server checks the received timestamp, if it is older than 5 seconds old or in the future, it is disregarded. This timestamp is used purely for time-sensitivity, the "Time Last Alive" field in the robot display is assigned when the server has already verified the token and is updating the robot's status.

Server Endpoints

/update           called by robots with their info
/text             serves all robot info (Most informative and readable)
/json             serves all robot info as json
/hosts            legacy support, serves robotname:IP
/hostsjson        legacy support, serves json of robotname:IP
/hostsalive       legacy support, serves robotname:IP of active robots
/hostsalivejson   legacy support, serves json of robotname:IP of active robots

cmass's People

Contributors

wsagehorn avatar

Watchers

Pato Lankenau avatar James Cloos avatar  avatar

Forkers

tvalitis98

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.