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

SCPs DenyEC2NonNitroInstances and DenyEC2InstancesWithoutEncryptionInTransit are too big #34

Closed
Nuru opened this issue Dec 15, 2023 · 0 comments · Fixed by #49
Closed
Labels
bug 🐛 An issue with the system

Comments

@Nuru
Copy link
Sponsor Contributor

Nuru commented Dec 15, 2023

Describe the Bug

The SCPs in catalog/ec2-policies.yaml are too big. There is a limit of 5120 characters to a Service Control Policy.

  • DenyEC2NonNitroInstances is 8325 characters when converted to compact JSON
  • DenyEC2InstancesWithoutEncryptionInTransit is 5231 characters when converted to compact JSON

Nitro vs Encryption in Transit

There was an assumption, possibly based on AWS documentation, that all Nitro instances automatically performed encryption of network traffic. This is not the case (at least not now). For example. The a1 instances are Nitro but do not support Encryption in Transit. This should be pointed out in the description of DenyEC2NonNitroInstances, because some people may be using it as a proxy for DenyEC2InstancesWithoutEncryptionInTransit.

References:

Expected Behavior

SCPs should be valid, including being of an acceptable size.

Steps to Reproduce

Try to deploy the SCP

Screenshots

No response

Environment

No response

Additional Context

DenyEC2NonNitroInstances

My investigation indicates that all sizes of any instance type are either all Nitro or all non-Nitro, so the DenyEC2NonNitroInstances can be shortened by using wildcards instead of listing all sizes.

DenyEC2InstancesWithoutEncryptionInTransit

My investigation found that, at least currently, all sizes of any instance type either all do or do not support Encryption in Transit, so the DenyEC2InstancesWithoutEncryptionInTransit can be shortened by using wildcards instead of listing all sizes.

@Nuru Nuru added the bug 🐛 An issue with the system label Dec 15, 2023
@Nuru Nuru closed this as completed in #49 Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant