Creating more complete router-to-auth protocol

Registered by pierrelux on 2010-03-21

The new protocol must be more secure and allow remote management. We should be able to change the settings on the routers without having to connect through SSH.

Blueprint information

Status:
Not started
Approver:
gbastien
Priority:
Medium
Drafter:
pierrelux
Direction:
Needs approval
Assignee:
None
Definition:
Discussion
Series goal:
None
Implementation:
Not started
Milestone target:
None

Related branches

Sprints

Whiteboard

A possible system and building blocks :

- Oauth for router-to-auth authentication
- http://liboauth.sourceforge.net/ (does not contain much code) could be used as a starting point for implementing it, since using it as-is is not necessarily desirable (dependency and MIT licence).

XML-RPC might be interesting but most of the librairies available for OpenWrt depend on a lot of big components.
http://ulxmlrpcpp.sourceforge.net/ (not in Openwrt) could be used as it only depends on libexpat which is available in Openwrt and is small.

I think that a REST architecture would be simpler, as robust as a XML-RPC, and would require less depencies. Then libexpat could be used for BOTH XML configuration, and the custom REST protocol. libhttpd could be kept.

uclibc++ seems to be mature enough to do what we need.

I would suggest JSON instead of XML for a RESTful protocol. REST is the most appropriate for a small device, the overhead is very low, the complexity is low. http://www.digip.org/jansson/ Jansson is a small C lib with few dependencies and fairly mature if C++ is a must, it can be used readily. http://lloyd.github.com/yajl/ Yajl is similar.

I'm a bit curious why C++ is assumed best for the embedded part, I understand the benefits of OO but C++, when stripped of almost anything but classes, it isn't all that much better. When including the nice features / libraries it starts sliding away from the memory footprint that's desirable on a device with 8-12MB in userland RAM.

I also think it's best to first design the wire protocol.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.