Uploaded image for project: 'PicketBox '
  1. PicketBox
  2. SECURITY-590

RequestAttributeFactory.createTimeAttributeType(attName, issuer) API call causes a parsing exception

    Details

    • Steps to Reproduce:
      Hide

      Here is a tiny and hacky test - just use to check the different behaviour for time and dateTime only.

      import org.jboss.security.xacml.core.model.context.EnvironmentType;
      import org.jboss.security.xacml.core.model.context.RequestType;
      import org.jboss.security.xacml.factories.RequestAttributeFactory;
      import org.jboss.security.xacml.factories.RequestResponseContextFactory;
      import org.jboss.security.xacml.interfaces.RequestContext;

      public class TimeTest {
      public static void main(String[] args) throws Exception

      { RequestContext requestCtx = RequestResponseContextFactory.createRequestCtx(); RequestType requestType = new RequestType(); EnvironmentType environmentType = new EnvironmentType(); environmentType.getAttribute().add( RequestAttributeFactory.createTimeAttributeType("x", null)); //RequestAttributeFactory.createDateTimeAttributeType("y", null)); requestType.setEnvironment(environmentType); requestCtx.setRequest(requestType); }

      }

      Show
      Here is a tiny and hacky test - just use to check the different behaviour for time and dateTime only. import org.jboss.security.xacml.core.model.context.EnvironmentType; import org.jboss.security.xacml.core.model.context.RequestType; import org.jboss.security.xacml.factories.RequestAttributeFactory; import org.jboss.security.xacml.factories.RequestResponseContextFactory; import org.jboss.security.xacml.interfaces.RequestContext; public class TimeTest { public static void main(String[] args) throws Exception { RequestContext requestCtx = RequestResponseContextFactory.createRequestCtx(); RequestType requestType = new RequestType(); EnvironmentType environmentType = new EnvironmentType(); environmentType.getAttribute().add( RequestAttributeFactory.createTimeAttributeType("x", null)); //RequestAttributeFactory.createDateTimeAttributeType("y", null)); requestType.setEnvironment(environmentType); requestCtx.setRequest(requestType); } }

      Description

      Using the API call RequestAttributeFactory.createTimeAttributeType(attName, issuer) causes a "ParsingException: couldn't create http://www.w3.org/2001/XMLSchema#time attribute based on DOM node"

      Note that with the above API call, we do not supply any time string, but assume that the current time is used. As a comparison the similar API call RequestAttributeFactory.createDateTimeAttributeType(attName, issuer) works without any issues - hence it seems logical that the createTimeAttributeType() contains a possible bug

        Gliffy Diagrams

          Attachments

          1. SECURITY-590.patch
            5 kB
            Dan Gradl
          2. SECURITY-590-v2.patch
            12 kB
            Dan Gradl

            Activity

              People

              • Assignee:
                dgradl Dan Gradl
                Reporter:
                asankha Asankha Perera
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: