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

FIWARE.Question.Tech.How to access Fiware context behind WILMA PEP proxyavoiding CORS restrictions?.

    Details

      Description

      Created question in FIWARE Q/A platform on 22-03-2021 at 09:03
      Please, ANSWER this question AT https://stackoverflow.com/questions/66742992/how-to-access-fiware-context-behind-wilma-pep-proxyavoiding-cors-restrictions

      Question:
      How to access Fiware context behind WILMA PEP proxyavoiding CORS restrictions?

      Description:
      I am accessing a dockerized orin context broker through a React App. All works fine in the local network but when I deploy to a remote server the request gets blocked by CORS.
      i create the request using ngsijs library:
      componentDidMount() {
      var connection = new NGSI.Connection("http://172.16.2.30:1027", {
      headers:

      { "X-Auth-Token": token, "fiware-service": "openiot", "fiware-servicepath": "/" }

      });

      All works with my local address.
      I tried to disable cross scripting protection in wilma context broker in the environment configuration of the docker container :

      • PEP_PASSWORD=pep_proxy_bc0e6...
      • PEP_PROXY_PDP=idm
      • PEP_PROXY_MAGIC_KEY=1234
      • PEP_PROXY_PUBLIC_PATHS=/version
      • PEP_PROXY_CORS_ORIGIN=false
      • PEP_PROXY_CORS_METHODS=GET,HEAD,PUT,PATCH,POST,DELETE
      • PEP_PROXY_CORS_MAX_AGE=true`

      The error which I receive is

      Access to fetch at 'http://my_public_domain.net:1027/v2/entities? type=SimpleSensor' from origin 'http://87.254.4.166:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

      The Keyrock IDM works on the exposed domain without any problem allowing identity management.
      We are using Apache to redirect the calls to the docker server.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        23h 59m 1 Backlog Manager 24/Mar/21 6:31 AM
        In Progress In Progress Answered Answered
        23h 59m 1 Backlog Manager 25/Mar/21 6:31 AM
        Answered Answered Closed Closed
        12d 3h 45m 1 Fernando Lopez 06/Apr/21 11:17 AM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        backlogmanager Backlog Manager made changes -
        Summary [fiware-stackoverflow] How to access Fiware context behind WILMA PEP proxyavoiding CORS restrictions? FIWARE.Question.Tech.How to access Fiware context behind WILMA PEP proxyavoiding CORS restrictions?.
        HD-Enabler Unknown [ 10910 ]
        HD-Chapter Unknown [ 10845 ]
        HD-Node Unknown [ 10852 ]
        fla Fernando Lopez made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        fla Fernando Lopez made changes -
        Assignee Alvaro Alonso [ aalonsog ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2021-03-25 05:31|UPDATED status: transition Answered| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2021-03-25 05:31|UPDATED status: transition Answered| # answers= 1, accepted answer= False
        backlogmanager Backlog Manager made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2021-03-24 05:31|UPDATED status: transition Answer| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2021-03-24 05:31|UPDATED status: transition Answer| # answers= 1, accepted answer= False
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        backlogmanager Backlog Manager made changes -
        HD-Enabler Unknown [ 10910 ]
        HD-Chapter Unknown [ 10845 ]
        HD-Node Unknown [ 10852 ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2021-03-23 05:31|CREATED monitor | # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2021-03-23 05:31|CREATED monitor | # answers= 1, 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: