graphql security 고려사항들
1. https redirection
- http url 로 들어온 요청을 https 로 redirection
2. resource exhastion prevention
- 쿼리를 처리하는 비용으로 인한 자원 고갈 문제
- 몇가지 기준을 설정하여, 쿼리를 필터링
- 기준의 예시
- complexity
- depth
- amount of objects
3. disable introspection
4. masking error
- 에러 내용이 response 로 전달되어 서버의 취약점이 노출되지 않도록 한다.
프로젝트에 적용한 보안들
- helmet middleware 로 기본적인 보안 설정
- 비교적 적용이 단순한, 쿼리를 depth 와 amount 를 기준으로 차단하는 로직 적용