Getting authorization data in geoserver

i use leaflet, geoserver and js. And also using tomcat

I have more than 400 users and each has its own role, adding more than 400 users to geoserver and configuring them individually is too long.

The user is currently logged in like this:

enter image description here

The question is, if there is any way to get the data of an authorized user and apply roles and filters to it?

I will also say that the users are in the postgres database