Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
506 views
in Technique[技术] by (71.8m points)

spring security - How to update OPA policies on the fly

I'm new to OPA (open policy agent) and trying to use OPA as centralized service for authorization.

I've couple of micro services built using Spring boot and I don't want to use spring security to guard my resources/controllers as this would require annotating my controllers with Spring security annotations and any change to resource and role mapping would result in deployment of services, that is motivation of using OPA, since my resource and role mapping and are saved in DB (JSON format) and can be configured/changed on the fly, so how do I update the OPA policies, I came across the bundles API but that requires the policies (rego files) to be packed as tar file and OPA will pull it on regular interval, so how do I translate my JSON (resource to role mappings) to rego files?

question from:https://stackoverflow.com/questions/65646921/how-to-update-opa-policies-on-the-fly

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...