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

Platform library should expose Entity Representation flattening-related functions #644

Open
jakedoublev opened this issue Apr 23, 2024 · 0 comments
Labels
comp:core Core component comp:kas Key Access Server

Comments

@jakedoublev
Copy link
Contributor

Background

As a result of the accepted ADR to employ flattening of an Entity Representation into known fields and values, the platform needs a small library of functions to do flattening and comparison.

Acceptance Criteria

This set of functions, consumable downstream in PEPs or tools like otdfctl:

  1. Take arbitrary JSON and flatten it into an array of fields and values (see existing proto, and ADR example). Every array value should appear twice in the output, once with the index wildcard as * and once with the index specified numerically. This gives admins the ability to entitle based on order in an array or presence without the platform driving that opinion.
  2. Take an Entity Representation and a flattened set of fields and values and compare to find the matched field/value pairs.
  3. Take an Entity Representation and a set of selected fields and provide the values for whichever are present, even if they differ

Unit tests for all of the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:core Core component comp:kas Key Access Server
Projects
None yet
Development

No branches or pull requests

1 participant