feat: add /api/account/** security config and MFA enforcement exemptions
Permit /settings/** SPA route, gate /api/account/** as authenticated, and exempt account MFA/profile/password paths from MFA enforcement filter.
This commit is contained in:
@@ -26,6 +26,9 @@ public class MfaEnforcementFilter extends OncePerRequestFilter {
|
||||
private static final Logger log = LoggerFactory.getLogger(MfaEnforcementFilter.class);
|
||||
private static final Set<String> EXEMPT_PREFIXES = Set.of(
|
||||
"/api/tenant/mfa/",
|
||||
"/api/account/mfa/",
|
||||
"/api/account/profile",
|
||||
"/api/account/password",
|
||||
"/api/config",
|
||||
"/api/me",
|
||||
"/api/onboarding",
|
||||
|
||||
@@ -45,10 +45,11 @@ public class SecurityConfig {
|
||||
.requestMatchers("/actuator/health").permitAll()
|
||||
.requestMatchers("/api/config").permitAll()
|
||||
.requestMatchers("/", "/index.html", "/login", "/register", "/callback",
|
||||
"/vendor/**", "/tenant/**", "/onboarding",
|
||||
"/vendor/**", "/tenant/**", "/onboarding", "/settings/**",
|
||||
"/environments/**", "/license", "/admin/**").permitAll()
|
||||
.requestMatchers("/_app/**", "/assets/**", "/favicon.ico", "/favicon.svg", "/logo.svg", "/logo-dark.svg").permitAll()
|
||||
.requestMatchers("/api/password-reset-notification").permitAll()
|
||||
.requestMatchers("/api/account/**").authenticated()
|
||||
.requestMatchers("/api/onboarding/**").authenticated()
|
||||
.requestMatchers("/api/vendor/**").hasAuthority("SCOPE_platform:admin")
|
||||
.requestMatchers("/api/tenant/**").authenticated()
|
||||
|
||||
Reference in New Issue
Block a user