묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨[보안] Wazuh+ELK(SIEM)를 활용한 위협헌팅(Threat Hunting) 시스템 구축 및 운영실습 (기초)
local_rules.xml 설정했는데 "Microsoft Office Product Spawning Windows Shell" 로만 뜹니다
<!-- Rules from https://github.com/Neo23x0/sigma/tree/master/rules/windows/sysmon @smtszk updated by @nissy34 --> <!-- Sysmon Wazuh Rules version 1.0--> <group name="local,syscheck,"> <!-- Rule for ZEROMINI_RANSOM_NOTE.txt --> <rule id="100001" level="10"> <decoded_as>json</decoded_as> <field name="syscheck.path">>/ZEROMINI_RANSOM_NOTE.txt</field> <description>ZEROMINI_RANSOM_NOTE.txt file detected.</description> </rule> <!-- Rule for .koyange extension --> <rule id="100002" level="10"> <decoded_as>json</decoded_as> <field name="syscheck.path">\.koyange$</field> <description>File with .koyange extension detected.</description> </rule> </group> <group name="sysmon,sysmon_process-anomalies,"> <rule id="300001" level="13"> <if_group>sysmon_event1</if_group> <field name="win.eventdata.Image">calc.exe</field> <description>Calc process started (possible ransomware simulation)</description> </rule> <rule id="300002" level="13"> <if_group>sysmon_event1</if_group> <field name="win.eventdata.CommandLine">vssadmin delete shadows</field> <description>Shadow copy deletion command detected (possible ransomware simulation)</description> </rule> <rule id="300003" level="13"> <if_group>sysmon_event1</if_group> <field name="win.eventdata.TargetFilename">ZEROMINI_RANSOM_NOTE.txt</field> <description>Ransom note detected (possible ransomware activity)</description> </rule> <rule id="300004" level="13"> <if_group>sysmon_event1</if_group> <field name="win.eventdata.parentImage">python.exe</field> <description>File with python extension detected (possible ransomware activity)</description> </rule> <rule id="300005" level="13"> <if_group>sysmon_event1</if_group> <field name="win.eventdata.CommandLine">ping 8.8.8.8</field> <description>Ping to 8.8.8.8 detected (possible network test or exfiltration attempt)</description> </rule> </group>이대로 추가 하고 재기동 후 정상작동 확인했는데Windows에서 실행하고 나서 wazuh에서 확인해보니 선생님처럼 "Ping to 8.8.8.8 detected"로 뜨는게 아니라 그냥 "Microsoft Office Product Spawning Windows Shell"로 뜨네요 ㅠㅠ 뭐가 문제일까요
-
해결됨2025년 CPPG 개인정보관리사 자격증 취득하기 (개정안 반영)
1분 54초 정보주체와 관련된 제3자의 '주관적 평가' 또한 개인정보가 될 수 있음에 대한 예시는 무엇인가요?
제목 그대로입니다. 개인정보의 개요 - 1분 54초정보주체와 관련된 제3자의 '주관적 평가' 또한 개인정보가 될 수 있다는 것에 대한 예문이 없어 정확이 어떤 의미인지 유추해야하는 상황인데, 검색을 해봐도 잘 나오지 않아서 여쭤봅니다.
-
해결됨롱런하는 슈퍼 개발자가 되기 위한 필수 지식, IT 인프라 기초 총정리
포워드 프록시(캐시) 서버에 대한 질문이 있습니다.
안녕하세요, 클라이언트에서 서버로 한 번 더 정보를 요청하는 경우 캐시 서버에서 데이터를 조회하여 데이터를 보여준다고 하셨는데그렇다면 클라이언트에서 처음으로 요청하는 데이터의 경우에도 캐시 서버에서 조회하는 과정을 항상 거치나요? 아니면 캐시 서버에 조회하려는 데이터가 있다는 사실을 알 수 있는 방법이 있나요?
-
해결됨2025년 CPPG 개인정보관리사 자격증 취득하기 (개정안 반영)
동의를 받는 방법 강의에서 잘못된 내용이 있는 것 같습니다.
동의를 받는 방법 강의 3분15초에서 설명하시는 행정규칙(개인정보 처리 방법에 관한 고시)에서 개정 전 내용으로 설명해주시는 것 같아서 혼란이 있을 것 같습니다.현재 제가 확인해볼 때는 아래 내용으로 확인됩니다.제4조(서면 동의 시 중요한 내용의 표시 방법) 법 제22조제2항에서 "보호위원회가 고시로 정하는 방법"이란 다음 각 호의 방법을 통해 종이 인쇄물, 컴퓨터 표시화면 등 서면 동의를 요구하는 매체의 특성과 정보주체의 이용환경 등을 고려하여 정보주체가 쉽게 알아볼 수 있도록 표시하는 방법을 말한다. 1. 글씨의 크기, 색깔, 굵기 또는 밑줄 등을 통하여 그 내용이 명확히 표시되도록 할 것 2. 동의 사항이 많아 중요한 내용이 명확히 구분되기 어려운 경우에는 중요한 내용이 쉽게 확인될 수 있도록 그 밖의 내용과 별도로 구분하여 표시할 것 강의에서는 최소 9포인트 이상으로서 다른 내용보다 20퍼센트 이상 크게하여 알아보기 쉽게 하라는 내용으로 강의를 진행하시는 것 같습니다. 개정된 내용으로 반영이 되면 학습하는데 혼선을 줄일 수 있을 것 같습니다
-
해결됨2025년 CPPG 개인정보관리사 자격증 취득하기 (개정안 반영)
강의에서 사용하시는 강의자료 제공 문의
강의에서 사용하시는 자료는 어디에서 다운로드 가능할까요?
-
해결됨롱런하는 슈퍼 개발자가 되기 위한 필수 지식, IT 인프라 기초 총정리
강의 자료 요청
안녕하세요. 수강 등록 및 결재는 했습니다.강의 자료는 어디서, 어떻게 받을 수 있을까요? 감사합니다.
-
미해결2023년 개인정보보호 법령 제개정 내용 강의
강의자료 어디에있나요?
다른 강의들 같은 경우에는, 별도 첨부파일 다운로드를 위한 강의가 있던데이건 없네요. 다른 글에서도 강의자료 관련 문의가 많은데, 정확한 답변이 없네요.
-
미해결2023년 개인정보보호 법령 제개정 내용 강의
강의자료 문의
안녕하세요, 현재 개보법 제개정 강의를 수강중입니다. 강의자료를 어디서 다운받을 수 있는지 궁금하여 문의드립니다.감사합니다.
-
미해결2023년 개인정보보호 법령 제개정 내용 강의
강의자료 공유
안녕하세요 개보법 제개정 수강한 사람입니다.강의소개란에는 자료 공유 된다고 작성이 되어있었습니다.그런데 확인해보니 자료가 없어서 문의드립니다.확인해서 자료 공유 부탁드립니다.감사합니다.
-
미해결2023년 개인정보보호 법령 제개정 내용 강의
강의 자료 공유
안녕하세요.좋은 강의 감사합니다. 강의 소개에 보면 강의자료 교안을 보내주신다고 했는데아직 못 받아서 이렇게 문의 드립니다.확인 부탁드립니다. 감사합니다.
-
미해결2023년 개인정보보호 법령 제개정 내용 강의
섹션 4. 개인정보보호법 관련 고시 제개정 강의 파일 잘못 연결되었습니다.
강사님!!섹션 4. 개인정보보호법 관련 고시 제개정 > 8. 개인정보 영향평가에 관한 고시 의강의가 잘못 올라와 있습니다. 이미 나왔던 4장 개인정보의 국외이전 강의가 잘 못나오고 있습니다.수정요청 드립니다.
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
SpringBoot 3점대 버전 Spring Security 설정
Spring Security 가 3점대 버전으로 오면서 상당한 변화가 있습니다. 강의 내용을 따라 하다보니 순환참조나, 현재는 지원하지 않는 기능이 상당수 존재하였습니다. 현재 작업한 코드가 문제 해결에 많은 도움이 되면 좋겠어서 글을 첨부합니다. SecurityConfig.class 입니다.@Configuration @EnableWebSecurity @RequiredArgsConstructor public class SecurityConfig{ private final CustomAuthenticationManager customAuthenticationManager; private final UserFindPort userFindPort; private final Environment environment; @Bean public WebSecurityCustomizer webSecurityCustomizer() { return (web) -> web.ignoring(). requestMatchers(new AntPathRequestMatcher("/h2-console/**")) .requestMatchers(new AntPathRequestMatcher( "/favicon.ico")) .requestMatchers(new AntPathRequestMatcher( "/css/**")) .requestMatchers(new AntPathRequestMatcher( "/js/**")) .requestMatchers(new AntPathRequestMatcher( "/img/**")) .requestMatchers(new AntPathRequestMatcher( "/lib/**")); } @Bean protected SecurityFilterChain filterChain(HttpSecurity http, HandlerMappingIntrospector introspector) throws Exception { http.csrf(AbstractHttpConfigurer::disable); http.authorizeHttpRequests(authorize -> authorize.requestMatchers(new MvcRequestMatcher(introspector, "/**")).permitAll() // requestMatchers(new MvcRequestMatcher.Builder(introspector).pattern(HttpMethod.GET, "/users/**")).permitAll() // .requestMatchers(new MvcRequestMatcher(introspector, "/greeting")).permitAll() // .requestMatchers(new MvcRequestMatcher(introspector, "/welcome")).permitAll() // .requestMatchers(new MvcRequestMatcher(introspector, "/health-check")).permitAll() // .requestMatchers(new MvcRequestMatcher.Builder(introspector).pattern(HttpMethod.POST, "/users")).permitAll() .anyRequest() .authenticated()) .addFilter(getAuthenticationFilter()) .httpBasic(Customizer.withDefaults()); return http.build(); } private AuthenticationFilter getAuthenticationFilter() { return new AuthenticationFilter(customAuthenticationManager, userFindPort, environment); } }requestMatcher에서 AntPathRequestMatcher, MvcRequestMatcher에 관한 설명은부족하지만 https://velog.io/@dktlsk6/Spring-Security-RequestMatcher에서 확인 가능하십니다. CustomUserDetailService.class 입니다. 순환참조 문제가 발생하여 강의와 달리 새로 CustomService를 생성하여 implements 하였습니다.@Component @RequiredArgsConstructor public class CustomUserDetailService implements UserDetailsService { private final UserFindPort userFindPort; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { UserDto userByEmail = userFindPort.findUserByEmail(username); if (userByEmail == null) { throw new UsernameNotFoundException("User Not Found"); } return new User(userByEmail.getEmail(), userByEmail.getEncPasswd(), true, true, true, true, new ArrayList<>()); } } CustomAuthenticationManager.class 입니다. AuthenticationFilter의 AuthenticationManager로 사용할 것입니다.@Component @RequiredArgsConstructor @Slf4j public class CustomAuthenticationManager implements AuthenticationManager { private final CustomUserDetailService customUserDetailService; @Bean protected PasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } @Override public Authentication authenticate(Authentication authentication) throws AuthenticationException { UserDetails userDetails = customUserDetailService.loadUserByUsername(authentication.getName()); if (!passwordEncoder().matches(authentication.getCredentials().toString(), userDetails.getPassword())) { throw new BadCredentialsException("Wrong password"); } return new UsernamePasswordAuthenticationToken(userDetails.getUsername(), userDetails.getPassword(), userDetails.getAuthorities()); } } AuthenticationFilter.class 입니다. 해당 부분은 강의와 차이점이 없습니다.@Slf4j public class AuthenticationFilter extends UsernamePasswordAuthenticationFilter { private final UserFindPort userFindPort; private final Environment environment; public AuthenticationFilter(AuthenticationManager authenticationManager, UserFindPort userFindPort, Environment environment) { super.setAuthenticationManager(authenticationManager); this.userFindPort = userFindPort; this.environment = environment; } @Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException { try { LoginRequestDto creds = new ObjectMapper().readValue(request.getInputStream(), LoginRequestDto.class); UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(creds.getEmail(), creds.getPassword(), new ArrayList<>()); return getAuthenticationManager().authenticate(token); } catch (IOException e) { throw new RuntimeException(e); } } @Override protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authResult) throws IOException, ServletException { String username = authResult.getName(); UserDto user = userFindPort.findUserByEmail(username); if (user == null) { throw new UsernameNotFoundException(username); } log.debug("user id {}", user.getUserId()); String token = Jwts.builder() .setSubject(user.getUserId()) .setExpiration(new Date(System.currentTimeMillis() + Long.parseLong(environment.getProperty("token.expiration.time")))) .signWith(SignatureAlgorithm.HS512, environment.getProperty("token.secret")) .compact(); response.addHeader("token", token); response.addHeader("userId", user.getUserId()); } } 아래는 실제 결과입니다.404가 뜨는 이유는 login 성공시 redirect url을 설정해주지 않아서 /(루트) 경로로 이동해서입니다. 해당 경로와 매핑되는 resource나 api가 없기 때문에 해당 오류가 발생한것이므로 정상작동으로 생각하시면 됩니다.아래는 잘못된 정보를 기입하여 실패 테스트 입니다. 추후 강의를 들으며 업데이트 하도록 하겠습니다.
-
미해결
JWT 에러
ECDSA signing keys must be PrivateKey instances. 이거는 대체 무슨에러죠 ? ㅠㅠ해결방법이 안나오네요 ㅠㅠ
-
미해결스프링 시큐리티
WebSecurityConfigurerAdapter confiture 메서드의 http 파라미터의 역할
안녕하세요 선생님, 강의를 복습중에 질문이 있습니다.WebSecurityConfigurerAdapter 의 configure 메서드 에서 http 파라미터로 설정 작업을 진행하는데 있어 사용자의 설정이 어떻게 filterChanigProxy 의 필터들의 목록을 바꾸는지가 궁금합니다.파라미터의 HttpSecurity 타입의 http 파라미터는 사용자가 설정 후 빈으로 등록되어있나여?또한 HttpSecurity 타입의 빈을 사용자가 설정하는데 있어 해당 빈이 어떻게 필터체인에 구성될 필터들의 요소를 바꿔주나요?감사합니다.
-
미해결스프링 시큐리티
spring mvc설정으로 인한 controller-mapping error
spring mvc방식으로 구현해보고 있는데 권한 인증인 403에러는 잘뜹니다. 하지만 controller를 통해서 들어가면 404에러가 뜹니다. 관련되서 질문드립니다.@RestControllerpublic class AdminController { @GetMapping("/admin") public String admin() { return "admin"; }} xml <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:security="http://www.springframework.org/schema/security" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd "> <security:http auto-config="true" use-expressions="false"> <security:intercept-url pattern="/**" access="ROLE_ADMIN"/> <security:form-login/> </security:http> <security:authentication-manager> <security:authentication-provider> <security:user-service> <security:user name="admin" password="{noop}1234" authorities="ROLE_ADMIN, ROLE_USER"/> <security:user name="user" password="{noop}1234" authorities="ROLE_USER"/> </security:user-service> </security:authentication-provider> </security:authentication-manager> <mvc:resources mapping="/jsp/**" location="/jsp/"></mvc:resources> <context:annotation-config/> <context:component-scan base-package="com.test"/> <mvc:annotation-driven /> <mvc:default-servlet-handler/> <bean id="viewResolver" class = "org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/jsp/" /> <property name="suffix" value=".jsp" /> </bean></beans> web.xml <?xml version="1.0" encoding="UTF-8"?><web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath:spring/context-spring.xml </param-value> </context-param> <filter> <filter-name>CharacterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>CharacterEncodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <servlet> <servlet-name>dispatcherServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:spring/context-spring.xml</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>dispatcherServlet</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> </web-app> 접속 404오류 로그 DEBUG [FilterChainProxy] - Securing GET /adminDEBUG [HttpSessionSecurityContextRepository] - Retrieved SecurityContextImpl [Authentication=UsernamePasswordAuthenticationToken [Principal=org.springframework.security.core.userdetails.User [Username=admin, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, credentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_ADMIN, ROLE_USER]], Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=0:0:0:0:0:0:0:1, SessionId=B6D437E830FDEBF274A77AF35C51A114], Granted Authorities=[ROLE_ADMIN, ROLE_USER]]]DEBUG [SecurityContextPersistenceFilter] - Set SecurityContextHolder to SecurityContextImpl [Authentication=UsernamePasswordAuthenticationToken [Principal=org.springframework.security.core.userdetails.User [Username=admin, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, credentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_ADMIN, ROLE_USER]], Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=0:0:0:0:0:0:0:1, SessionId=B6D437E830FDEBF274A77AF35C51A114], Granted Authorities=[ROLE_ADMIN, ROLE_USER]]]DEBUG [FilterSecurityInterceptor] - Authorized filter invocation [GET /admin] with attributes [ROLE_ADMIN]DEBUG [FilterChainProxy] - Secured GET /adminDEBUG [DispatcherServlet] - GET "/admin", parameters={}DEBUG [SimpleUrlHandlerMapping] - Mapped to org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler@8c32dcDEBUG [DispatcherServlet] - Completed 404 NOT_FOUNDDEBUG [SecurityContextPersistenceFilter] - Cleared SecurityContextHolder to complete request
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
동작 방식
안녕하세요 선생님! 훌륭한 강의 잘보고 있습니다. 해당 파트를 공부하는데 있어 스프링 시큐리티의 동작 방식이 궁금합니다. 1. 필터 http.authorizeRequests().antMatchers("/**") .hasIpAddress("127.0.0.1") //<--ip .and() .addFilter(getAuthenticationFilter()); 여기서 addFilter 메서드는 단순 welcome api를 요청하여도 필터가 동작하나요 아니면 로그인 할때만 필터가 동작하나요? 2. attemptAuthentication 메서드 //로그인 시도하면 가장 먼저 실행됨@Overridepublic Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException { try { //전달되어진 inputStream 을 자바 클래스 파일로 변환 RequestLogin creds = new ObjectMapper().readValue(request.getInputStream(), RequestLogin.class); //사용자가 입력한 값을 토큰으로 바꾸고 인증 처리를 하는 매니저에게 넘기면 아이디와 패스워드를 비교 //토큰 만듬 return getAuthenticationManager().authenticate( //토큰으로 변환 new UsernamePasswordAuthenticationToken( creds.getEmail(), creds.getPassword(), new ArrayList<>() ) ); } catch (IOException e) { throw new RuntimeException(e); }} 로그인 시 가장 먼저 실행되는 메서드의 반환 값이 Authentication 객체인데, 그 객체가 아래 메서드에 사용되나요? 그 이유가 loadUseByUsername 메서드의 파라미터에 값을 넣어 준적이 없는 내부적으로 파라미터를 Authentication 객체의 값을 활용하나요? @Overridepublic UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { //순서 2 UserEntity findUser = userRepository.findByEmail(username); if (findUser == null) { throw new UsernameNotFoundException(username); } //User라는 객체로 success 메서드에서 사용 --> (User)authResult.getPrincipal() return new User(findUser.getEmail(), findUser.getEncryptedPwd(), true, true, true, true, new ArrayList<>());} 로그인 시 순서: 1. attemptAuthentication 메서드 실행하여 Authentication(토큰) 객체 반환 2. loadUserByUsername 실행하여 Authentication 객체를 활용 하여 UserDetails 객체 반환 3. successfulAuthentication 실행하는데 UserDetails 객체 활용 가 맞나요..? 제가 나름 이해한대로 써봤습니다.. 로그인 시 메서드의 호출 순서를 알고싶습니다. 또한 각 메서드의 반환 값이 서로 어떻게 연관이 있는지 궁금합니다. spring security가 굉장히 어렵다고는 알고있는데.. 정리가 잘안되네요ㅜㅜ 두서 없이 쓴거같아 죄송합니다. 선생님의 강의를 보며 어제보다 나은 실력을 겸비하는거 같아 항상 감사합니다.
-
미해결스프링 시큐리티
다중 보안 설정에서도 method방식이 적용이 되나요?
실제 개발을 하다보니 USER권한별이 엔티티가 가지는 컬럼이 너무 많아서 분리를 해서 인증과 인가처리를 할려고 합니다. 아키텍쳐 강의에서 가르쳐주신것처럼 다중 보안설정을 통해 user를 위한 securityconfig와 admin, manager를 위한 securityconfig를 각각 설정해 다중 보안 설정방식으로 할 경우에도 메소드방식이 다 적용이 되나요?? 각각의 도메인에서 ROLE을 가지고 각각 ROLE_USER, ROLE_MANAGER, ROLE_ADMIN을 가지고 있습니다.
-
미해결Spring Boot JWT Tutorial
강의 완독하고 궁금증이 생겨 질문 드립니다.
안녕하세요. 먼저 좋은 강의 올려주신점에 감사인사 드립니다. 다름이 아니라 강의 시작부분에 선생님께서 jwt가 실무에서 사용되기에는 몇가지 고려할 사항들이 있다고 하셨는데 고려할 사항들이 어떤 부분들을 말하시는건지 간략하게 알 수 있을까요?
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
안녕하세요! 질문있습니다.
안녕하세요! 좋은강의 감사드립니다 :) 강의보면서 한가지 의문사항이 생겨 질문 남깁니다. 지금 현재 제 local pc에서 postman을 통해 (POST) http://localhost:8888/user-service/users 와 같이 api gateway를 통해 user-service의 users 엔트포인트를 호출하게 되면 정상적으로 유저가 생성되는데 (POST) http://localhost:[user-service-port]/users 와 같이 직접 user-service로 endpoint를 호출할 때는 403 forbidden 에러가 발생합니다. user-service의 WebSecurity 설정에서 /users 엔드포인트에 대한 접근 권한을 따로 허용하지 않았으니, 이는 당연하다고 생각됩니다. 하지만 이해가 가지않는 것은 api gateway를 통해 /user-service/users 와 같은 엔트포인트 호출을 하면 정상적인 결과를 받아 볼 수 있다는 것입니다. 일반적으로 생각해봤을때, api-gateway를 통한 (POST) /user-service/users 호출도 user-service의 security 설정에 의해 막혀야 되는 것 아닌가요?? 어쨰서 api-gateway를 경유하게되면 정상적인 응답을 받을 수 있는 것인지 궁금합니다.
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
안녕하세요! 질문있습니다.
안녕하세요! 좋은강의 감사드립니다 :) 해당 강의 12분33초경에 AuthenticationFilter에서 userId를 얻기위해 DB호출을 한번 더 하기보다는, 이전에 UserDetailsService의 loadUserByUsername 메서드에서 반환하는 User 객체를 Custom하여 userId를 AuthenticationFilter에서도 DB호출 없이 사용할 수 있도록 하는 방법이 더 적절한 방법이라는 생각이 드는데요. 혹시, AuthenticationFilter의 successfulAuthentication 메서드에서 DB 호출을 한번 더 하는 방식을 선택하신 특별한 이유가 있을까요?