Urgent.News

What's breaking now, across thousands of outlets.

Tech

Client API Key — Design (Lite) Design an API key service to service that is lightweight and accurate.

ออกแบบ API key สำหรับการเรียกกัน service to service ให้เบาและยังถูกต้อง วันหนึ่งจะมีอีกทีมมาขอเรียก service ของคุณ และคุณต้องรู้ให้ได้ว่าใครเป็นคนยิงเข้ามา ตัวเลือกที่คนส่วนใหญ่หยิบมีสองขั้ว — ยัดค่าสุ่ม uuid/hash ไว้ใน env var แล้วเทียบสตริง ซึ่งใช้ได้จริงจนถึงวันที่ key หลุด หรือลาก OAuth2 มาทั้งชุด ซึ่งซับซ้อนกว่าสิ่งที่กำลังจะปกป้องหลายเท่า โพสต์นี้คือทางกลาง TL;DR ตารางเดียว 6 คอลัมน์…

Translated from Thai Read in Thai

The article discusses designing an API key system for secure service-to-service communication. It suggests a lightweight approach using a simple table with six columns and a function with just ten lines of code. The system stores a SHA256 hash of the key, not the key itself, and includes a timestamp for revocation. The article also advises against adding a UNIQUE constraint on the consumer column to allow for key rotation. The proposed design omits features like scopes, cache, and CLI for simplicity.

Written by urgent.news from Dev.to's report — not a translation of it. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Shopify or WooCommerce? How I Chose My First E-Commerce Platform

When I first started thinking about opening an e-commerce store, my first question was simple: Shopify or WooCommerce? At first, Shopify looked like the obvious choice.

  • Shopify offers simplicity with included hosting and minimal technical concerns.
  • WooCommerce provides control over hosting, plugins, and custom integrations.
  • Decision hinges on preference for simplicity vs. control in managing an e-commerce store.

More from Saturday 29 August →