This issue occurs when an Active Directory group that is used to dynamically populate an NSX Security Group is deleted without the Security Group being modified, NSX may get into a situation where the firewall rules are not published and therefore no longer provide the protections and access intended.
To verify if a Security Group is still pointing to an AD group that no longer exists:
- Connect to the NSX Manager through SSH and log in with admin credentials.
- Type "en" and re-enter the admin password when prompted.
- Type "st en" and follow the prompts, entering the Engineering Mode password. For more information, see .
- Type "psql -U secureall" and press Enter.
- At the psql prompt type the below query. All on a single line, ensure the semi-colon is at the end:
select dtype, objectid, name, objecttype, source_id, source_type, target_id, target_type, relationship from domain_object join domain_object_relationships on domain_object_relationships.source_id = domain_object.objectid where domain_object.dtype = 'SecurityGroup' and domain_object_relationships.target_type = 'DirectoryGroup' and target_id in (select objectid from domain_object where objectid not in (select objectid from ai_group_do) and domain_object.dtype = 'DirectoryGroup');
You will retrieve results similar to:
dtype | objectid | name | objecttype | source_id | source_type | target_id | target_type | relationship
---------------+------------------+------------------+---------------+------------------+---------------+---------------------+----------------+-------------------------
SecurityGroup | securitygroup-39 | SecurityGroup_Name | SecurityGroup | securitygroup-39 | SecurityGroup | directory_group-360 | DirectoryGroup | securitygroup_membership_include
Note: These results are a list of all NSX Security Groups associated with Active Directory groups that no longer exist. Record all items in the column: target_id. You will use this information in the next query.