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}