ging / fiware-idm

OAuth 2.0-based authentication of users and devices, user profile management, Single Sign-On (SSO) and Identity Federation across multiple administration domains.
https://keyrock-fiware.github.io
MIT License
36 stars 81 forks source link

Bugfixing for /user endpoint. #306

Closed jason-fox closed 1 year ago

jason-fox commented 1 year ago

Proposed changes

540c3e5bd5 adds an IS operator to trusted applications. When firing the PDP with the /user end point, with MySQL 8, this results in the following Sequelize error message:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near'

Fix is to remove the Op.IS operator since the SQL is not checking app_id IS NULL or the invalid app_id IS 'xxxxxx', but should be checking app_id = 'xxxxxx'

Also on oauth2.js, the JWT check assumes that the database holds token_types and if it is null, the app errors with Cannot read property 'includes' of undefined

Types of changes

What types of changes does your code introduce to the project: Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

github-actions[bot] commented 1 year ago

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheckcla in this Pull Request

jason-fox commented 1 year ago

I have read the CLA Document and I hereby sign the CLA

jason-fox commented 1 year ago

recheckcla

apozohue10 commented 1 year ago

merged!