Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace declaration error for structured Attributes #62

Closed
securedimensions opened this issue Feb 19, 2021 · 3 comments
Closed

Namespace declaration error for structured Attributes #62

securedimensions opened this issue Feb 19, 2021 · 3 comments
Assignees
Milestone

Comments

@securedimensions
Copy link

The GeoXACML extension supports the data type Geometry. The encoding for the Geometry AttributeValue can be done via String or XML:

The GeoXACML extension can be build via mvn install and be deployed onto the AuthzForce CE Server as described in the documentation.

When loading the GeoXACML policy for validating the Geometry encoding via GML, the following exception is thrown by the AuthzForce Server:

To reproduce the error,

  • load the GeoXACML extension onto the server
  • update the pdp.properties with the file from the folder /src/main/resources/updateProperties.xml
  • upload the GeoXACML policy from the folder /src/main/resources/conformance/geoxacml-3.0/core/policy-broken.xml

When loading the policy, the server throws the exception Duplicate declaration of namespace prefix 'gml' (empty string refers to default namespace)

Best
Andreas

@cdanger cdanger changed the title Namepsace declaration error for structured Attributes Namespace declaration error for structured Attributes Feb 28, 2021
@cdanger cdanger self-assigned this Feb 28, 2021
@cdanger
Copy link
Member

cdanger commented Mar 2, 2021

I think you meant /src/test/resources/conformance/... instead of /src/main/resources/conformance/... ;-) And you mention "the following exception" but it's not there, could you add it to your description please?

In the meantime, I tried to deploy the Geoxacml extension from your develop branch (commit 5f797d0d356d8a99e59abea36c1b8c182d326f99) to AuthzForce Server and I got a few errors:

1.java.lang.IllegalArgumentException: Extension urn:ogc:def:function:geoxacml:3.0:geometry-dimension is conflicting with urn:ogc:def:function:geoxacml:3.0:geometry-dimension registered with same ID
Because you have two Function classes with the same ID in GeometryFunctions.java: Dimension and SRID.

  1. java.util.ServiceConfigurationError: org.ow2.authzforce.core.pdp.api.PdpExtension: de.securedimensions.geoxacml.function.BagSetFunctions$GeometryFromBag Unable to get public no-arg constructor
    because the GeometryFromBag function in BagSetFunctions.java does not have a no-arg constructor.

I submitted a PR to fix these issues: securedimensions/authzforce-geoxacml-basic#1

@cdanger
Copy link
Member

cdanger commented Mar 5, 2021

If you want a quick fix, you may try replacing the authzforce-ce-core-pdp-api jar in /opt/authzforce-ce-server/webapp/WEB-INF/lib with the new version 18.0.1.
Else you may wait for the next AuthzForce server release that should happen by the end of the week.

cdanger added a commit that referenced this issue Mar 9, 2021
- Upgraded authzforce-ce-parent: 8.0.0
- Upgraded dependency authzforce-ce-rest-api-model: 6.0.0; authzforce-ce-jaxrs-utils: 2.0.1; jettison: 1.4.1; authzforce-ce-core-pdp-*: 17.1.0; authzforce-ce-core-pap-api: 11.0.0, authzforce-ce-pap-dao-flat-file: 13.0.0
- Added support for validation of XACML/JSON requests with custom JSON schema stored in config directory
- Upgraded to Java 11
- updated license headers for 2021
- Fixed issues spotted by Intellij
- Added new JNDI env variable for configuring the webapp: 'org.ow2.authzforce.domains.xacmlJsonSchemaRelativePath' (relative path to JSON schema, relative to configDir property)
@cdanger
Copy link
Member

cdanger commented Mar 10, 2021

Now release 10.0.0 is out, which should fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants