In the Audit add-on the Who attribute of the EntityLog entity is always the value of the spring.security.oauth2.authorizationserver.client.myclient.registration.client-id property when using REST Datastore. How can we save the actual user who made the changes?
That’s correct, the operations on the service are executed on behalf of the “integration user” which represents the whole client application. This is how Client Credentials Grant works.
Thank you for your response. I understand the explanation regarding the use of the “integration user” for operations in the service via the Client Credentials Grant flow.
As you mention in the Jmix documentation, the Resource Owner Password Credentials Grant is not considered sufficiently secure in certain scenarios and is already deprecated in the OAuth 2.1 standard. Given this, I would like to know if there is an alternative way to log the actual user performing the modification instead of the client application itself in the Audit add-on, while ensuring compliance with OAuth 2.1 recommendations.
Could you please advise on a secure and standard approach to achieve this?
Thanks to the team for the great and practical example. However, with REST DataStore, it is necessary to pay attention on the Front-end when executing code under the SystemUser or AnonymousUser session to get data from Back-end.
I hope the team will complete and add this case.