gravitee-io / issues

Gravitee.io - API Platform - Issues
64 stars 26 forks source link

Integration error with OpenId Provider - mapping issue (no fields are located in...) base64 econding #8562

Closed espositogiacomo closed 9 months ago

espositogiacomo commented 1 year ago

Hi all, I configured an OpenID provider to enable the login on API Management Console with an Enterpise Account. I’m able to see the login pop up page where I enter my account info and login seems ok, but at the end the system answers with error. I got on log the following information, as you can see the field “USERID” is there, but gravitee is not able to recognize.

12:56:23.683 [gravitee-listener-84] ERROR i.g.r.a.service.impl.UserServiceImpl - Using mapping: “USERID”, no fields are located in eyJraWQiOiIwMDBjYjU0OC0xM2ZkLTEwMjEtOGQ4MC00NmY2MGFjYjAwMDAiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJDTj1pYW0wMDAzMSxPVT1BY2NvdW50IFRlc3QgSUFNLE9VPUFjY291bnQgZGkgU2Vydml6aW8sREM9cmV0ZSxEQz10ZXN0cG9zdGUiLCJhdWQiOiIwMDAyYTg3MS05ZWIyLTEzM2EtYmEwZS00NmY2MGFjYjAwMDAiLCJpc3MiOiJodHRwczpcL1wvc21hdXRoMTIucmV0ZS50ZXN0cG9zdGUiLCJVU0VSSUQiOiJpYW0wMDAzMSIsIkNPR05PTUUiOiJJQU10ZXN0IiwiRU1BSUwiOiJpYW0wMDAzMUBzdmlsLnBvc3RlaXRhbGlhbmUuaW5mbyIsIk5PTUUiOiJJQU0wMDAzMSJ9.pZ2kGQ3i1Q24VK6m8CdzCkN82PfPJ1MeC4x_wzvhDqk4uluRIEu1ONHpJUHViqfJ_otsrk4Qbch21ek64bX6idwUzahn6Ef7gjjohxrN6wiNlUJjMsLjw1ytJHEluTxq6FU26tsXaqgCiuvaQ9PW1olHNyl9ymVYjTYB5IpuARRHqp7MdHR1i6pLF0ys7adQKRlYrQEYpqXdMF1wtTIhiQekPlcXidf3cwUR6vQ3NcTNwZwdZkdYYB7Jmqjd15sdv-3MOhkvv_uwwRk-kSSTMod7vBot_X8PGALVAOI5SiWyR1LudHAflFbd49vnmMAtCOSyUVtWNf_DUMC_CyMbRQ

The userInfo is encoded but I decode with [jwt.io](http://jwt.io/) and the result is:

{ “sub”: “CN=iam00031,OU=Account Test IAM,OU=Account di Servizio,DC=rete,DC=testposte”, “aud”: “0002a871-9eb2-133a-ba0e-46f60acb0000”, “iss”: “[[https://smauth12.rete.testposte/”|| https://smauth12.rete.testposte/”|] [https://smauth12.rete.testposte/%E2%80%9D| https://smauth12.rete.testposte/%E2%80%9D]], “USERID”: “iam00031”, “COGNOME”: “IAMtest”, “EMAIL”: “[[iam00031@svil.posteitaliane.info| mailto:iam00031@svil.posteitaliane.info]| [mailto:iam00031@svil.posteitaliane.info| mailto:iam00031@svil.posteitaliane.info]]”, “NOME”: “IAM00031” } { “kid”: “000cb548-13fd-1021-8d80-46f60acb0000”, “alg”: “RS256” }

CLASSPATH: /opt/graviteeio-management-api/lib/gravitee-apim-rest-api-standalone-bootstrap-3.18.10.jar

Is it possible that base64econding is not supported? Looking in getUserProfileAttrs method I don't see any decondig

stale[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.