api-platform / demo

Demo app for the API Platform framework
https://demo.api-platform.com
MIT License
295 stars 197 forks source link

feat: use OIDC server with fine-grained authorization #386

Closed vincentchalamon closed 5 months ago

vincentchalamon commented 6 months ago

Description

tl;dr: this PR aims to deport the authorization out of Symfony to the OIDC server.

Now that we have an OIDC server, and in order to respect the decentralization state of the art, the Symfony application should not handle the user roles and permissions anymore, as it's supposed to be the responsability of the OIDC server. The Symfony application is a resource server which communicates with the OIDC server to decentralize the user roles and permissions.

To implement this enhancement, the Symfony application must evolve to contact the OIDC server in order to check the user roles and permissions:

TODO

Improvements (could be backported to Symfony):

Links

https://www.keycloak.org/docs/latest/authorization_services/index.html