-
-
Notifications
You must be signed in to change notification settings - Fork 43
AWS: Inbound IP whitelist #97
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
base: dev
Are you sure you want to change the base?
Changes from all commits
e81a68e
9c10188
bb09c15
74ea220
4fb6d74
ffa79c8
ae749de
ef95afa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| import os | ||
| from schema import Schema, Optional, And, Regex, Or, Use | ||
| from netaddr import IPNetwork | ||
| from spotty.config.validation import validate_config, get_instance_parameters_schema, has_prefix | ||
|
|
||
|
|
||
|
|
@@ -30,6 +31,8 @@ def validate_instance_parameters(params: dict): | |
| ), | ||
| Optional('managedPolicyArns', default=[]): [str], | ||
| Optional('instanceProfileArn', default=None): str, | ||
| Optional('inboundIp', default='0.0.0.0/0'): Use(IPNetwork, error='"inboundIp" should be a valid IP ' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the default value, the |
||
| 'address or CIDR range'), | ||
| } | ||
|
|
||
| volumes_checks = [ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ def test_default_configuration(self): | |
| 'spotInstance': False, | ||
| 'subnetId': '', | ||
| 'volumes': [], | ||
| 'inboundIp': '0.0.0.0/0', | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be fixed as well when the default |
||
| } | ||
|
|
||
| self.assertEqual(expected_params, validate_instance_parameters(required_params)) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed that now if the
inboundIpparameter is not specified, we're not opening ports for IPv6. So, I think we need to useNonefor the default value instead of0.0.0.0/0to know when the parameter wasn't specified and open ports for both protocols.