How to push policy bundle to OPA #320
-
In the OPA documentation it's mentioned that policy bundle(s) can be fetched from a service periodically or it can be pushed into the OPA using some REST api. But how exactly can we push a specific policy into OPA side car through REST api? Note I want to push/replace/override a complete policy bundle not just a sub-part of it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @dushyant7917 👋 While I'm not sure this is what is being referenced in that page of the docs, it is possible to use HTTP long polling to get faster policy updates to an OPA instance. This functionality is documented here: https://www.openpolicyagent.org/docs/latest/management-bundles/#http-long-polling. Note however that this requires the bundle service to support the feature (via sending the
This would support this too. Does that sound like something that could work for you? |
Beta Was this translation helpful? Give feedback.
Hi @dushyant7917 👋
While I'm not sure this is what is being referenced in that page of the docs, it is possible to use HTTP long polling to get faster policy updates to an OPA instance.
This functionality is documented here: https://www.openpolicyagent.org/docs/latest/management-bundles/#http-long-polling. Note however that this requires the bundle service to support the feature (via sending the
application/vnd.openpolicyagent.bundles
Content Type header).This would support this too.
Does that sound like something that could work for you?