Built-in HTTP and deterministic "two-step" calls #176
Unanswered
grubis
asked this question in
OPA and Rego
Replies: 1 comment 2 replies
-
This should be doable. I'm not sure what's going wrong based on your description, could you share a trace of a failing run? Or come up with an MWE showing the same behaviour? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In Rego, I have a rule that requires two sequential HTTP calls... one POST to authorize and get a token, then one GET to use the token and get the data. This is just the way the system I'm interfacing with works.
This works once, and then never again... and in the documentation (latest release) I see for HTTP:
"This built-in function must not be used for effecting changes in external systems as OPA does not guarantee that the statement will be executed due to automatic performance optimizations that are applied during policy evaluation."
I think "optimizations" is not performing both HTTP calls on every run. Any ideas around this... I am not using the cache.
Thanks for any guidance.
Beta Was this translation helpful? Give feedback.
All reactions