Remove SYSTEM_ADMIN (#2936)

Not needed. Overlaping with system role. Could be added on top of others if needed

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2026-02-25 14:00:25 +02:00
committed by GitHub
parent ea9519deae
commit 56da119979
11 changed files with 14 additions and 54 deletions

View File

@@ -111,10 +111,8 @@ public class MgmtSecurityConfiguration {
@Autowired(required = false) @Qualifier("hawkbitHttpSecurityCustomizer") final Customizer<HttpSecurity> httpSecurityCustomizer,
final SystemManagement systemManagement) throws Exception {
http
.securityMatcher(MgmtRestConstants.REST + "/**", "/system/admin/**")
.securityMatcher(MgmtRestConstants.REST + "/**")
.authorizeHttpRequests(amrmRegistry -> amrmRegistry
.requestMatchers("/system/admin/**")
.hasAnyAuthority(SpPermission.SYSTEM_ADMIN)
.anyRequest()
.authenticated())
.anonymous(AbstractHttpConfigurer::disable)