Forum Discussion
What is the iControlRest and curl to import the ASM policy
Hi folks, may I know what is the command for curl to import the API policy into ASM and and make it visible on GUI?
I have used the following curl and iControlRest to upload the xml policy file, the file could be seen inside /var/ts/var/rest directory, however the policy is not shown on the GUI. May i know is there anything missing and appreciate your advice?
curl --location 'https://10.1.1.4/mgmt/tm/asm/file-transfer/uploads/httg.xml'
--header 'Content-Type: application/octet-stream'
--header 'X-F5-Auth-Token: Q7B3ANGIDWULYA5VXK7A3EB5YJ'
--header 'Content-Range: 0-402287/402288'
--header 'Cookie: BIGIPAuthCookie=F646C6B41C7A25966D1EE52A69E205E60E53B970; BIGIPAuthUsernameCookie=admin'
--data '@/C:/Users/external_user/httg.xml'
Thankc you!
See this article Advanced WAF v16.0 - Declarative API
https://community.f5.com/t5/technical-articles/advanced-waf-v16-0-declarative-api/ta-p/289251
What you are trying to do seems like declarative WAF to me.
Also you can try ansible for this.
With inline you can also try to feed jinja2 template:
"{{ lookup('template', 'templates/asm_xml_policy.j2') }}"
- name: Import ASM policy inline bigip_asm_policy_import: name: foo-policy4 inline: <xml>content</xml>
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com