[Developer] #617 apply DDS MCP end-user authorization

This commit is contained in:
devmrko
2026-07-02 09:34:58 +09:00
parent fd09622c82
commit ef1331be4b
53 changed files with 2040 additions and 337 deletions

View File

@@ -1,5 +1,6 @@
package com.cloudhandson.ddsbackoffice.config;
import com.cloudhandson.vpdbackoffice.config.BackofficeProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
@@ -23,11 +24,13 @@ public class SecurityConfig {
}
return http
.csrf(csrf -> csrf.ignoringRequestMatchers("/dds/mcp/messages"))
.headers(headers -> headers.httpStrictTransportSecurity(hsts -> hsts
.includeSubDomains(true)
.maxAgeInSeconds(31_536_000)))
.authorizeHttpRequests(auth -> auth
.requestMatchers("/css/**", "/js/**", "/health", "/login").permitAll()
.requestMatchers("/css/**", "/js/**", "/health", "/login",
"/dds/mcp/sse", "/dds/mcp/messages").permitAll()
.anyRequest().authenticated())
.httpBasic(basic -> {
})