ernestio / ernest

Ernest is a tool to define, manage and collaborate on your infrastructure
http://ernest.io/
Mozilla Public License 2.0
17 stars 6 forks source link

Closed source from api to papi #879

Open adriacidre opened 6 years ago

adriacidre commented 6 years ago

Preamble

Idea: <to be assigned>
Title: Closed source from api to papi
Status: Draft
Created: 2018-02-19

Summary

Move open source enterprise logic present on the api to the closed source papi

Product Overview

There is a lack of consistency on how enterprise code is exposed as open source on the api-gateway. So anybody can access source code suposed to be only exposed to closed source contributors.

Product Description

Actually there are some endpoints on the api refering to enterprise modules:

        "notifications/add_env"
        "notifications/add_project"
        "notifications/create"
        "notifications/delete"
        "notifications/list"
        "notifications/rm_service"
        "notifications/update"
        "envs/sync"
        "envs/resolve"
        "envs/submission"
        "envs/review"
        "policies/create"
        "policies/get"
        "policies/delete"
        "policies/list"
        "policies/update"

So on each endpoint, you have code that potentially may belong to an enterprise ernest version. This can be somehow confusing for anybody working from the open source side. Plus it can expose code potentially closed source.

As all requests on Ernest Enterprise(EE) are passing through a lightweight proxy papi, makes sense to move this specific logic to that proxy, so any enterprise requests will be captured and served by papi, while in case papi is not present they will respond with a 404.