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?

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.