Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insecure defaults from the setup instructions #90

Closed
alexellis opened this issue Apr 30, 2020 · 6 comments · Fixed by #537
Closed

Insecure defaults from the setup instructions #90

alexellis opened this issue Apr 30, 2020 · 6 comments · Fixed by #537
Labels
area/setup Issue related to tinkerbell setup kind/documentation Categorizes issue or PR as related to documentation. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.

Comments

@alexellis
Copy link
Contributor

After following the setup instructions, all services appear to be directly exposed on the Internet which is never a good idea, Kibana for instance has no authentication or TLS configured.

Screenshot 2020-04-30 at 16 48 38

Please consider removing this default in favour of accessing the dashboards via SSH tunnels or by using inlets.

Do the nodes even need a public IP? I hear that Packet now supports nodes with no public IPs, perhaps the terraform could provision a tiny Type0 to run Nginx as a reverse proxy with auth?

These are the ports that are open:

Screenshot 2020-04-30 at 16 50 02

I do not consider this to be a security advisory that needs to be handled via backchannels or email, this is probably just an oversight. If the team feel otherwise I can remove the issue.

@nathangoulding
Copy link
Contributor

Agreed. Can we collect some suggestions / thoughts?

  • The terraform script we provide for packet demo could set some basic iptables rules if it detects a public interface. It could also accept a flag or parameter to disable that default behavior.

  • We add a warning for those running the setup script manually, with some sane defaults.

Thoughts?

@alexellis
Copy link
Contributor Author

Hi Nathan,

Glad that this resonates. My suggestions are in the original issue:

    1. Use private Packet hosts only without any public IPs, with one Type0 added in which will act as a gateway running a reverse proxy Nginx would suit this task well and is easy to automate
    1. Configuration as above, but with users accessing the hosts over ssh tunnels via a jump box, with nothing exposed publicly. ssh -L 5601:provisioner-ip:5601 root@jump-host then access via localhost:5601
    1. Above configuration using inlets instead of SSH, punching out to an existing Packet host as a jump box.

I also think your idea about adding IP tables rules to prevent access to all of the above sounds good in principle. In practice Docker interferes with iptables and makes it impractical to achieve that result.

@alexellis
Copy link
Contributor Author

Example of inlets with HTTPS provided by Caddy, Caddy has an open usage license now can also decorate endpoints with basic auth as required for things like Kibana. https://blog.alexellis.io/https-inlets-local-endpoints/

@mrmrcoleman
Copy link
Contributor

First step is to add a warning on the website explaining that this is an insecure example while we're investigating an actual fix.

@gauravgahlot gauravgahlot added the area/setup Issue related to tinkerbell setup label Jun 3, 2020
@mrmrcoleman mrmrcoleman added the priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. label Jun 23, 2020
@alexellis
Copy link
Contributor Author

@gianarb I saw you closed the other script relating to ports. I think this one needs addressing rather than closing. Hopefully I can pre-empt you there.

@gianarb
Copy link
Contributor

gianarb commented Sep 16, 2020

This issue is ALWAYS in my mind! Yep we started something here #232 .

I think the same concept I tried to describe there applies here, but who knows, Kibana is not even part of the stack anymore.

@tstromberg tstromberg added the kind/documentation Categorizes issue or PR as related to documentation. label Jul 27, 2021
@jacobweinstock jacobweinstock mentioned this issue Sep 3, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/setup Issue related to tinkerbell setup kind/documentation Categorizes issue or PR as related to documentation. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants