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

terraform: allow GCP console access without opening debugd port #3357

Closed
wants to merge 1 commit into from

Conversation

msanft
Copy link
Contributor

@msanft msanft commented Sep 16, 2024

Context

On GCP, access to the serial console needs to be enabled via a metadata attribute. Previously, this has always been set to the debug variable, that also opens up the debugd port, which is unnecessary and potentially security-relevant for non-debug images, where arbitrary other services could bind to the debugd port by accident.

Proposed change(s)

  • Add a separate flag to enable serial console access without opening the debugd port.

Checklist

  • Add labels (e.g., for changelog category)
  • Is PR title adequate for changelog?
  • Link to Milestone

@msanft msanft force-pushed the msanft/test/autologin branch from 157b4f0 to 1d013a6 Compare September 16, 2024 06:56
@msanft msanft added the no changelog Change won't be listed in release changelog label Sep 16, 2024
@msanft msanft added this to the v2.19.0 milestone Sep 16, 2024
@msanft msanft force-pushed the msanft/test/autologin branch from 1d013a6 to e66e47e Compare September 16, 2024 07:01
@msanft msanft requested a review from elchead as a code owner September 16, 2024 07:01
Copy link
Contributor

@burgerdev burgerdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change LGTM, but I don't quite understand the argument in the description: are you saying that we've been exposing the debug port when using a non-debug console image before? I don't see how, and this PR does not seem to address that.

@msanft
Copy link
Contributor Author

msanft commented Sep 16, 2024

The change LGTM, but I don't quite understand the argument in the description: are you saying that we've been exposing the debug port when using a non-debug console image before? I don't see how, and this PR does not seem to address that.

If someone were to try and get console access to a GCP console image before, he would have to enable the debug variable, which also exposed the port. This PR adds a knob so that you can get console access without opening the port.

@daniel-weisse
Copy link
Member

Why is this necessary?
The serial console is only usable for debug (and console) images anyways, where the security risk of opening the debug port is acceptable, since the images themselves are not secure.

Copy link
Member

@3u13r 3u13r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed via message, I'd like to discuss this in-person first.

@msanft
Copy link
Contributor Author

msanft commented Sep 16, 2024

Why is this necessary? The serial console is only usable for debug (and console) images anyways, where the security risk of opening the debug port is acceptable, since the images themselves are not secure.

IMO, having an exposed port for an undefined service could grant attackers access to our infrastructure and is not desirable

@3u13r 3u13r force-pushed the fix/image/re-enable-autologin branch from cdcb6dd to a2c1419 Compare September 16, 2024 22:06
Base automatically changed from fix/image/re-enable-autologin to main September 17, 2024 12:07
@msanft msanft closed this Sep 17, 2024
@msanft msanft deleted the msanft/test/autologin branch October 18, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Change won't be listed in release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants