Skip to content

Implement transform directive for type = base64-line-delimited

Lin Jen-Shin requested to merge 70-transform into main

This merge request did the following:

  • Implement transform directive for type = base64-line-delimited
  • A fixture rules file to demonstrate the transform directive, it looks like:
    [
      {
        "match": {
          "type": "path",
          "regex_value":"^/-/test-routable-token/(?<payload>.*)$"
        },
        "transform": {
          "type": "base64-line-delimited",
          "name": "decoded",
          "value": "${payload}"
        },
        "action": "classify",
        "classify": {
          "type": "SESSION_PREFIX",
          "value": "cell-${decoded.c}"
        }
      }
    ]
  • Add an integration test for the above fixture rules file.
  • Add unit tests for Rule#interpolateValue and Rule#transformMatchResult which are the core for transform logic.

Closes #70

Edited by Lin Jen-Shin

Merge request reports

Loading