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

Change server response for enumerable-but-not-selectable columns #247

Open
karlcz opened this issue Feb 28, 2023 · 1 comment
Open

Change server response for enumerable-but-not-selectable columns #247

karlcz opened this issue Feb 28, 2023 · 1 comment
Assignees

Comments

@karlcz
Copy link
Contributor

karlcz commented Feb 28, 2023

A pain point for configuring complex policies is that you can end up with columns which have enumerate but not select privileges for a certain class of user. There are currently two different behaviors of the underlying ermrest APIs depending on how the privileges are determined

  • Static determination yields 401/403 errors on attempted access to the column
  • Dynamic determination yields rows with null values for the non-selectable column

This occurs for both explicit column use by /attribute/ and /attributegroup/ APIs and for implicit column use by the /entity/ API.

It is proposed that we modify the service response to unify these scenarios. Rather than returning errors, always return the column with null regardless of whether dynamic access control bindings are in play.

@hongsudt @ljpearlman

@karlcz karlcz self-assigned this Feb 28, 2023
@karlcz
Copy link
Contributor Author

karlcz commented Feb 28, 2023

This proposal seems to intersect with the existing issue #237 where we see other effects from the evaluation of static policies. How would we want these join scenarios to work?

If we consistently handle non-selectable columns as producing null results, then these joins would no longer raise 409 or 401/403 errors. Instead, they would be evaluated using the nulls and so either produce empty result sets (inner joins) or unmatched rows (outer joins).

There may also be interesting performance implications for joins on large tables. A straightforward implementation of the new behavior will replace table instances with subqueries producing the nulled content. (This is how we already handle tables with columns masked by dynamic acl bindings.) It isn't always clear how efficiently the postgres query planner will handle these subquery scenarios.

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

No branches or pull requests

1 participant