Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-8753

[fiware-stackoverflow] FIWARE Wilma PEP Proxy bug: x-organisations header value contains rubbish

    Details

      Description

      Created question in FIWARE Q/A platform on 29-04-2016 at 01:04
      Please, ANSWER this question AT https://stackoverflow.com/questions/36927066/fiware-wilma-pep-proxy-bug-x-organisations-header-value-contains-rubbish

      Question:
      FIWARE Wilma PEP Proxy bug: x-organisations header value contains rubbish

      Description:
      I want to restrict data that is retrieved from a back-end server to organisations to which the authenticated user is a member.

      From the documentation (https://github.com/ging/fiware-pep-proxy) this should be possible using Wilma's inbuilt function for populating a number of http headers:

      Once authenticated, the forwarded request will include additional HTTP >headers with user info:

      X-Nick-Name: nickname of the user in IdM
      X-Display-Name: display name of user in IdM
      X-Roles: roles of the user in IdM
      X-Organizations: organizations in IdM

      However the actual values of the last two headers as forwarded are:

      'x-roles': '[object Object]',
      'x-organizations': '[object Object]',

      The headers literally contain a string value "[object Object]" rendering them completely useless. It looks like the author forgot to serialize the roles and organisations data.

      Please tell me i am overlooking something here?
      If not, any chance of a timely fix? I am not a javascript guru, but a quick google search tells me "JSON.stringify" should do the trick.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        8d 19h 49m 1 Alvaro Alonso 31/May/17 10:53 AM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        aalonsog Alvaro Alonso made changes -
        Resolution Dismissed [ 10102 ]
        Status Open [ 1 ] Closed [ 6 ]
        fla Fernando Lopez made changes -
        HD-Enabler KeyRock [ 10889 ] Wilma [ 10890 ]
        fla Fernando Lopez made changes -
        HD-Enabler KeyRock [ 10889 ]
        Description
        Created question in FIWARE Q/A platform on 29-04-2016 at 01:04
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/36927066/fiware-wilma-pep-proxy-bug-x-organisations-header-value-contains-rubbish


        +Question:+
        FIWARE Wilma PEP Proxy bug: x-organisations header value contains rubbish

        +Description:+
        I want to restrict data that is retrieved from a back-end server to organisations to which the authenticated user is a member.

        From the documentation (https://github.com/ging/fiware-pep-proxy) this should be possible using Wilma's inbuilt function for populating a number of http headers:


          Once authenticated, the forwarded request will include additional HTTP >headers with user info:
          
          
          X-Nick-Name: nickname of the user in IdM
          X-Display-Name: display name of user in IdM
          X-Roles: roles of the user in IdM
          X-Organizations: organizations in IdM
          


        However the actual values of the last two headers as forwarded are:


        'x-roles': '[object Object]',
        'x-organizations': '[object Object]',


        The headers literally contain a string value "[object Object]" rendering them completely useless. It looks like the author forgot to serialize the roles and organisations data.

        Please tell me i am overlooking something here?
        If not, any chance of a timely fix? I am not a javascript guru, but a quick google search tells me "JSON.stringify" should do the trick.
        Created question in FIWARE Q/A platform on 29-04-2016 at 01:04
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/36927066/fiware-wilma-pep-proxy-bug-x-organisations-header-value-contains-rubbish


        +Question:+
        FIWARE Wilma PEP Proxy bug: x-organisations header value contains rubbish

        +Description:+
        I want to restrict data that is retrieved from a back-end server to organisations to which the authenticated user is a member.

        From the documentation (https://github.com/ging/fiware-pep-proxy) this should be possible using Wilma's inbuilt function for populating a number of http headers:


          Once authenticated, the forwarded request will include additional HTTP >headers with user info:
          
          
          X-Nick-Name: nickname of the user in IdM
          X-Display-Name: display name of user in IdM
          X-Roles: roles of the user in IdM
          X-Organizations: organizations in IdM
          


        However the actual values of the last two headers as forwarded are:


        'x-roles': '[object Object]',
        'x-organizations': '[object Object]',


        The headers literally contain a string value "[object Object]" rendering them completely useless. It looks like the author forgot to serialize the roles and organisations data.

        Please tell me i am overlooking something here?
        If not, any chance of a timely fix? I am not a javascript guru, but a quick google search tells me "JSON.stringify" should do the trick.
        HD-Chapter Security [ 10841 ]
        fla Fernando Lopez made changes -
        Assignee Alvaro Alonso [ aalonsog ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 15:06|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 15:06|CREATED monitor | # answers= 0, accepted answer= False
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            aalonsog Alvaro Alonso
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: