Giter Club home page Giter Club logo

core's People

Contributors

davemackintosh avatar knownasilya avatar phiros avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

core's Issues

Design

Picking up from Strider-CD/strider#667

Idea

Thin API that communicates with drones and supports plugins. No UI in core, since it can be implemented as a plugin.

Goal

Lay-down a basic design and non-negotiables that should be in core.

TODOs

  • Look over Strider 2.0 Brainstorming issue (Strider-CD/strider#667) and pull out what needs to make it into this implementation.
  • Cover the following areas
    • Drone abilities/communication
    • Authentication/User Model
    • Plugin API
      • core
      • drone
    • What cannot be in core (important so we don't loose sight).
    • Long term goals
    • Testing
    • Documentation
  • Create issue to discuss technology stack (#2)

Does core need providers?

I'm just wondering if Core really needs providers e.g. Github, Bitbucket, etc, since the work will be done by the drones, core only handles the webhooks to trigger drones.

What would be the benefit of providers on core?

Place provider webhooks on project

Currently there is a github endpoint, but really it should be api/v1/projects/<projectId>/webhook/github

This will then trigger any environments that respond to the type of webhook triggered.

Broken tests

Running npm test, I get several failed tests (e.g. "โœ– Drone has a token" as the first one because the drone doesn't have an authorization header).

Syntax Style

I've started using standard which is a full package with no options. It is pretty standard, except for the possible use of no semicolons. The reason I chose this is so we can just start working, and so that we can have people contributing without wondering what standard to follow. There are less reasons not to use semicolons then there are to use them. See the link above, and let me know if this sounds acceptable.

The alternative would be to adopt an existing ESLint config (and maybe tweak).

Technology Stack

HTTP with streams?
HTTP long-poll?

RabbitMQ?
etc..

This is regarding core<->drone

Request for comment: security concept

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.

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.