2

When using Fi-ware map viewer mashup for displaying Points of interest from a orion instance I have to allow ALWAYS "Load unsafe scripts" option on my browser to display them on the map. Otherwise nothing is shown.

There is a way to configure properly context orion broker or Map viewer mashup?

I created a self-signed SSL certificate on the server where Orion runs with the following commands:

$ openssl genrsa -des3 -out server.key 1024
$ openssl req -new -key server.key -out server.csr
$ openssl x509 -req -days 365 -in server.csr -signkey server.key -out    server.crt

and I run context Orion broker through https:

$contextBroker -https -key <path-to-server-key> cert <path-to-server-cert>

and then I can make requests through "https" but still having this warning. I guess that it is because my certificate is not a valid one? Maybe I have misconceptions? there is a way to fix it without this workaround?

Vicens Fayos
  • 740
  • 1
  • 5
  • 18

1 Answers1

2

Configuring the Context Broker to use certificates (https) is not going to help solving the "Load unsafe scripts" problem because WireCloud don't make direct requests to the context broker (at least by default). It make those requests through two proxies:

  • the standard WireCloud's cross domain proxy for simple requests (like queries, updates, etc...)
  • in the other hand, for subscriptions, widgets have to use an NGSI proxy. This proxy will configure an HTTP endpoint where the context broker can send NGSI notifications. Widgets connect to this proxy using an EventSource (similar to websockets) so they are able to receive real-time notifications without using polling.

What is going to solve your "Load unsafe script" problem is using a NGSI proxy using https (FIWARE Lab provides https://ngsiproxy.lab.fiware.org for this purpose). The problem: the Orion Context Broker does not allow sending notifications to https servers by default.

The Orion Context Broker - Installation and Administration Guide describe how to add support for sending notification to https servers and you can find more info here in StackOverflow.

Cheers.

Community
  • 1
  • 1
Álvaro Arranz
  • 2,015
  • 1
  • 13
  • 22