Forum Discussion

Ghislain_Pellet's avatar
Ghislain_Pellet
Icon for Nimbostratus rankNimbostratus
Jan 11, 2017

How to define file types as case insensitive?

Allowed file types are case sensitive.

 

How can they be defined as case insensitive?

 

10 Replies

  • Hi Patrik,

     

    the OP used ASM as Hash-Tag so I guess its an ASM specific question ;-)

     

    Cheers, Kai

     

  • Hi Ghislain,

    during security policy creation, you can configure the rule matchings with an "case-insensitive" option. But once the policy is created you can't change this setting without loosing the already established ruleset (aka. reconfigure the entire policy).

    If your existing ruleset is to complex, then you may use some RegEx pattern to allow file-types and URLs regardless of the requested CASE. E.g. use the wildcard pattern

    [Hh][Tt][Mm][Ll]
    instead of explizit
    HTML
    or
    html

    For addtional information on the wildcard syntax check out: https://support.f5.com/kb/en-us/products/big-ip_asm/manuals/product/asm-implementations-11-5-0/28.html

    Cheers, Kai

  • You need to provide more information when you post a question, otherwise we are just guessing. :/

     

    When you create a policy you have a checkbox to say if is or not case sensitive. You can click in reconfigure to change a policy that already exists.

     

  • Just recently I did a project where specifically the end goal was to migrate all existing ASM policies from case-sensitive matching to case-insensitive matching.

    1. You export the policy as XML
    2. In the XML file: Modify the value of
      case_insensitive
      tag from
      false
      to
      true
    3. In the XML file: Replace all existing user-defined entities (File Types, Parameters, URLs...) with their lower-case equivalents. Create your own script, or use Vi for the task. This can also be done manually but you will grow a few grey hair before the task is done.
    4. Import the modified XML as new ASM policy

    You will lose all pending

    Manual Traffic Learning
    suggestions, but no configuration will be lost. Might be a good idea to make sure all pending suggestions are handled before you start.

    • Kai_Wilke's avatar
      Kai_Wilke
      Icon for MVP rankMVP

      Hi Hannes,

      Good to know that the

      case_insensitive
      option can be changed via manuall exports/imports.

      Thanks and Cheers, Kai

  • Just recently I did a project where specifically the end goal was to migrate all existing ASM policies from case-sensitive matching to case-insensitive matching.

    1. You export the policy as XML
    2. In the XML file: Modify the value of
      case_insensitive
      tag from
      false
      to
      true
    3. In the XML file: Replace all existing user-defined entities (File Types, Parameters, URLs...) with their lower-case equivalents. Create your own script, or use Vi for the task. This can also be done manually but you will grow a few grey hair before the task is done.
    4. Import the modified XML as new ASM policy

    You will lose all pending

    Manual Traffic Learning
    suggestions, but no configuration will be lost. Might be a good idea to make sure all pending suggestions are handled before you start.

    • Kai_Wilke's avatar
      Kai_Wilke
      Icon for MVP rankMVP

      Hi Hannes,

      Good to know that the

      case_insensitive
      option can be changed via manuall exports/imports.

      Thanks and Cheers, Kai

  • I am referring to the ASM module under Security ›› Application Security : File Types : Allowed File Types : Create : Allowed File Type Properties