Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access policies with arrays in security context #9248

Open
tagspace opened this issue Feb 20, 2025 · 0 comments
Open

Access policies with arrays in security context #9248

tagspace opened this issue Feb 20, 2025 · 0 comments

Comments

@tagspace
Copy link

Describe the bug
Can't use array of values for access policy row level filter.

To Reproduce

Given the following access_policy:

cubes:
  - name: customers
    sql_table: public.customers

    access_policy:
      - role: "*"
        row_level:
          filters:
            - member: country
              operator: equals
              values: { securityContext.countries }
...

And the following securityContext:

{
  "countries": [
    "Germany",
    "United States"
  ]
}

If I try to query it:

{
  "dimensions": [
    "customers.country"
  ],
  "measures": [
    "customers.count"
  ],
  "order": {},
  "timeDimensions": []
}

I get error: Unexpected input during yaml transpiling: null

Expected behavior
Should be possible to filter by multiple values (just like the standard filter operator works in cube)

From docs: "row filters are configured using the same format as filters in REST API queries, allowing to use the same set of filter operators, e.g., equals, contains, gte, etc."

Version:
Cube Cloud (1.2.6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant