Skip to content

Request for comment: security concept #17

@phiros

Description

@phiros

Core can send arbitrary (shell) commands to drones. Thus, it is very important to have a
well-designed security concept in place.

Therefore, I'd like to ask all of you:
How do you think security should be handled for:

  • core <-> drone communication?
  • core <-> client communication (the web front-end written in ember js)?

For people who haven't looked into the source code of core, drone and client yet, the communication
between those entities follows this pattern:
A drone polls core for new jobs via a HTTP GET request and communicates any generated output via primus (a web socket) to core. Client queries core via a REST API and displays information about jobs (current status, results, output etc.). Additionally it is planed that client gets live updates
from drones (trough core) via primus (job output / status etc.).

My random thoughts on securing all of this:

  • Some kind of transport layer security is needed (HTTPS). I am not sure whether we can delegate this to Nginx or something similar (see Core <-> drone authentication).
  • New jobs shouldn't be received by drones via polling the REST API of core. Instead they should be pushed from core to drones via primus (clients connect to core via primus; this channel is then used to push jobs from core to client)
  • Core needs to authenticate drones and drones need to know that they are really talking to core.
    I thought web sockets + TLS would be a good solution for this (server + client-side certificates). This would also offer the added benefit of giving us drone blacklisting 'for free' via certificate revocation lists on the CA.
    However, I am unsure on how to implement this with primus.
  • We need some kind of mechanisms which allows client to trigger some 'privileged' actions on core (stopping / restarting jobs etc.). I thought about using hapi-auth-jwt2 + some kind of OAUTH mechanism but the details on how to do this are still blurry (I've never done any oauth stuff).
    Any recommendation on how to do this (or actual code contributions) would be more than welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions