목록CS (7)
develog
당장 HTTPS를 적용하는 것이 급한 사람들에게는 적절치 않은 글이다. 적용만을 원한다면 이 글을 읽으면 된다. HTTPS를 적용하는 방식은 매우 다양하다. 어떤 것들이 있을지 간단하게 먼저 정리하면 다음과 같다. AWS 로드밸런서, AWS ACM 사용 AWS 로드밸런서, AWS ACM, Nginx 사용 Let's Encrypt, Nginx 사용 Let's Encrypt, Nodejs 사용 등등 이 외에도 굉장히 다양하다. 각각의 도구들은 각자 하는 역할이 분명하게 다르며, 그 역할을 위해 어떤 도구를 사용할지는 쓰는 사람의 자유다. 선택한 도구에 따라서 다양한 조합이 생길 수 있다. 인터넷의 대부분 글에는 처음부터 끝까지 정형화된 방식으로 HTTPS를 적용하는 것을 다룬 글이 다수다. 이..
HTTPS는 HTTP의 보안 취약점을 개선한 프로토콜이다. 일반적인 HTTP 통신 방식에서 SSL/TSL이 추가된 개념이다. SSL/TSL은 통신하는 데이터를 암호화하기 위한 프로토콜이다. 무슨 소리인지 하나도 모르겠다. 천천히 글을 따라서 읽어보면 완벽하게 이해할 수 있을 것이다. HTTP의 보안 취약점 HTTP가 어떤 보안적으로 취약했을까. 크게 세가지를 말할 수 있다. 암호화하지 않은(평문) 통신 암호화되지 않은 데이터를 주고 받기 때문에, 누군가 통신 중간에서 데이터를 가로챈다면 너무 위험했다. 아래 그림에서 위처럼 암호화되지 않은 비밀번호를 가로챈다면, 바로 내 비밀번호가 들키게 되고, 마음이 너무 아플 것이다. 하지만 암호화를 거쳐 통신하게 되면, 뺏겨도 안심이다! 어차피 암호화된 데이터를 읽..
HTTP의 메서드들에 대해서 알아보자. HTTP 메서드는 HTTP 동사라고도 불리며, REST한 API에서 어느걸 하고자 하는지를 담당하고 있다. GET URI가 가진 정보를 얻기 위해, 서버측에 URI에 해당하는 리소스를 달라고 요청하는데 사용한다. 보통의 경우, 요청에 특정 조건을 넣기 위해서 Path 파라미터나 Query 파라미터를 이용한다. GET api/user?age=30이런식으로 사용한다는 뜻이다. 하지만, 너무 조건이 복잡해지고 길어지게될 때, Body에 정보를 담아 보내고 싶은 욕구가 생길수도 있다. GET에 Body를 넣어도 될까? 해도 될까..? RFC 문서를 참고해보자. "The GET method means retrieve whatever information (in the for..
이전 글에서 빈약했던 내용을 보충하고자 한다. HTTP에 왜 이렇게 집착하는지 궁금할 수 있다. 프론트엔드 개발자더라도, 웹의 근본인 HTTP의 굴레에서 벗어날 수 없을 뿐더러, HTTP에 대해 잘 알고 있으면 웹 성능 최적화에도 도움이 될 수 있다. 조금만 더 공부하면 HTTP를 손바닥 안에 두고 쉽게 가지고 놀 수 있다. 이번엔 순차적으로 짚어보고자 한다. 내용이 많이 길수도 있다. 하지만 이 문서만 다 이해하면 HTTP에 대해서는 빠삭해질 수 있도록 글을 구성해 보았다. 아직 HTTP 간단하게 설명한 글을 이해하지 못했다면, 추후에 읽는 것을 추천한다. HTTP/0.9 0.9란 버전은 사실 나중에 지어진 것이고, 처음 나왔을 땐 그냥 나왔다. 이 때엔 상태코드나 Header 같은건 전혀 없고 단순히..
"HTTP는 Stateless인 프로토콜이다." 이런 이야기를 많이 들어봤을 것이다. 그렇다면, Stateful은 무엇이며, Stateless는 무엇일지 알아보자. 먼저 어떤 느낌으로 다른지 대화 형식으로 살펴보자. Stateful 대화는 아래와 같다. 고객 : 혹시 지금 아이패드 살 수 있나요? 애플 : 네, 살 수 있습니다. 고객 : 얼마에 살 수 있나요? 애플 : 100만원에 살 수 있습니다. Stateless 대화는 아래와 같다. 고객 : 혹시 지금 아이패드 살 수 있나요? 애플 : 네, 살 수 있습니다. 고객 : 얼마에 살 수 있나요? 애플 : 무엇을 사려고 하시나요? 차이를 금방 알 수 있을 것이다. Stateful 프로토콜 Client의 세션의 상태를 포함한 세션 정보를 server에 저장하..
HTTP를 알아보기 전에 먼저 알아야할 개념부터 살펴보자. 프로토콜과 TCP에 대해서 모른다면 아래 글을 먼저 읽는 것을 추천한다. 프로토콜과 TCP 간단하게 알아보기 HTTP HTTP 는 Hyper Text Transfer Protocol 의 줄임말이다. Server와 Client간의 데이터 통신을 위한 프로토콜이다. HTTP의 특징은 아래와 같다. 애플리케이션 레벨의 프로토콜로 TCP/IP 위에서 작동한다. 상태를 가지고 있지 않은 Stateless 프로토콜이다. 디폴트 포트는 80포트이다. Method, Path, Version, Headers, Body로 이루어져있다. 클라이언트-서버 구조이다. 비연결성(connectionless) -> 현재는 지속 연결 단순함, 확장 가능 HTTP는 암호화가 되..
Protocol (프로토콜) 프로토콜의 정의는 다음과 같다. 프로토콜은 컴퓨터 내부에서, 또는 컴퓨터 사이에서 데이터의 교환 방식을 정의하는 규칙 체계 결론적으로, 데이터를 교환하기 위해서 세상 사람들끼리 정한 규칙이라고 생각하면 된다. 프로토콜 = 규약(규칙) 이라고 생각하고 이 글을 읽으면 더 이해하기 쉬울 것이다. TCP (Transmission Control Protocol) TCP는 프로토콜 중 하나이다. 우리가 가장 흔하게 접하는 HTTP, HTTPS가 이 방식을 사용하고 있다. 전송 제어 규약이라는 것인데, 말이 어렵지만 결국 데이터를 어떻게 보낼지 정해 놓은 많은 규칙들 중 하나라는 것이다. 그럼 TCP의 규칙은 무엇일까? 우선 컴퓨터끼리 대화하기 위해서, 애네만의 대답하는 규칙을 미리 서..