OPAL topics and configuring data sources #232
Replies: 1 comment
-
Hello crystalrage777, You almost got it right 🙂. Your endpoint should return whichever JSON data you’d like to locate on the OPA hierarchy tree. (The location of the data on the OPA tree is also configurable in the same place you configured the endpoint fetcher for a topic). A clarification: you can configure different fetching behaviors for different topics:
So two different http server implementation strategies for different topics would be:
For more information on when OPAL server trigger data fetching, please see: For more information on configuring OPAL_DATA_CONFIG_SOURCES, please see: Don’t hesitate to reach out if something is unclear! |
Beta Was this translation helpful? Give feedback.
-
Hi,
Trying to understand how I should design my opal data sources, taking into account what types of queries should they support. making sure they don't limit the querying ability of OPAL.
My current direction is having a http server (and a mongo server under it).
From my understanding, when the client needs data it queries it based on the topic of the data. given the topic, it knows what query it should run (and what data source it should run it against). and that the query is a bulk query, meaning - say I have a topic of users&roles that holds documents each holding tuples of "user", "role", "resource" (user x has role y regarding resource z) and my query to OPA references that topic then it will send a single query for getting all these user-role-resource tuples (not a sub group of them).
If I'm correct in my understanding my http client needs to contain one endpoint per topic that returns a json that is a list of the documents in the topic.
Is my understanding correct?
thanks
Beta Was this translation helpful? Give feedback.
All reactions