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

🌱 AWSManagedMachinePool: Make public access to SSH explicit #2243

Merged
merged 1 commit into from
Feb 8, 2021

Conversation

michaelbeaumont
Copy link
Contributor

@michaelbeaumont michaelbeaumont commented Feb 7, 2021

What this PR does / why we need it:
Restricts access to SSH for AWSManagedMachinePools to specific security groups by default. Until now the default matches the AWS API defaults where if SSH access is enabled with some SSH key then access is allowed from any IP. Now the user must set public: true.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1990

Special notes for your reviewer:

Checklist:

  • squashed commits
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

Release note:

action required: New `AWSManagedMachinePool` resources with non-empty `remoteAccess` now require `remoteAccess.public: true` in order to allow public access to SSH on port 22

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 7, 2021
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 7, 2021
@richardcase
Copy link
Member

@michaelbeaumont - i think we a release note here as we are changing behavior from where it would be public if there was an SSH key to even if there is an SSH key they need to set publicAccess: true

SourceSecurityGroups []string `json:"sourceSecurityGroups,omitempty"`

// Public specifies whether to open port 22 to the public internet
Public bool `json:"public,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Small nit, in the PR description its publicAccess but here its public. Guessing the preferred naming is public?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I switched to public to get rid of the remoteAccess.publicAccess duplication.

@richardcase
Copy link
Member

/test ?

@k8s-ci-robot
Copy link
Contributor

@richardcase: The following commands are available to trigger jobs:

  • /test pull-cluster-api-provider-aws-test
  • /test pull-cluster-api-provider-aws-build
  • /test pull-cluster-api-provider-aws-verify
  • /test pull-cluster-api-provider-aws-e2e-conformance
  • /test pull-cluster-api-provider-aws-e2e-conformance-with-ci-artifacts
  • /test pull-cluster-api-provider-aws-e2e
  • /test pull-cluster-api-provider-aws-e2e-eks

Use /test all to run the following jobs:

  • pull-cluster-api-provider-aws-test
  • pull-cluster-api-provider-aws-build
  • pull-cluster-api-provider-aws-verify

In response to this:

/test ?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@richardcase
Copy link
Member

/test pull-cluster-api-provider-aws-e2e

@k8s-ci-robot k8s-ci-robot added release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Feb 8, 2021
@michaelbeaumont
Copy link
Contributor Author

@michaelbeaumont - i think we a release note here as we are changing behavior from where it would be public if there was an SSH key to even if there is an SSH key they need to set publicAccess: true

True, I've now added an action required release note although I'm not 100% sure that fits since it only affects new resources?

@richardcase
Copy link
Member

As soon as the e2e tests pass I will approve

@richardcase
Copy link
Member

/test pull-cluster-api-provider-aws-e2e

@richardcase
Copy link
Member

Ah, ran the wrong tests:

/test pull-cluster-api-provider-aws-e2e-eks

@richardcase
Copy link
Member

the eks e2e tests passed, so:

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 8, 2021
@k8s-ci-robot
Copy link
Contributor

@michaelbeaumont: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-cluster-api-provider-aws-e2e c54dd7a link /test pull-cluster-api-provider-aws-e2e

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@richardcase
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 8, 2021
@k8s-ci-robot k8s-ci-robot merged commit 95104b9 into kubernetes-sigs:master Feb 8, 2021
@michaelbeaumont michaelbeaumont deleted the remote_access branch February 8, 2021 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default remote access security groups/bastion host for AWSManagedMachinePool
3 participants