Skip to content

Auth token not being passed #553

@JoaoSandrini

Description

@JoaoSandrini

Im using wirecloud with scorpio (NGSI-LD Broker) and a Wilma pep proxy securing it. When testing the proxy using Postman, it works fine, declines unauthorized requests and accepts authorized ones.

Heres the request:
http://host.docker.internal:1027//ngsi-ld/v1/entities?limit=100&offset=0&count=true&options=keyValues&idPattern=.*&type=https%3A%2F%2Furi.fiware.org%2Fns%2FdataModels%2523Building

When trying to use Wirecloud from develop branch (so i can use NGSI-LD API), with a source operator that i modified so it also works with the LD API, it cant authenticate, the auth code is not being passed, as you can see on the tcp stream:

`GET /ngsi-ld/v1/entities?limit=100&offset=0&count=true&options=keyValues&idPattern=.%2A&type=https%3A%2F%2Furi.fiware.org%2Fns%2FdataModels%2523Building HTTP/1.1
Host: host.docker.internal:1027
accept-encoding: gzip, deflate, br, zstd
accept: application/ld+json, application/json
connection: close
sec-ch-ua-platform: "Windows"
fiware-oauth-header-name: Authorization
sec-ch-ua: "Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"
sec-ch-ua-mobile: ?0
fiware-oauth-token: true
x-requested-with: XMLHttpRequest
sec-fetch-site: same-origin
sec-fetch-mode: cors
sec-fetch-dest: empty
referer: http://localhost/admin6aec4f596a2d47d1/nerdscrossing
accept-language: pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7
via: 1.0 localhost (Wirecloud-python-Proxy/1.1)

HTTP/1.1 401 Unauthorized
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
WWW-Authenticate: IDM uri = undefined
Content-Type: application/json; charset=utf-8
Content-Length: 141
ETag: W/"8d-Msdj79MbnY7jpuNPWrmjxiY3QVQ"
Date: Wed, 22 Jan 2025 16:45:28 GMT
Connection: close

{
"type": "urn:dx:as:MissingAuthenticationToken",
"title": "Unauthorized",
"detail": "Auth-token not found in request header"
}`

But also as i can understand, the wirecloud OAuth backend should be treating the flow correctly, so i don't understand what is causing the token to no not be passed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions