Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Enabler:AuthZForce
Description
Created question in FIWARE Q/A platform on 18-03-2019 at 14:03
Please, ANSWER this question AT https://stackoverflow.com/questions/55222019/runtimeexception-after-adding-mongodb-policy-provider-extension
Question:
RuntimeException after adding MongoDB policy provider extension
Description:
I have made my own MongoDBPolicyProvider and I have integrated it into Authzforce server, but I'm unable to start the webapp (docker image fiware/authzforce-ce-server, release-8.1.0) because of this exception:
java.lang.RuntimeException: Invalid PDP configuration of domain 'YAT-5z9ZEemGyAJCrBEAAg' in file '/opt/authzforce-ce-server/data/domains/YAT-5z9ZEemGyAJCrBEAAg/pdp.xml': refPolicyProvider is not an instance of class org.ow2.authzforce.pap.dao.flatfile.xmlns.StaticFlatFileDAORefPolicyProvider as expected.
I think that somehow it is still trying to retrieve policies from a StaticFlatFileDAORefPolicyProvider policy provider.
The extension's .jar is visible in server's classpath.
Here is my pdp configuration file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<pdp
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://authzforce.github.io/core/xmlns/pdp/6.0"
xmlns:oa="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"
version="6.0.0" enableXPath="false" strictAttributeIssuerMatch="false" maxVariableRefDepth="10" maxPolicyRefDepth="10">
<refPolicyProvider
id="refPolicyProvider"
xmlns:ext="PRP/mongoDB"
xsi:type="ext:MongoDBBasedPolicyProviderDescriptor"
serverHost="localhost" serverPort="27017" dbName="PRP" collectionName="policies" />
<rootPolicyProvider id="rootPolicyProvider" xsi:type="StaticRefBasedRootPolicyProvider">
<policyRef>root-rbac-policyset</policyRef>
</rootPolicyProvider>
</pdp>
This is the MongoDBBasedPolicyProviderDescriptor:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MongoDBBasedPolicyProviderDescriptor")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class MongoDBBasedPolicyProviderDescriptor extends AbstractPolicyProvider
I have done the process of integrating the PRP twice now, but I haven't been successful yet. I would appreciate any help in this direction.
Activity
- All
- Comments
- History
- Activity
- Transitions