MitchellChu / enterprise-java-xacml

Automatically exported from code.google.com/p/enterprise-java-xacml
0 stars 2 forks source link

allow registering custom dataStores in DataStoreHelper #87

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It is currently impossible to register DataStore in any other way than
defining it in XACML configuration file (it isn't very convenient, because
requires changes in configuration.xsd if new attributes are required to be
passed to the DataStore implementation).

I am using Spring environment and managed to overcome similar problem when
defining attribute retrievers. I was able to programatically register new
attribute retriever simply by running:

AttributeRetrieverRegistry.getInstance(pdp).register(attrRetriever)

unfortunatelly it is impossible in DataStoreHelper.

Btw, are you planning to maintain this project in near future?

Original issue reported on code.google.com by marek.ho...@gmail.com on 29 May 2009 at 2:45

GoogleCodeExporter commented 9 years ago
the simple proposed solution:

public static synchronized void registerDataStore(PDP pdp, DataStore ds) {
    dsRegistry.put(pdp, ds);
    pdpRegistry.put(ds, pdp);
} 

Original comment by marek.ho...@gmail.com on 29 May 2009 at 2:50

GoogleCodeExporter commented 9 years ago
unfortunately it won't work because policyLoader is initialized at PDP 
construction
phase: 

policyLoader = DataStoreHelper.getDataStore(this);

Setter method for policyLoader seem to be last resort.

Original comment by marek.ho...@gmail.com on 29 May 2009 at 3:06