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

Lockdown external ports after director creation #450

Conversation

ohlookadollar
Copy link

Signed-off-by: Denny Hoang dhoang@pivotal.io
Signed-off-by: Conor Nosal cnosal@pivotal.io

This pr addresses: #417

We noticed that port 6868 and 25555 was exposed publicly on the jumpbox. According to the git issue, it is only required during bootstrapping the director.

This pr introduce a "Lockdown" step after the director creation in bbl up.

The lockdown step generates a new bbl_template.tf file without port 6868 and 25555.

It does this by putting all of the bootstrapping rules under terraform/gcp/templates/bosh_bootstrap.tf

During "Setup" the bbl_template.tf is included and during "Lockdown" it is not included.

Signed-off-by: Denny Hoang <dhoang@pivotal.io>
Signed-off-by: Conor Nosal <cnosal@pivotal.io>
@cfdreddbot
Copy link

✅ Hey ohlookadollar! The commit authors and yourself have already signed the CLA.

@ohlookadollar
Copy link
Author

@zachgersh could you please review this PR?
It was stemmed from this discussion https://cloudfoundry.slack.com/messages/C2DBC3YGZ/convo/C2DBC3YGZ-1549303667.096100/

Thanks

@zachgersh
Copy link
Contributor

@ohlookadollar - the one thing I would want to know is, what happens when I want to recreate my director and or jumpbox? Do I have to reverse this process?

Copy link
Contributor

@zachgersh zachgersh left a comment

Choose a reason for hiding this comment

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

Currently, have one suggested change. As noted in my question on the PR as well, what happens when I have to upgrade my director? Don't we have to run this operation in reverse if it is locked down?

@@ -31,7 +31,7 @@ func NewTemplateGenerator() TemplateGenerator {
}
}

func (tg TemplateGenerator) Generate(state storage.State) string {
func (tg TemplateGenerator) Generate(state storage.State, _ bool) string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we make this work for all the IAASes? I'd like to not have this only work for GCP.

@ohlookadollar
Copy link
Author

@ohlookadollar - the one thing I would want to know is, what happens when I want to recreate my director and or jumpbox? Do I have to reverse this process?

@zachgersh Good Catch, recreating the jumpbox failed because of the mbus agent check.

Recreating the director seems fine.

@reneighbor reneighbor closed this Nov 17, 2020
@reneighbor reneighbor deleted the branch cloudfoundry:master November 17, 2020 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants