wrfly / container-web-tty

Connect your containers via a web-tty
https://container-web-tty.kfd.me/
Apache License 2.0
246 stars 45 forks source link

Disable terminals #35

Closed SrMouraSilva closed 5 years ago

SrMouraSilva commented 5 years ago

Hello, is there any way to disable the terminals and only provide the logs?

wrfly commented 5 years ago

Yes, just remove these lines if you want https://github.com/wrfly/container-web-tty/blob/5c0e849dd5f05f53f302408f7e5778802ad30e4b/route/route.go#L127-L129

SrMouraSilva commented 4 years ago

Hello @wrfly, it's possible to add a control to disable the terminal and the exec like the global options? https://github.com/wrfly/container-web-tty/blob/master/README.md#options

wrfly commented 4 years ago

Hi, since it's web-tty, the main purpose is to let people exec into containers, so I think it's not good to have such a flag to disable the tty function. But you can fork your own version to support this kind of features, quite easy to add a flag, WDYT?

SrMouraSilva commented 4 years ago

Hello, @wrfly. In my case, the principal purpose is the log. As this tool does not have authentication, the exposure (even in an internal network) can become dangerous. I am still integrating an authentication functionality.

I can make a pull request with this functionality.

wrfly commented 4 years ago

That would be very cool!

wrfly commented 4 years ago

Hi, I just thinking, how about add a basic auth to the index page? and put a rate limitter to limit the IP.

SrMouraSilva commented 4 years ago

@wrfly I'm sorry, I ended up expressing myself in a confused way. I added authentication by reverse proxy, before the container. Also by reverse proxy I restricted access to the log only.

wrfly commented 4 years ago

@SrMouraSilva OIC, then I'll put the "basic auth" feature in the TODO list.