Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Possible Issue with Security Groups with the same name #40

Closed
JaguarSecurity opened this issue Aug 4, 2014 · 4 comments
Closed

Possible Issue with Security Groups with the same name #40

JaguarSecurity opened this issue Aug 4, 2014 · 4 comments
Assignees
Labels

Comments

@JaguarSecurity
Copy link

We have security groups with the same Group Name but different Group ID. Only the first Security Group shows up in Security Monkey. The obvious answer is to make a unique Group Name but since we will be reviewing accounts that our organization owns but that the security folks do not have the ability to rename, we may be missing some of the Security Groups.

@scriptsrc scriptsrc added the bug label Aug 11, 2014
@scriptsrc
Copy link
Contributor

I just attempted to make a second security group with the same name as the first one and ran into an error in the console:

An error occurred creating your security group.
The security group 'launch-wizard-1' already exists

Since RDS security groups are tracked as a completely separate technology in Security Monkey, I'm assuming your overlap is between an ec2 SG and a VPC SG? (Or even two VPC SG's?) Can you help me reproduce this?

I'm trying to reproduce the problem now. Once I've done that, I'll push a hotfix out ASAP.

@scriptsrc scriptsrc self-assigned this Aug 11, 2014
@JaguarSecurity
Copy link
Author

Monkeysecurity, You are correct. One of the groups is in a VPC the other is an ec2 SG.

@scriptsrc
Copy link
Contributor

I was able to reproduce. The name of a security group is only unique to the VPC in which it lives. So it is possible to have a security group with the same name in EC2, in VPC1, in VPC2, ..., VPCN.

The easiest solution may be for Security Monkey to use the Security Group ID as the unique value. However, to make it readable in the UI, I may combine the ID with the name like this:

launch-wizard-1 (sg-4b430a2e)

or:

sg-4b430a2e (launch-wizard-1)

@JaguarSecurity
Copy link
Author

That solution looks good. Thanks for your help.

scriptsrc pushed a commit that referenced this issue Aug 11, 2014
Security Monkey was unaware that security group names in different VPC's
could collide.  Security group names in EC2 may also collide with a VPC
security group name.  The fix is to include the security group ID and
optionally the VPC ID to the name stored by security_monkey.
markofu pushed a commit to markofu/security_monkey that referenced this issue Sep 1, 2015
Security Monkey was unaware that security group names in different VPC's
could collide.  Security group names in EC2 may also collide with a VPC
security group name.  The fix is to include the security group ID and
optionally the VPC ID to the name stored by security_monkey.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants