Forum Discussion

TannerJ_359552's avatar
TannerJ_359552
Icon for Nimbostratus rankNimbostratus
Nov 27, 2018

ASM: How to Add Sensitive Parameters to a Policy via TMSH?

I have a list of thousands of sensitive parameters that I need to add to an ASM policy. How would I best automate this? Is there a way to do this via TMSH or via something else?

 

2 Replies

  • You can POST the list via REST using the following endpoint:

     

    mgmt/tm/asm/policies/MD5HASH/sensitive-parameters

     

    What version are you working with?

     

  • Not too tricky - first off use the iCR Python module and go through the asm/policies//sensitive-parameters endpoint to add the sensitive parameters. There are two ways to retrieve the MD5 hash - use

    get_asm_id(name)
    or
    create_hash(name)
    and you can check out the iControl REST User Guide. Chapter 7 is about ASM.

    PM me with details if you want more help.