Forum Discussion
Extracting Signature sets and signature details from ASM policies
I am trying to extract the following details from the policy. Is there any example available or any help with the script would be really appreciated.
- Policy Name
- All the signatures sets under attack signatures (specify to the selected policy)
- Signature Set settings ( Alarm,Learn,Block)
- All signatures under each signature sets
- Logging profile
Ex: Policy Name: Test_policy Signature sets : Cross-site signature set- Alarm,Learn SQl Injection set- Block Signatures : Cross-site sig1 Cross-site sig2 Sql-injection sig1 Sql-injection sig2
Logging profile: Remote_logger
import f5 from import ManagementRoot import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
mgmt = ManagementRoot('1.1.1.1', 'admin', 'xxxxxxxx') p=mgmt.tm.asm.policies_s.policy.load(id="baOLeraLUyxPhq-_crLonQ") print('Policy Name:',sp.name) sig=sp.signatureReference print(sig)
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