Hi,
I'm having the following situation: I installed Keyrock IdM and Wilma PEP successfully, secured an
Orion CB instance behind the proxy and authenticated with an authorized user. Everything OK.
The problem arose when I tried to set up an IoT sensor in the IdM. This is what happened:
The sensor was successfully set up
I could retrieve a token from the IdM via its API
When I try to access the secured Orion, the request freezes and I don't get any response back.
Digging a little bit in the code, I tracked down the path it takes to verify a token:
The PEP queries the IdM to authenticate the token idm.js:107.
The IdM checks the token which could be either of type user, or iot.
As this case is an iot sensor, it checks the correct table of the DB and returns the following (this was made with a direct query to the IdM endpoint, not through the PEP):
The response in the PEP implementation is treated as a user, and line 114 maps the users organizations:
const organizations = userInfo.organizations.map(elem => elem.id);
Which is undefined, thus the corresponding error arises:
ERROR: Server - Caught exception: TypeError: Cannot read property 'map' of undefined
Am I doing anything wrong here?
I'm running both services with docker, PEP latest version and IdM version 7.6.
Hi, I'm having the following situation: I installed
Keyrock IdM
andWilma PEP
successfully, secured anOrion CB
instance behind the proxy and authenticated with an authorized user. Everything OK.The problem arose when I tried to set up an IoT sensor in the IdM. This is what happened:
IdM
via its APIOrion
, the request freezes and I don't get any response back.Digging a little bit in the code, I tracked down the path it takes to verify a token:
PEP
queries theIdM
to authenticate the tokenidm.js:107
.IdM
checks the token which could be either of type user, or iot.IdM
endpoint, not through thePEP
):PEP
implementation is treated as a user, and line 114 maps the users organizations:const organizations = userInfo.organizations.map(elem => elem.id);
Which is undefined, thus the corresponding error arises:ERROR: Server - Caught exception: TypeError: Cannot read property 'map' of undefined
Am I doing anything wrong here? I'm running both services with docker, PEP latest version and IdM version 7.6.
Any help would be appreciated