Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
537 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 reply this article.

OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...