Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-15584

[fiware-stackoverflow] RuntimeException after adding MongoDB policy provider extension

    Details

      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

      { @XmlAttribute(name = "serverHost", required = true) protected String serverHost; @XmlAttribute(name = "serverPort", required = true) protected int serverPort; @XmlAttribute(name = "dbName", required = true) protected String dbName; @XmlAttribute(name = "collectionName", required = true) protected String collectionName; }

      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

        Hide
        backlogmanager Backlog Manager added a comment -

        2019-03-18 15:06|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2019-03-18 15:06|CREATED monitor | # answers= 0, accepted answer= False
        Hide
        cdangerville Cyril Dangerville added a comment -

        Hi, please reply to my comment on Stackoverflow.

        KR,
        Cyril

        Show
        cdangerville Cyril Dangerville added a comment - Hi, please reply to my comment on Stackoverflow. KR, Cyril
        Hide
        cdangerville Cyril Dangerville added a comment -

        No answer on stackoverflow for over two weeks.Closing.

        Show
        cdangerville Cyril Dangerville added a comment - No answer on stackoverflow for over two weeks.Closing.

          People

          • Assignee:
            cdangerville Cyril Dangerville
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: