Search code examples
fiwarefiware-orion

FIWARE - Are any request headers forwarded to Orion Context Provider?


Context Broker with Context Provider

Queries (e.g. GET /v2/entities?q=temperature>40) from the ContextConsumers aren't sent to the ContextProvider: https://github.com/telefonicaid/fiware-orion/issues/2282

I am examining the following alternative:

  • Create a web application and place it between the ContextBroker and the ContextProvider.
  • The payload of POST /v2/registrations contains the lines below:
  "provider": {
    "http": {
      "url": "URL of the web app"
    }
  }
  • The request header of GET /v2/entities from a ContextConsumer includes query information if the ContextConsumer wants a filtered response.
  • The web app relays requests and responses from/to the ContextBroker to/from the ContextProvider.
  • The web app filters the responses from the ContextProvider to the ContextBroker when the ContextConsumers put query information in their request headers.

Could anyone let me know if any request headers are forwarded to a ContextProvider by a ContextBroker?


Solution

  • I'd say that the request headers that are being forwarded are:

    • fiware-correlator
    • fiware-service
    • fiware-servicepath
    • x-auth-token

    For more detail, I'd recommend to have a look to the httpSendRequest() function implementation in the Orion Context Broker code.