Dynamic parameters in OPA #224
Replies: 2 comments 5 replies
-
🔖 Have you found the docs on external data? There should be viable options in there. Concretely, providing runtime information to a query is usually done via Input. I could imagine this as something like
Since I don't expect your mapping of country to days to change often, data might be a better idea. There are many ways to make that happen. Both |
Beta Was this translation helpful? Give feedback.
-
Currently I use bundles to load data and input doesn't have this data and this dynamic value can change by people time to time , example may be little wrong but think of it that 2k users can have 2k different values and that is for one rego , there are hundreds such rego where input I want to take from user. Now api we hit is rest api made by opa for every rego file , so how to club all this and while calling api provide these values. I hope you understand question. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
It may be very simple question if people already know answer to it ,what I want to achieve is inside rego I want to specify a simple if string equals condition , however base string I want to provide at runtime , depending on many conditions.
For example I want to check if max days since login has passed then fail policy and don't let it pass , now max days for each of specific area/company is set by users. E.g. for america people says it should be 5 days and for india people says 4 days. So can I pass this max value at runtime to opa to evaluate. There can be thousand of such values and hence putting all values and doing if else is not possible.
Beta Was this translation helpful? Give feedback.
All reactions