Skip to content
This repository was archived by the owner on Jul 1, 2021. It is now read-only.
This repository was archived by the owner on Jul 1, 2021. It is now read-only.

Invalid Schema / Resource Body example for edge firewall rules config #32

Description

@sarathk-vmw

Hello ,

I was facing some issues while adding new edge firewall rules via the nsxramlclient. I checked and found that the API spec.(v 6.2.3) was having incorrect resource body example and schema defined for the "firewallRules" resource (API : https:///api/4.0/edges//firewall/config/rules ).

We are using the same schema for the parent nsxEdgeFirewallConfig (/firewall/config) and the firewallRules (/firewall/config/rules) resources.

From the API Spec. , POST calls to /firewall/config/rules should follow the below format :

<firewallRules>
                  <firewallRule>
                    <ruleTag></ruleTag>
                    <name></name>
                    <source>
                      <ipAddress></ipAddress>
                    </source>
                    <destination>
                      <ipAddress></ipAddress>
                    </destination>
                    <application></application>
                    <matchTranslated></matchTranslated>
                    <direction></direction>
                    <action></action>
                    <enabled></enabled>
                    <loggingEnabled></loggingEnabled>
                    <description></description>
                  </firewallRule>
                </firewallRules>

Currently we are using the following format (which happens to be the same as the parent's( nsxEdgeFirewallConfig's) format :

<firewall>
                 <defaultPolicy>
                   <action></action>
                   <loggingEnabled></loggingEnabled>
                 </defaultPolicy>
                 <globalConfig>
                   <tcpPickOngoingConnections></tcpPickOngoingConnections>
                   <tcpAllowOutOfWindowPackets></tcpAllowOutOfWindowPackets>
                   <tcpSendResetForClosedVsePorts></tcpSendResetForClosedVsePorts>
                   <dropInvalidTraffic></dropInvalidTraffic>
                   <logInvalidTraffic></logInvalidTraffic>
                   <tcpTimeoutOpen></tcpTimeoutOpen>
                   <tcpTimeoutEstablished></tcpTimeoutEstablished>
                   <tcpTimeoutClose></tcpTimeoutClose>
                   <udpTimeout></udpTimeout>
                   <icmpTimeout></icmpTimeout>
                   <icmp6Timeout></icmp6Timeout>
                   <ipGenericTimeout></ipGenericTimeout>
                 </globalConfig>
                 <rules>
                   <rule>
                     <ruleTag></ruleTag>
                     <name></name>
                     <source>
                       <vnicGroupId></vnicGroupId>
                       <groupingObjectId></groupingObjectId>
                       <ipAddress></ipAddress>
                     </source>
                     <destination>
                       <groupingObjectId></groupingObjectId>
                       <vnicGroupId></vnicGroupId>
                       <groupingObjectId></groupingObjectId>
                       <ipAddress></ipAddress>
                     </destination>
                     <application>
                       <applicationId></applicationId>
                       <service>
                         <protocol></protocol>
                         <port></port>
                         <sourcePort></sourcePort>
                       </service>
                     </application>
                     <matchTranslated></matchTranslated>
                     <direction></direction>
                     <action></action>
                     <enabled></enabled>
                     <loggingEnabled></loggingEnabled>
                     <description></description>
                   </rule>
                 </rules>
               </firewall>

I suppose the schema definition for firewallRulesCreate also needs to be changed.
Lemme know if more details are required and thanks in advance :)

--
Sarath.K
sarathk@vmware.com

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions