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

Firewall rule address and port lists changed to lists and not inline values #107

Open
F5Rob opened this issue Nov 12, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@F5Rob
Copy link

F5Rob commented Nov 12, 2024

Environment

  • ACC Version: 1.21.0
  • AS3 Version: 3.53.0-7
  • BIG-IP Version: 17.1.1.3

Summary

When using the vscode ACC plugin to convert BIG-IP Firewall configuration to AS3, address and ports are converted to lists instead of inline values.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Convert following config:
security firewall rule-list /Common/Blacklist {
    description "Rules that limit traffic into the RCS"
    rules {
        Country_Blacklist {
            action drop
            ip-protocol any
            log yes
            source {
                address-lists {
                    /Common/shared/Country_Blacklist
                }
                geo {
                    AP { }
                }
            }
        }
        SOC_IP_Blacklist {
            action drop
            ip-protocol any
            log yes
            source {
                address-lists {
                    /Common/shared/SOC_Blacklist
                }
                addresses {
                    79.110.62.8 { }
                    80.94.95.115 { }
                    83.222.190.218 { }
                    146.19.125.11 { }
                    179.43.168.146 { }
                }
            }
        }
    }
}
  1. Observe the following error message:
{
    "class": "ADC",
    "schemaVersion": "3.37.0",
    "id": "urn:uuid:58b9915d-4bf9-4719-9b63-7bfb138facc4",
    "label": "Converted Declaration",
    "remark": "Generated by Automation Config Converter",
    "Common": {
        "class": "Tenant",
        "Shared": {
            "class": "Application",
            "template": "shared",
            "autogen_4f121279_72a2_4b9f_a137_2531e3dbda5f": {
                "class": "Firewall_Address_List",
                "addresses": [
                    "79.110.62.8",
                    "80.94.95.115",
                    "83.222.190.218",
                    "146.19.125.11",
                    "179.43.168.146"
                ]
            },
            "Blacklist": {
                "remark": "Rules that limit traffic into the RCS",
                "rules": [
                    {
                        "action": "drop",
                        "source": {
                            "geo": {
                                "AP": {}
                            },
                            "addressLists": [
                                {
                                    "use": "/Common/shared/Country_Blacklist"
                                }
                            ]
                        },
                        "protocol": "any",
                        "name": "Country_Blacklist"
                    },
                    {
                        "action": "drop",
                        "source": {
                            "addressLists": [
                                {
                                    "use": "/Common/shared/SOC_Blacklist"
                                },
                                {
                                    "use": "autogen_4f121279_72a2_4b9f_a137_2531e3dbda5f"
                                }
                            ]
                        },
                        "protocol": "any",
                        "name": "SOC_IP_Blacklist"
                    }
                ],
                "class": "Firewall_Rule_List"
            }
        }
    }
}

Expected Behavior

{
"$schema": "https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/refs/heads/main/schema/latest/as3-schema-3.53.0-7.json",
"class": "ADC",
"schemaVersion": "3.53.0",
"id": "Firewall_Rule_List",
"Common": {
"class": "Tenant",
"Shared": {
"class": "Application",
"template": "shared",
"SOC_Blacklist": {
"class": "Firewall_Address_List",
"addresses": [
"172.30.2.0/24"
]
},
"Country_Blacklist": {
"class": "Firewall_Address_List",
"geo": [
"AU",
"CA",
"GB",
"NZ",
"US"
]
},
"Blacklist": {
"class": "Firewall_Rule_List",
"remark": "Rules that limit traffic into the RCS",
"rules": [
{
"action": "drop",
"protocol": "any",
"source": {
"addressLists": [
{
"use": "Country_Blacklist"
}
]
},
"name": "Country_Blacklist_rule"
},
{
"action": "drop",
"protocol": "any",
"source": {
"addressLists": [
{
"use": "SOC_Blacklist"
}
],
"addresses": [
"79.110.62.8",
"80.94.95.115",
"83.222.190.218",
"146.19.125.11",
"179.43.168.146"
]
},
"name": "SOC_IP_Blacklist_rule"
}
]
}
}
}
}

Actual Behavior

This:
SOC_IP_Blacklist {
action drop
ip-protocol any
log yes
source {
address-lists {
/Common/shared/SOC_Blacklist
}
addresses {
79.110.62.8 { }
80.94.95.115 { }
83.222.190.218 { }
146.19.125.11 { }
179.43.168.146 { }
}
}
}
should not be converted to this:
"autogen_4f121279_72a2_4b9f_a137_2531e3dbda5f": {
"class": "Firewall_Address_List",
"addresses": [
"79.110.62.8",
"80.94.95.115",
"83.222.190.218",
"146.19.125.11",
"179.43.168.146"
]
},
{
"action": "drop",
"source": {
"addressLists": [
{
"use": "/Common/shared/SOC_Blacklist"
},
{
"use": "autogen_4f121279_72a2_4b9f_a137_2531e3dbda5f"
}
]
},
"protocol": "any",
"name": "SOC_IP_Blacklist"
}

@F5Rob F5Rob added the bug Something isn't working label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant