Remove the ROLE_CONTROLLER_ANONYMOUS (#2948)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2026-03-05 10:01:43 +02:00
committed by GitHub
parent b38df5b512
commit 7a642f564e
8 changed files with 28 additions and 53 deletions

View File

@@ -172,7 +172,7 @@ public class AmqpMessageHandlerService extends BaseAmqpService {
private static void setTenantSecurityContext(final String tenant) {
final AnonymousAuthenticationToken authenticationToken = new AnonymousAuthenticationToken(
UUID.randomUUID().toString(), "AMQP-Controller",
List.of(new SimpleGrantedAuthority(SpRole.CONTROLLER_ROLE_ANONYMOUS)));
List.of(new SimpleGrantedAuthority(SpRole.CONTROLLER_ROLE)));
authenticationToken.setDetails(new TenantAwareAuthenticationDetails(tenant, true));
setSecurityContext(authenticationToken);
}