Uploaded image for project: 'Repose'
  1. REP-6603

Support Multiple Capture Groups in the URL Extractor to Header Filter

    Details

    • Type: Story
    • Status: Resolved (View workflow)
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 9.0.0.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Sprint 180 (Oct 25 – Nov 7), Sprint 181 (Nov 8 – Dec 5)
    • Story Points:
      3
    • Capitalizable:
      True

      Description

      The configuration for the URL Extractor to Header filter should support regular expressions with multiple capture groups where each captured value is added to the configured header. Right now, only the first capture group is used. This change will make configuration more concise when multiple values need to be extracted, as will be the case for some multi-tenant APIs using authorization.

      Note that a capture group can be ignored by prefixing it with ?: as in the following regular expression (?:prefix\/)?/([^\/]+)(?:\/.*)?

      This will be a Major version change since existing configuration might have multiple capture groups that would have been previously ignored prior to this change but could impact whether or not a request is allowed after this change.

      You could achieve this using this:
      https://github.com/rackerlabs/repose/commit/4da855022e656a5322c3092e474dfb862a51f54d

      Acceptance Criteria:

      • Multiple header values are captured (i.e. each capture group is placed in the header).

        Attachments

          Activity

            People

            • Assignee:
              damien.johnson Damien Johnson
              Reporter:
              damien.johnson Damien Johnson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: