Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-7678

Liquid contains does not work as expected when parsing an array

    XMLWordPrintable

Details

    • False
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Hide
      • Setup an SSO integration with an array of roles for client - adding a single role can be enough to trigger this behaviour
      • Configure JWT_Claim_Check policy  to select one using liquid - eg: jwt.roles contains "foo:bar:baz"
      • Claim check will not pick up correct role
      Show
      Setup an SSO integration with an array of roles for client - adding a single role can be enough to trigger this behaviour Configure JWT_Claim_Check policy  to select one using liquid - eg: jwt.roles contains "foo:bar:baz" Claim check will not pick up correct role

    Description

      There appears to be a number of cases where the "contains" keyword in Liquid will fail to work correctly.

      It appears that "contains" attempts to perform looping[1], however we do not allow loops in our liquid implementation[2]

       

       [1]https://github.com/chenxianyu2015/liquid-lua/blob/58e0a197445300538adab021d574f9375ebb6eba/lib/liquid.lua#L2076-L2095

       [2]https://github.com/3scale/APIcast/blob/e7f6ebbf15d1b053283f0d77ae7176e1c7bfcb44/gateway/src/apicast/template_string.lua#L72

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rhn-support-ahobson Aimi Hobson
              Petr Hála Petr Hála
              Samuele Illuminati Samuele Illuminati (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: