CUSTIS-public / EasyABAC

EasyABAC - simple framework for attribute based authorization in Java
26 stars 8 forks source link

Save/Load policies from Database? #2

Open M-Razavi opened 5 years ago

M-Razavi commented 5 years ago

Hi Did the PRP (Policy Retrieval Point) implement in your project from database? Is it possible to save/load policies from the database? (by overriding EasyAbacModelCreator or ...)

antlapit commented 5 years ago

Hi! I was busy a little, but now I'm ready for action. Actually in our projects we don't user database policy store, but I think it is good idea. Now you can create policy of yaml format from any InputStream or Reader (see custis.easyabac.model.easy.EasyAuthModel). As you can see we are using simple Java classes and not specific sources. So I think right way is to make easyabac-extension group something like store. I can do it for you on a weekend, I think

After that the easiest way is to make a spirng boot starter with database store

antlapit commented 5 years ago

As to overriding EasyAbacModelCreator I think it is not good idea, becase that will decreasy further extension possibilities. For example, if someone wants to load policy from other sources (like consul, keycloak or else), he will use EasyAbacModelCreator and will not be happy to include database dependencies

M-Razavi commented 5 years ago

@antlapit Thank you so much for quick response and also for developing the database extension.

I look forward to taking advantages of this part.

uPagge commented 3 years ago

Has the ability to use a database to store policies appeared or the project has died?