KB Article #177760

Redactors do not appear to be working

Problem

The gateway has been supplied with a redaction.xml file, but redaction does not appear to actually happen.

Resolution

There several things to check in the configuration to make sure that this is configured properly.

  1. The include location for redaction.xml must be correct. Documentation for older versions was inaccurate on this point, as it tells you to save your config to an instance-local directory, then tells you to include it from the main /apigateway/system/conf/ directory. This is hard to see because it uses a variable for part of the path. The variable $VDISTDIR refers to the install location of the product (e.g. /opt/Axway/apigateway/) whereas $VINSTDIR refers to the instance directory (e.g. /opt/Axway/apigateway/groups/group-X/instance-Y/) so the include must be correct or the gateway will fail to start due to being unable to find the redaction configuration. The error is also somewhat misleading, as the error message makes it seem as if the XML is invalid even when the problem is that it was unable to locate the file in the first place.
  2. Redaction enabled must be set to true in redaction.xml. The sample redaction.xml file has this set to false, so it's very easy to forget to fix that when starting from the sample.
  3. The line order in service.xml matters, the include statement for redaction.xml should be the last thing before the close of the NetService flag or strange behavior may result from gateway services being loaded in the wrong order.
  4. You must define an HTTPRedactor for the other redactors to work. The HTTPRedactor defines which paths have redaction enabled, so if you don't define one, you get no redaction at all.

Once the setup is corrected as above, any further problems should be a matter of the path not matching or the redactor itself not matching the content.