Mapping the User Roles

You can define user roles in one of the following ways:

Define user roles statically – Define static roles for administrative and non-administrative users using the externalUserSetupProcessor or mtExternalUserSetupProcessor bean. This is the most common option. See Defining Static Roles.
Retrieve user roles from an external data source – See Retrieving User Roles from an External Data Source.