apinf / platform

Apinf - Open source API management platform with multi proxy and protocol support
https://apinf.com/
European Union Public License 1.1
74 stars 35 forks source link

Internal Server Error while log-in with Keyrock on APInf #3727

Open Madhu-NEC opened 5 years ago

Madhu-NEC commented 5 years ago

I tried integrating Keyrock with APInf using Configue with Fiware button on APInf homepage. The installation of APInf is done using docker-compose.

Steps followed to configure Keyrock with APInf:

  1. Sign up on Keyrock.
  2. Created an application(APInf) on Keyrock (Using account other than admin).
  3. Got the Client_ID and Client_Secret.
  4. Go to APInf click on Configure with Fiware, enter the IDM url, client_id and client_secret.
  5. Select Pop-Up based login and save configurations.
  6. Click on Sign in with Fiware, enter the email and password.
  7. On APInf it says "Internal Server Error".

I am using apinf/api-umbrella:0.15.0-apinf2 docker image for API-Umbrella and apinf/platform:0.58.0 docker image for APInf.

I am not able to login with Keyrock user except admin.

Below are the error logs for the same:

at Object.EJSON.clone (packages/ejson/ejson.js:594:18) at cloneAttemptWithConnection (packages/accounts-base/accounts_server.js:130:29) at packages/accounts-base/accountsserver.js:139:22 at [object Object]..extend.each (packages/callback-hook.js:128:15) at AccountsServer.Ap._validateLogin (packages/accounts-base/accounts_server.js:136:27) at AccountsServer.Ap._attemptLogin (packages/accounts-base/accounts_server.js:342:8) at [object Object].methods.login (packages/accounts-base/accounts_server.js:530:21) at [object Object].methodMap.(anonymous function) (apinf_packages/core/capture_exception/server/wrap_meteor_methods.js:17:30) at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1768:12) at packages/ddp-server/livedata_server.js:719:19 at [object Object].EVp.withValue (packages/meteor.js:1135:15) at packages/ddp-server/livedata_server.js:717:46 at [object Object].EVp.withValue (packages/meteor.js:1135:15) at packages/ddp-server/livedataserver.js:715:46 at [object Object]..extend.protocol_handlers.method (packages/ddp-server/livedata_server.js:689:23) at packages/ddp-server/livedata_server.js:559:43 {"line":"431","file":"oauth.js","message":"Error in OAuth Server: getTokens error. Failed to complete OAuth handshake with FIWARE IdM. failed [500] {\"error\":\"invalid_argument\"}","time":{"$date":1552471925317},"level":"warn"} Exception while invoking method 'login' Error: getTokens error. Failed to complete OAuth handshake with FIWARE IdM. failed [500] {"error":"invalid_argument"} at getTokens (packages/apinf:fiware/fiware_server.js:143:20) at Object.handleOauthRequest (packages/apinf:fiware/fiware_server.js:49:20) at OAuth._requestHandlers.(anonymous function) (packages/oauth2.js:27:31) at middleware (packages/oauth.js:203:5) at packages/oauth.js:176:5 Exception while invoking method 'login' RangeError: Maximum call stack size exceeded at isArguments (/opt/meteor/dist/bundle/programs/server/npm/node_modules/meteor/es5-shim/node_modules/es5-shim/es5-shim.js:1037:16) at Function.keys (/opt/meteor/dist/bundle/programs/server/npm/node_modules/meteor/es5-shim/node_modules/es5-shim/es5-shim.js:1100:17) at Object.EJSON.clone (packages/ejson/ejson.js:594:10) at packages/ejson/ejson.js:575:33 at Array.map (native) at Object.EJSON.clone (packages/ejson/ejson.js:575:14) at packages/ejson/ejson.js:595:22 at Array.forEach (native)

Madhu-NEC commented 5 years ago

I have also tried the Sign-in with Fiware on https://apinf.io/sign-in. There also i got the same Internal server error.

issue_internal_server_error_apinfio

ilarimikkonen commented 5 years ago

Hi,

I think this is related to this: https://github.com/apinf/platform/pull/3663/files

@madhu2910 could you please try the following:

instead 0.58.0. pull the "latest" docker image for platform

OR

if you want to work with containers, in addition to this you need to

There was a change in the keyrock code this should help. This is then fixed in the new release