From b52a4eda67c9f9f0eb3a2da62031eace0a5650ff Mon Sep 17 00:00:00 2001 From: sdw086 Date: Tue, 10 Mar 2026 15:20:44 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=84=A4=EC=A0=95]=20SSO=20ON=20OFF=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/alist/api/config/SecurityConfig.java | 24 ++----------------- src/main/resources/application-local.yaml | 4 ---- src/main/resources/application-pjt.yaml | 6 +---- 3 files changed, 3 insertions(+), 31 deletions(-) diff --git a/src/main/java/com/alist/api/config/SecurityConfig.java b/src/main/java/com/alist/api/config/SecurityConfig.java index fea3658..247f8f2 100644 --- a/src/main/java/com/alist/api/config/SecurityConfig.java +++ b/src/main/java/com/alist/api/config/SecurityConfig.java @@ -31,9 +31,6 @@ public class SecurityConfig { @Value("${swagger.login.password}") private String swaggerLoginPassword; - @Value("${app.sso.enabled:true}") - private boolean ssoEnabled; - @Bean public JwtAuthenticationFilter jwtAuthenticationFilter(JwtTokenProvider jwtTokenProvider) { return new JwtAuthenticationFilter(jwtTokenProvider); @@ -56,25 +53,8 @@ public class SecurityConfig { public SecurityFilterChain apiFilterChain(HttpSecurity http, JwtAuthenticationFilter jwtAuthenticationFilter) throws Exception { http .cors(Customizer.withDefaults()) - .csrf(csrf -> csrf.disable()); - - if (!ssoEnabled) { - log.warn("SSO disabled mode enabled. Limited endpoints are opened for development."); - http - .authorizeHttpRequests(auth -> auth - .requestMatchers( - "/", - "/actuator/health", - "/auth/**", - "/test/**", - "/files/**" - ).permitAll() - .anyRequest().authenticated() - ); - return http.build(); - } - - http .exceptionHandling(ex -> ex + .csrf(csrf -> csrf.disable()) + .exceptionHandling(ex -> ex .authenticationEntryPoint(new JwtAuthenticationEntryPoint()) .accessDeniedHandler(new JwtAccessDeniedHandler()) ) diff --git a/src/main/resources/application-local.yaml b/src/main/resources/application-local.yaml index 30c05ff..355e3fd 100644 --- a/src/main/resources/application-local.yaml +++ b/src/main/resources/application-local.yaml @@ -37,10 +37,6 @@ cookie: domain: name: ALIST_SESSION -app: - sso: - enabled: false - swagger: login: id: alist diff --git a/src/main/resources/application-pjt.yaml b/src/main/resources/application-pjt.yaml index c558023..f231243 100644 --- a/src/main/resources/application-pjt.yaml +++ b/src/main/resources/application-pjt.yaml @@ -36,13 +36,9 @@ jwt: cookie: secure: true # 프로젝트 환경 (HTTPS) - domain: pjt.kr + domain: # pjt.kr # sso 인증시 주석해제 name: ALIST_SESSION -app: - sso: - enabled: ${SSO_ENABLED:true} - swagger: login: id: ${SWAGGER_ID}