FIWARE-TMForum / Business-API-Ecosystem

The FIWARE/TMForum Business API Ecosystem allows the monetization of different kind of assets (both digital and physical) during the whole service life cycle, from offering creation to its charging, accounting and revenue settlement and sharing
https://business-api-ecosystem.rtfd.io/
GNU Affero General Public License v3.0
38 stars 22 forks source link

Can't sign in: Invalid request: only one authentication method is allowed #32

Closed Urtza2 closed 6 years ago

Urtza2 commented 6 years ago

Hi @fdelavega, I have the same problem as emetrepes.

FATAL: Server - 04a4d6fc-f264-4887-a29a-b384191d1f78 - ::1 - Anonymous - GET: /auth/fiware/callback?code=a76b0fafeaaf7b7578f1bd45e973502fb1bf8269&state=eyJjYW1lX2Zyb21fcGF0aCI6Ii8ifQ - Unexpected unhandled exception - InternalOAuthError: failed to fetch user profile. Stack trace:
InternalOAuthError: failed to fetch user profile (status: 400 data: "Invalid request: only one authentication method is allowed")
    at /home/user1/Business-API-Ecosystem/business-ecosystem-logic-proxy/node_modules/passport-fiware-oauth/lib/passport-fiware-oauth/oauth2.js:106:19
    at passBackControl (/home/user1/Business-API-Ecosystem/business-ecosystem-logic-proxy/node_modules/oauth/lib/oauth2.js:139:9)
    at IncomingMessage.<anonymous> (/home/user1/Business-API-Ecosystem/business-ecosystem-logic-proxy/node_modules/oauth/lib/oauth2.js:164:7)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)

I have install KeyRock using git clone and the version that I have is:

{
    "keyrock": {
        "version": "7.0.1",
        "release_date": "2018-06-25",
        "uptime": "",
        "git_hash": "https://github.com/ging/fiware-idm/releases/tag/7.0.1",
        "doc": "https://fiware-idm.readthedocs.io/en/7.0.1/",
        "api": {
            "version": "v1",
            "link": ""
        }
    }
}

I have downloaded Biz-Ecosystem from git and installed using script. git clone https://github.com/FIWARE-TMForum/Business-API-Ecosystem.git

Do you know how can I solve my problem?

Thanks Urtza

fdelavega commented 6 years ago

Hi @Urtza2

Version 6.4.0 which is the one installed by the script is not compatible with keyrock v7. The problem was related with how keyrock v7 expects authentication when retrieving user info (basically in v6 it expected the Authorization header plus a query string, which now gives the shown error). The integration with Keyrock v7 is included now in develop and master branches and will be released in version 7.4.0 this month.

Urtza2 commented 6 years ago

Thanks. I have install BIZ from develop branch and not it works

jivung commented 6 years ago

I have the same problem. I used the BAE develop branch and keyrock v7 (both installed via script). However, in the install.py of BAE the proxy is still cloned from branch v6.4.0:

proxy = {"url": "https://github.com/FIWARE-TMForum/business-ecosystem-logic-proxy.git", "branch": "v6.4.0"}

I guess the branch has to be changed to develop?

Urtza2 commented 6 years ago

I have installed Keyrock 7.0.1 and BIZ (Business API Ecosystem ) form git using develop branch. After you have to create an application in IDM for signing in BIZ and modify oauth2 section in config.js file of logic proxy. Urtza

fdelavega commented 6 years ago

@jivung yes, you need to clone develop branch (of all the components)

jivung commented 6 years ago

It was a couple of things I had to do to get it to work: