janitor icon indicating copy to clipboard operation
janitor copied to clipboard

Allow sharing access to your container ports to enable live collaboration (IDE, VNC, web preview...)

Open jankeromnes opened this issue 8 years ago • 5 comments

  • [x] To enable Cloud9 collaboration, add --collab to https://github.com/JanitorTechnology/dockerfiles/blob/d25a150613cb02c32a1d6ef97ba1a4beaeb3494c/ubuntu-dev/supervisord.conf#L10
  • [ ] To expose it, find out how to give other Janitor users access to the collaborative IDE URL (currently, Janitor users can only access containers that they actually own)
  • [ ] In the sharing UI, we should be very clear that sharing container access may allow others to view sensitive credentials like OAuth tokens and API keys (see also https://github.com/github/hub/issues/1668#issuecomment-363175351)

jankeromnes avatar Oct 27 '17 12:10 jankeromnes

The --collab argument was added in https://github.com/JanitorTechnology/dockerfiles/commit/acc5035ba7579d144c81115f9cb0a928c9b130b2.

Now we can try to use the IDE in collaborative mode / figure out how to make the feature easy to use.

jankeromnes avatar Nov 06 '17 13:11 jankeromnes

It could be done by allowing other users to access your container ports, and then giving them the same URL you're using, e.g. https://pianosa.janitor.technology/abcd1234/8089/

In the above example, if you don't own the container abcd1234, the Docker host's API call to https://janitor.technology/api/hosts/pianosa.janitor.technology/containers/abcd1234/3000 will result in a 404 error.

We could tweak this API handler to check an access list (which could be edited by container owners using a new API handler for sharing containers) instead of just verifying container ownership.

jankeromnes avatar Nov 28 '17 21:11 jankeromnes

A quick little mockup of how this feature can look like:

screen shot 2018-03-06 at 02 25 51

nt1m avatar Mar 06 '18 02:03 nt1m

Thanks a lot for this mockup! It's perfect 😄 I want this feature so bad...

Random thought: If we have a URL that can point to a specific container and a specific tab, we could potentially redirect Cloud9 IDE's "Share" button to this panel in Janitor.

Edit: Maybe something like https://jntr.io/containers/#abcdef0123456-share? Would probably require some JS though, unfortunately.

jankeromnes avatar Mar 06 '18 10:03 jankeromnes

@bnjbvr would also like a feature to "share publicly" 😄 (I'm thinking maybe port-specific, e.g. just share a web preview but not Cloud9 IDE, and with a secret URL).

jankeromnes avatar Mar 06 '18 16:03 jankeromnes