Forum Discussion

Dan_Markhasin_1's avatar
Dan_Markhasin_1
Icon for Nimbostratus rankNimbostratus
Apr 20, 2015

API for Content Profiles?

Hi guys,

 

I am trying to find a way to create content profiles (specifically XML profiles) via CLI or API.

 

I have explored the iControlREST option - which lets you upload XML schemas, but I didn't find an option to create a new XML profile, nor any way to control the configuration of an existing profile (such as selecting allowed SOAP methods).

 

I wasn't able to find similar options in neither tmsh nor iControl (SOAP)... can anyone point me in the right direction? Is it even possible to create and configure content profiles without using the GUI?

 

Thanks, Dan

 

2 Replies

  • testing in 11.6. with Icontrol REST

    1. First you need to create your xml profile attached to your existing policy with a POST on your policy entity and xml-profile definition,ex :

       {
      "defenseAttributes": {
          "maximumAttributesPerElement": 16,
          "maximumAttributeValueLength": 1024,
          "maximumDocumentDepth": 32,
          "allowCDATA": false,
          "maximumChildrenPerElement": 1024,
          "maximumDocumentSize": 1024000,
          "tolerateNumericNames": false,
          "maximumElements": 65536,
          "tolerateLeadingWhiteSpace": false,
          "tolerateCloseTagShorthand": false,
          "allowDTDs": false,
          "maximumNameLength": 256,
          "allowExternalReferences": false,
          "maximumNSDeclarations": 64,
          "allowProcessingInstructions": false,
          "maximumNamespaceLength": 256
      },
      "attachmentsInSoapMessages": true,
      "sensitiveData": [],
      "useXmlResponsePage": true,
      "inspectSoapAttachments": false,
      "metacharElementCheck": true,
      "metacharAttributeCheck": false,
      "name": "soap_upload2",
      
      "isReferenced": true,
      "validationSoapActionHeader": true,
      "description": "",
      
      "attackSignaturesCheck": true,
      "signatureOverrides": [],
      "metacharOverrides": []
         }
      
    2. then you upload your xml-validation-files

    3. then you add your validation file (wsdl) with a task : /mgmt/tm/asm/tasks/associate-xml-validation-files-to-xml-profile

    this is documented in Rest user guide 11.6.

  • Thanks! I actually tried the same and got an error, which led me to post here, but only later I realized I was trying to do it on a 11.5.2 :)