Closed wagmarcel closed 3 years ago
The forwarding in Orion-LD is independent of the forwarding mechanism used by Orion. It's still being defined in ETSI ISG CIM and what you have found is merely a proof-of-concept that was implemented in Orion-LD and one of the iot-agents.
And yes, the HTTP header you mention should of course be included in the forwarded request (that one and more headers).
I will try to implement this specific header some time this week.
github auto-closes issues ... Reopening it. @wagmarcel , please re-test and close the issue if satisfied.
Wait, you may need a docker image to test ... I've created a new image and pushed to dockerhub, with the tag "latest"
Thanks @kzangeli ! I tested the latest image and the scenario described above worked for me! I am impressed by the speed of fixing this issue :-) Now I can continue my evaluation of Orion-LD (I am currently exploring integration with a project using Keycloak). I have another question though: I would like to use the x-auth-token forwarding also for subscriptions, e.g. when I send attribute updates, I'd expect the subscription request also to forward the x-auth-token. I think your patch only solved the ContextSourceRegistration (which is great!) but not the Subscription, right?
You're in luck!
I implemented exactly what you need a few weeks a ago on request from another user. It's a pretty new feature, I think we added it in the 1.3.1 release of the API.
In short, when creating your subscription, you can ask the broker to use any number of extra HTTP headers for the notifications originating from the subscription.
Just put the header name and its value in the array notification::receiverInfo (a key-value object) of the subscription. As an example, see the following payload data in the functional test I used to implement this feature:
Thanks! That sounds exactly like something I need. Just checked it on latest container and looks good for me! Then I'll close the issue.
I am trying to use the X-Auth-Token header with of Orion-LD. I executed the following steps:
POST
/ngsi-ld/v1/entities
endpointPOST
/ngsi-ld/v1/csourceRegistrations/
endpoint to myserverGET
/ngsi-ld/v1/entities/urn:ngsi-ld:object1
endpoint.What I see then is that orion-LD is requesting property1 from myserver, so the request is successfully forwarded. Howerver, when I add the
X-Auth-Token
header to step 3. it is not forwarded to myserver. I tried the same with the orion ngsi-v2 server and the forwarding of theX-Auth-Token
header worked.Can anyone tell me whether this is a known issue?