1
votes

Until now, I've been working with a context Broker Instance in stand-alone mode created in Fi-Lab/Cloud and using psb-orion-image. Now I would like to federate an instance of that CB with http//orion.lab.fi-ware.org. I use XML forms to create, update... and the name of the instance to federate is "UPCT:TEMPERATURE:SENSOR" wich sensor type is "UPCT:SENSOR".

So, connecting by SSH I send the next form:

(curl localhost:1026/NGSI10/subscribeContext -s -S --header 'Content-Type: application/xml' -d @- | xmllint --format -) <<EOF
<?xml version="1.0"?>
<subscribeContextRequest>
  <entityIdList>
    <entityId type="UPCT:SENSOR" isPattern="false">
      <id>UPCT:TEMPERATURE:SENSOR</id>
    </entityId>
  </entityIdList>
  <reference>http://orion.lab.fi-ware.eu:1026/ngsi10/notifyContext</reference>
  <duration>P1M</duration>
  <notifyConditions>
    <notifyCondition>
      <type>ONCHANGE</type>
      <condValueList>
        <condValue>temperature</condValue>
      </condValueList>
    </notifyCondition>
  </notifyConditions>
  <throttling>PT5S</throttling>
</subscribeContextRequest>
EOF

And I get a right reply, with and subscription ID. However, if I update de contextValue of my instance and try to send a query to http://orion.lab.fi.ware.eu:1026 I receive an error:

-:1: parser error : Start tag expected, '<' not found Auth-token not found in request header ^

I think I should get the same value that I update to my Instance as indicate in

https://forge.fi-ware.org/plugins/mediawiki/wiki/fiware/index.php/Publish/Subscribe_Broker_-_Orion_Context_Broker_-_User_and_Programmers_Guide#Context_Broker_Federation

I need to know what's wrong and how could I do federete to the global CB.

Thank you

1

1 Answers

0
votes

That error message is due to any request sent to Orion instance at orion.lab.fi-ware.org (including the notifications sent by other Orion instances) has to use autentication. At the present moment (i.e. version 0.14.1), Orion doesn't include the X-Auth-Token needed for authentication (see the quick start for programmers) in notifications.

However, the usual use case is federating Orion at orion.lab.fi-ware.org with private Orion user instances (i.e. orion.lab.fi-ware.org -> your Orion) not in the opposite way (i.e. your Orion -> orion.lab.fi-ware.org) as your are trying. This is given that typically what you want to do is to merge public information (e.g. Santander city sensors) with private information (e.g. the information produced by your sensors). Federating orion.lab.fi-ware.org -> your Orion in that way should work perfectly.

EDIT: the limitation in Orion 0.14.1 has been overcomed an current Orion version (2.0.0) propagates X-Auth-Token header in notifications (I don't remember in which exact version between 0.14.1 and 2.0.0, sorry...)