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

FIWARE.Request.Tech.Security.AuthorizationPDP.BadRequestForDomainCreation

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None

      Description

      Hi,
      Regarding with this issue, this is the full data:

      GE: Authzforce-fiware-bin-dist-4.1 (from
      http://catalogue.fiware.org/sites/default/files/storage/enablers/authzforce-fiware-bin-dist-4.1.zip)

      REQUEST:
      curl -i -X POST -H "Content-Type: application/xml;charset=UTF-8" \
      -d '<?xml version="1.0" encoding="UTF-8"?><taz:properties
      xmlns:taz="http://thalesgroup.com/authz/model"><name>MyDomain</name><description>This is my domain.</description></taz:properties>' \
      -H "Accept: application/xml" \
      http://localhost:8180/authzforce/domains/

      RESPONSE:
      HTTP/1.1 500 Internal Server Error
      Content-Type: text/html
      Content-Length: 1472
      Date: Mon, 02 Mar 2015 13:40:55 GMT
      Connection: close

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html
      xmlns="http://www.w3.org/1999/xhtml"><head><title>GlassFish Server Open
      Source Edition 3.1.2.2 - Error report</title><style
      type="text/css"><!--H1

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}

      H2

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}

      H3

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}

      BODY

      {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}

      B

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}

      P

      {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}

      A

      {color : black;}

      HR

      {color : #525D76;}

      --></style> </head><body><h1>HTTP Status 500 - </h1><hr/><p><b>type</b> Exception report</p><p><b>message</b></p><p><b>description</b>The server encountered an internal error () that prevented it from fulfilling this request.</p><p><b>exception</b> <pre>java.lang.NoSuchMethodError: javax.ws.rs.BadRequestException.validate(Ljavax/ws/rs/core/Response;Ljavax/ws/rs/core/Response$Status;)Ljavax/ws/rs/core/Response;</pre></p><p><b>note</b> <u>The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.1.2.2 logs.</u></p><hr/><h3>GlassFish Server Open Source Edition 3.1.2.2</h3></body></html>

      FULL-LOGS::/opt/glassfish3/glassfish/domains/domain1/logs/authzforce/error.log

      2015-03-02 14:43:41,107|WARN |http-thread-pool-8180(3)|
      AbstractJAXBProvider:655|javax.xml.bind.UnmarshalException

      • with linked exception:
        [org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 39;
        cvc-elt.1: Cannot find the declaration of element 'taz:properties'.]
        at
        com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:435)
        at
        com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:372)
        at
        com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:342)
        at
        org.apache.cxf.jaxrs.provider.JAXBElementProvider.unmarshalFromInputStream(JAXBElementProvider.java:263)
        at
        org.apache.cxf.jaxrs.provider.JAXBElementProvider.doUnmarshal(JAXBElementProvider.java:216)
        at
        org.apache.cxf.jaxrs.provider.JAXBElementProvider.readFrom(JAXBElementProvider.java:175)
        at
        org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1196)
        at
        org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1144)
        at
        org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:695)
        at
        org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:655)
        at
        org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:238)
        at
        org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:99)
        at
        org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
        at
        org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
        at
        org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
        at
        org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
        at
        org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
        at
        org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
        at
        org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:158)
        at
        org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:243)
        at
        org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:163)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
        org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:219)
        at
        org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
        at
        org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
        at
        org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at
        org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
        at
        org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
        at
        org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
        at
        org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
        at
        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
        at com.sun.enterprise.v3.services.impl.ContainerMapper
        $AdapterCallable.call(ContainerMapper.java:317)
        at
        com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
        at
        com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
        at
        com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
        at
        com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
        at
        com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
        at
        com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
        at
        com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
        at
        com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
        at
        com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
        at com.sun.grizzly.util.AbstractThreadPool
        $Worker.doWork(AbstractThreadPool.java:532)
        at com.sun.grizzly.util.AbstractThreadPool
        $Worker.run(AbstractThreadPool.java:513)
        at java.lang.Thread.run(Thread.java:745)
        Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber:
        39; cvc-elt.1: Cannot find the declaration of element 'taz:properties'.
        at
        com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
        at
        com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
        at
        com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437)
        at
        com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
        at
        com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)
        at
        com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1906)
        at
        com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:746)
        at
        com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:570)
        at
        com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:101)
        at
        com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:246)
        at
        com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:180)
        at
        com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:370)
        ... 45 more

      I guess XML provided is wrong defined or uncompleted:

      <?xml version="1.0" encoding="UTF-8"?>
      <taz:properties xmlns:taz="http://thalesgroup.com/authz/model">
      <name>MyDomain</name>
      <description>This is my domain.</description>
      </taz:properties>

      Could you provide me one right?

      Thanks in advance,
      Álvaro Vega

      BTW: I'm pretty sure that your input request form is translating xml
      code.

      On Mon, 2015-03-02 at 14:31 +0100, DANGERVILLE Cyril wrote:
      > Hello,
      >
      > This form is only for first contact (before you decide to use the GE).
      > Would you mind resending your issue to the following mailing list,
      > please?
      >
      > fiware-tech-help@lists.fi-ware.org
      >
      > Please also indicate the version of the GEi you are trying to install,
      > and the full stracktrace you got in the logs (not just the first/last
      > exception). Thank you.
      >
      >
      >
      > Then it will be assigned to me by the FIWARE helpdesk and I will take
      > care of it.
      >
      > Sorry for the extra effort, but it will be better handled this way.
      > Besides, it seems your XML in the curl request was stripped off (see
      > mail below). I guess you didn’t just send “'MyDomainThis is my
      > domain » in the request body.
      >
      >
      >
      > Regards,
      >
      > Cyril
      >
      >
      >
      > De : notifications@typeform.com notifications@typeform.com
      > Envoyé : lundi 2 mars 2015 13:09
      > À : cyril.dangerville@thalesgroup.com
      > Objet : Typeform: New request to FIWARE.AzPDP.Contact
      >
      >
      >
      >
      > Your typeform FIWARE.AzPDP.Contact has a new entry. Here are the
      > results:
      >
      > * Please describe the use case for which you intend to use the
      > FIWARE Authorization PDP.
      > test
      >
      >
      >
      > * What type of service do you want to control access to?
      > (Protocol, API... e.g. HTTP/REST)
      > rest
      >
      >
      >
      > * You can now formulate your request, at last
      > I'm trying to set up authzforce. After configure opendj and
      > deploy authz I'm trying to create a new domain following
      > instructions:
      > https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Access_Control_-_Installation_and_Administration_Guide#Domain_Creation
      > $ curl -i -X POST -H "Content-Type:
      > application/xml;charset=UTF-8" \
      > -d 'MyDomainThis is my domain.' \
      > -H "Accept: application/xml" \
      > http://localhost:8180/authzforce/domains
      >
      > and the response is:
      > HTTP/1.1 500 Internal Server Error
      > Content-Type: text/html
      > Content-Length: 1472
      > Date: Mon, 02 Mar 2015 12:03:30 GMT
      > Connection: close
      > HTTP Status 500 -
      >
      > ______________________________________________________________________
      > type Exception report
      >
      > message
      >
      > descriptionThe server encountered an internal error () that prevented
      > it from fulfilling this request.
      >
      > exception
      >
      > java.lang.NoSuchMethodError: javax.ws.rs.BadRequestException.validate(Ljavax/ws/rs/core/Response;Ljavax/ws/rs/core/Response$Status;)Ljavax/ws/rs/core/Response;
      >
      > note The full stack traces of the exception and its root causes are
      > available in the GlassFish Server Open Source Edition 3.1.2.2 logs.
      >
      >
      > ______________________________________________________________________
      > GlassFish Server Open Source Edition 3.1.2.2
      >
      >
      >
      > But in authz traces I've see:
      > 015-03-02 13:03:30,706|WARN |http-thread-pool-8180(4)|
      > AbstractJAXBProvider:655|
      > javax.xml.bind.UnmarshalException
      > - with linked exception:
      > [org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 39;
      > cvc-elt.1: Cann
      > ot find the declaration of element 'taz:properties'.]
      > at
      > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStrea
      > mException(UnmarshallerImpl.java:435)
      >
      > I guess XML provided is wrong:
      > 'MyDomainThis is my domain.'
      >
      > Could you provide me one right?
      > Thanks in advance
      >
      >
      >
      > To complete, please give me some contact information so that we can
      > get back to you.
      >
      > * Your full name (last name last):
      > Alvaro Vega
      >
      >
      >
      > * Your email address:
      > alvaro.vegagarcia@telefonica.com
      >
      >
      >
      > * Name of your organization (company, institution, etc.):
      > Telefonica I+D
      >
      >
      >
      > * Your job function (especially in relation to FIWARE):
      > R&D Engineer
      >
      >
      >
      >
      >
      > Have a nice day
      > Team Typeform
      >
      >

      ________________________________

      Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede contener información privilegiada o confidencial y es para uso exclusivo de la persona o entidad de destino. Si no es usted. el destinatario indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización puede estar prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.

      The information contained in this transmission is privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, do not read it. Please immediately reply to the sender that you have received this communication in error and then delete it.

      Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e proceda a sua destruição
      _______________________________________________
      Fiware-tech-help mailing list
      Fiware-tech-help@lists.fi-ware.org
      https://lists.fi-ware.org/listinfo/fiware-tech-help

      [Created via e-mail received from: Alvaro Vega <alvaro.vegagarcia@telefonica.com>]

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        23d 8h 52m 1 Cyril Dangerville 25/Mar/15 11:56 PM
        In Progress In Progress Answered Answered
        5s 1 Cyril Dangerville 25/Mar/15 11:56 PM
        Answered Answered Closed Closed
        2s 1 Cyril Dangerville 25/Mar/15 11:56 PM

          People

          • Assignee:
            cdangerville Cyril Dangerville
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: