I need to make a series of features available in a REST service, but security is dynamic. That is, an administrator can change the permissions according to his will.
In my searches, I only find authentication forms where permissions to resources are pre-established via the configuration file / roles, that is, a user must belong to a group (role) and this group has access to a list of resources. This does not work for me, since more groups can be created at any time with different permissions.
One way I figured is to send the user / password to each request and set whether the user is allowed at the time of execution of this method, but I believe there is a more sophisticated way to resolve this.