You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/nap-waf/v5/configuration-guide/configuration.md
+174-3Lines changed: 174 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -931,7 +931,11 @@ In the cases where decompression fails, NGINX App Protect WAF will continue wit
931
931
932
932
---
933
933
934
-
## Policy Converter
934
+
## Converter Tools
935
+
936
+
NGINX App Protect WAF includes a number of tools that can be used to facilitate the process of porting existing resources or configuration files from the BIG-IP for use in the NGINX App Protect WAF environment. Note that these tools are available in the compiler package, and do not require a full installation of NGINX App Protect WAF or NGINX Plus.
937
+
938
+
### Policy Converter
935
939
936
940
The NGINX App Protect WAF v5 Policy Converter tool `/opt/app_protect/bin/convert-policy` is used to convert XML policies to JSON format. The converted JSON policy is based on the NGINX App Protect WAF policy base template and contains the minimal differences to it in JSON declarative policy format.
937
941
@@ -943,7 +947,7 @@ Using the tool:
943
947
/opt/app_protect/bin/convert-policy
944
948
```
945
949
946
-
### Convert Policy using Command Line Interface (CLI Usage)
950
+
####Convert Policy using Command Line Interface (CLI Usage)
947
951
948
952
The input policy can also be converted using convert-policy as a CLI tool from within NGINX App Protect WAF Converter container by using the following commands:
| --dos-profile | Filename of JSON DoS Profile (pre-converted to JSON from tmsh syntax) |
970
974
| --full-export | If specified, the full policy with all entities will be exported. Otherwise, only entities that differ from the template will be included.<br> Default for the CLI is not specific (only differing entities). <br> Default for the REST endpoint above is "--full-export" (you can not override this).|{{</bootstrap-table>}}
971
975
976
+
### User Defined Signatures Converter
977
+
978
+
The User Defined Signatures Converter tool `/opt/app_protect/bin/convert-signatures` takes a User Defined Signatures XML file as input and exports the content as a JSON file suitable for use in an NGINX App Protect WAF environment.
979
+
980
+
The tool can optionally accept a tag argument as an input. Otherwise, the default tag value `user-defined-signatures` is assigned to the exported JSON file.
981
+
982
+
Note that the User Defined signatures XML file can be obtained by exporting the signatures from a BIG-IP device.
983
+
984
+
Using the tool:
985
+
```shell
986
+
/opt/app_protect/bin/convert-signatures
987
+
```
988
+
989
+
Output:
990
+
```shell
991
+
USAGE:
992
+
/opt/app_protect/bin/convert-signatures
993
+
994
+
Required arguments:
995
+
--outfile|o='/path/to/signatures.json'
996
+
File name to write JSON format export
997
+
Can also be set via an environment variable: EXPORT_FILE
998
+
--infile|i='/path/to/signatures.xml'
999
+
Advanced WAF/ASM User Defined Signatures file to Convert
1000
+
Can also be set via an environment variable: IMPORT_FILE
1001
+
1002
+
Optional arguments:
1003
+
--tag|t='mytag'
1004
+
Signature Tag to associate with User Defined Signatures.
1005
+
If no tag is specified in the XML file, a default tag of 'user-defined-signatures' will be assigned.
1006
+
Can also be set via an environment variable: TAG
1007
+
--format|f='json'
1008
+
Desired output format for signature file. Default 'json'
1009
+
Supported formats: 'json'
1010
+
1011
+
Optionally, using --help will issue this help message.
1012
+
```
1013
+
1014
+
Example of generating a user defined signature JSON file (with default tag):
0 commit comments