☀️
Dev7Days
  • 😄Welcome
  • Local Setup
    • ⚙️Setup Terminal
    • ⚙️Setup IDE
    • ⚙️Setup Neovim
  • Rust
    • 🦀Cargo
  • Java
    • 🍃Spring Boot
      • Spring Boot Annotaion
      • Spring Boot Learning
    • 🍃JDK vs JRE vs JVM
    • 🍃What is JDBC ?
    • 🍃What is Data Source in Java ?
    • 🍃Check vs Unchecked Exception
    • 🍃What is Servlet in Java ?
    • 🍃Filter vs Interceptor
    • 🍃Mockito
    • 🍃Maven CLI
    • 🍃Maven Archetype
  • Go
    • 🔹Go Routine and Channel
    • 🔹Go CLI
  • Ruby and Rails
    • ♦️Ruby Syntax
    • ♦️Rails Framework
    • ♦️Rails Structure
  • Fundamental
    • 📚Git Command
    • 📚Interpreter vs Compiler
    • 📚DTO vs DAO
    • 📚Http Status
    • 📚What is Batch Process ?
    • 📚Https
    • 📚Local Storage vs Session Storage vs Cookies
    • 📚Authentication & Authorization
    • 📚Database Index
    • 📚What is GRPC ?
    • 📚What is Microservice ?
  • Database
    • 🗃️What is Transaction ?
    • 🗃️ACID
  • Postgres
    • 🐘SELECT
    • 🐘Column Alias
    • 🐘Order By
    • 🐘SELECT DISTINCT
  • Elastic Search
    • 🔍What is Elastic Search ?
    • 🔍Node and Cluster
  • Kubernetes
    • ☸️What is Kubernetes ?
    • ☸️Kubernetes Architecture
      • Node
      • ETCD
      • Kube API Server
      • Controller Manager
      • Kube Scheduler
      • Kubelet
      • Kube Proxy
  • ☸️Pod
  • ☸️ReplicaSet
  • ☸️Deployment
  • ☸️Service
  • ☸️Config Map
  • ☸️Namespaces
  • ☸️Kube Apply Command
  • ☸️Scheduling
    • Manual Scheduling
    • Labels and Selectors
    • Taints and Tolerations
    • Node Selector
    • Node Affinity
    • Resource Requirements and Limits
    • DaemonSets
    • Static Pods
    • MultipleSchedulers
  • ☸️Monitoring
  • AWS
    • 🔸How can users access AWS ?
    • 🔸IAM
    • 🔸EC2
      • User Data
      • Instance Types
      • Security Group
      • Purchasing Options
      • Placement Groups
      • Elastic Network Interface (ENI)
      • EC2 Hibernate
      • EC2 Storage
    • 🔸ELB & ASG
      • Health Checks
      • Target Group
      • ELB Types
      • Sticky Sessions
      • Cross Zone Load Balancing
      • Load Balancer - SSL and SNI
      • Deregistration Delay
      • ASG
    • 🔸RDS & Aurora DB
      • RDS
        • Storage Auto Scaling
        • Read Replica
        • Multi AZ
        • RDS Custom
        • Backup
        • RDS Proxy
      • AWS Aurora
        • Read Replica
        • Endpoint and Auto Scaling
        • Aurora Serverless
        • Global Database
        • Machine Learning
        • Backup
        • Database Cloning
      • RDS & Aurora Restore options
      • RDS & Aurora Security
    • 🔸Elastic Cache
    • 🔸Route 53
      • Records
      • Hosted Zones
      • Health Check
      • Routing Policies
  • Backend Security
    • 🎩SQL Injection
    • 🎩Cross site script (XSS)
    • 🎩Cross site request forgery (CSRF)
    • 🎩Man in the Middle (MITM)
    • 🎩Insecure Direct Object Reference (IDOR)
    • 🎩Distributed denial of service (DDOS)
  • Medium
    • 👨‍💻Gamer to Coder
    • 🐳Docker
      • Docker #1
      • Docker #2
    • 💊DI and IOC
    • ☸️Kubernetes
  • Book
    • 📚System Design Interview - An Insider's Guide (Volume 1
Powered by GitBook
On this page
  1. Fundamental

Https

What is https?

PreviousWhat is Batch Process ?NextLocal Storage vs Session Storage vs Cookies

Last updated 1 year ago

In the internet we will have a communication between client and server via http protocol but http does not secure.

Every request via http protocol it's able to look into the content because it send the data with plain text format in order to avoid this vulnerability the https is occurred. For the data was sent via https protocol it will be encrypted by using TLS protocol.

What is Asymmetric key and Symmetric key?

Asymmetric key is a key pair include public key and private key. so we use public key for encrypt the data and private for decrypt.

Symmetric key is only one key that we use for encrypt and decrypt. For share this key we can use MAC algorithm to do that (It's algorithm that require IP ,Port etc. some identity data to make sure it's a key that was generated by our destination.

How does Https working ?

TCP Handshake

  1. Client create connection with server (Called TCP Handshake)

Certification Check

  1. Client send like "Hello" to server and send about (1) What are TLS version of this browser support (2) What are Cyber suite (set of encryption algorithm) of this browser support

  2. Server will check about TLS version and Type of Algorithm for encryption

  3. Server will respond to the client with Certification (include public key was generated by server (Asymmetric key) and signature was signed by CA private key) that was created by CA (Certification Authority).

  4. Client need to verify Certification on browser with CA whether this Certificate can trust or not (In browser we will have list of public key that was created by CA so we can verify this signature is valid.

Key Exchange

  1. After It pass for verification with CA then client will generate new secret key or session key (Symmetric key) and encrypt with server public key and send back to server so client and server will use this key for encrypt and decrypt.

How to setup Https to server?

  1. We created our own server and generate key pair (Asymmetric key).

  2. In CA side they will have own key pair

  3. server will create CSR (Certification sign request) and send to CA

  4. CA will verify server . If it can trust they will sign in the certification with CA private key (that can be verify the valid sign by using CA public key) and send back to server

  5. In the first time when server send the certification back to client (browser) the browser will verify this certification whether the signature is valid because in browser they will have public key of CA

In case that we don't trust the other CA then we can create own CA and new service for verify signature instead of browser

(Self sign certification)

Reference:

(Basic Level)

(Mid Level)

(Advance Level)

📚
https://www.youtube.com/watch?v=j9QmMEWmcfo
https://www.youtube.com/watch?v=T4Df5_cojAs&t=559s
https://www.youtube.com/watch?v=-f4Gbk-U758
Overview when we send request via Http protocol
Overview when we send request via Https protocol
Asymmetric key Flow
Symmetric key Flow
Https workflow
Setup Https with CA
Drawing
Drawing
Drawing
Drawing
Drawing
Drawing