{"slug":"api-security","group":"security","title":"API security","short":"Object-level authorization, rate limits, input validation, CORS and safe tokens.","icon":"lock-keyhole","aliases":["API security","OWASP API Security","rate limiting","BOLA","CORS"],"order":952,"status":"available","articleCount":4,"groupTitle":"Cybersecurity","intro":"","servedLang":"en","primaryArticle":{"id":"6b09a4b1ff996234422a266a","slug":"api-security","title":"API security in practice – OWASP API Security Top 10, BOLA, JWT, mass assignment, rate limiting and webhook signatures (NestJS, Express)","summary":"The pierogi shop's API serves a mobile app, an in-store kiosk and a courier company's webhooks. We go through the OWASP API Security Top 10 (2023 edition) with working code – object and function level authorization in NestJS, JWT verification with jose, protection against mass assignment, rate limits, signed webhooks with replay protection, safe consumption of third-party APIs and secrets that never reach the logs.","servedLang":"en","availableLangs":["pl","en"],"topics":["api-security","authentication","nestjs","express"],"techs":["node","typescript"],"tags":["owasp-api-security-top-10","bola","bfla","mass-assignment","jwt","jose","rate-limiting","webhooks","hmac","nestjs","express","zod","pino"],"level":"intermediate","kind":"tutorial","access":"members","status":"published","cover":null,"author":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","community":false},"readingMinutes":18,"stats":{"views":1,"likes":0,"bookmarks":0,"comments":0},"publishedAt":"2026-11-27T15:41:37.635Z","updatedAt":"2026-11-27T17:30:43.313Z","challengeCount":0,"quizCount":0},"articles":[{"id":"6b09a4b7ff996234422a26ce","slug":"owasp-top-10-in-practice","title":"OWASP Top 10:2025 in practice – vulnerable and fixed code in Node.js, Express and React (with live XSS examples)","summary":"We walk through the current OWASP Top 10:2025 using the pierogi shop's online store – for every category a real bug in Node.js/Express or React and its fix. IDOR and SSRF (now in A01), misconfiguration, the supply chain, cryptography, SQL and NoSQL injection with a runnable demo, XSS in two interactive playgrounds, insecure design, authentication, integrity (SRI), security event logging and fail-closed exception handling.","servedLang":"en","availableLangs":["pl","en"],"topics":["web-security","api-security","react","express"],"techs":["node","typescript","javascript"],"tags":["owasp-top-10","owasp-2025","xss","sql-injection","nosql-injection","ssrf","idor","broken-access-control","supply-chain","dompurify","sri","react","express"],"level":"intermediate","kind":"tutorial","access":"public","status":"published","cover":null,"author":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","community":false},"readingMinutes":19,"stats":{"views":0,"likes":0,"bookmarks":0,"comments":0},"publishedAt":"2026-11-27T15:41:43.532Z","updatedAt":"2026-11-27T15:41:43.579Z","relation":{"position":1,"primary":false,"mainTopic":{"slug":"web-security","title":"Web application security"}}},{"id":"6b09aa805a5e2dbc3f20a48f","slug":"nestjs-auth-rbac","title":"Authorization in NestJS 12 – guards, roles and permissions with CASL, JWT with refresh, and multi-tenancy","summary":"Authentication says who you are; authorization says what you may do with this particular resource. We build an API for a SaaS platform serving dumpling-restaurant chains: a global JWT guard, roles turned into CASL rules with conditions (location, courier, status) and field permissions, route policies, instant permission revocation after a role change, refresh token rotation and tenant isolation – with real HTTP responses.","servedLang":"en","availableLangs":["pl","en"],"topics":["nestjs","authentication","api-security"],"techs":["node","typescript"],"tags":["nestjs-12","authorization","rbac","abac","casl","jwt","refresh-token-rotation","multi-tenant","row-level-security","bola","guards"],"level":"advanced","kind":"tutorial","access":"members","status":"published","cover":null,"author":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","community":false},"readingMinutes":20,"stats":{"views":2,"likes":0,"bookmarks":0,"comments":0},"publishedAt":"2026-11-27T16:06:24.765Z","updatedAt":"2026-11-27T17:28:37.681Z","relation":{"position":2,"primary":false,"mainTopic":{"slug":"nestjs","title":"NestJS"}}},{"id":"6b09ab659843bccb708a3ca3","slug":"hld-complete-example","title":"A complete HLD by example: the VoltGo charging network – document, diagrams, ADRs and tools","summary":"A full, realistic High-Level Design document walked through section by section on the VoltGo electric-vehicle charging platform: a driver app, 4,000 chargers over OCPP, reservations, ad hoc payments through a payment service provider and a network operations dashboard. NFRs in numbers, C4 Context and Container, three sequence diagrams, a deployment diagram, a weighted options matrix, ADR excerpts and a risk register – plus a downloadable HLD template and the complete example document, and a tour of the tools: Structurizr, Mermaid, PlantUML, draw.io, Excalidraw, IcePanel, arc42, ADRs, OpenAPI/AsyncAPI, Threat Dragon and cloud cost calculators.","servedLang":"en","availableLangs":["pl","en"],"topics":["solution-architecture","event-driven-architecture","modular-monolith","api-security"],"techs":["general","typescript"],"tags":["solution-architect","hld","c4-model","architecture-documentation","adr","structurizr","arc42","ev-charging","ocpp","threat-modeling"],"level":"intermediate","kind":"tutorial","access":"members","status":"published","cover":null,"author":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","community":false},"readingMinutes":49,"stats":{"views":3,"likes":0,"bookmarks":0,"comments":0},"publishedAt":"2026-11-27T16:10:13.676Z","updatedAt":"2026-11-27T17:23:40.621Z","relation":{"position":3,"primary":false,"mainTopic":{"slug":"solution-architecture","title":"Solution Architect – role and craft"}}}],"challenges":[],"resources":[{"id":"6b0857bf3c96f2d34d0b42f3","type":"article","provider":"web","url":"https://learn.microsoft.com/en-us/azure/architecture/patterns/rate-limiting-pattern","embedUrl":null,"title":"Rate Limiting Pattern","description":"Control the rate at which your application sends requests to a service so that you stay within the service's throttling limits and overall capacity.","author":"Microsoft Azure Architecture Center","thumbnailUrl":"https://learn.microsoft.com/en-us/media/open-graph-image.png","durationSec":null,"lang":"en","topics":[],"techs":["general"],"tags":["azure","cloud"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":57,"verifiedAt":"2026-11-26T11:07:59.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:02.417Z","updatedAt":"2026-11-26T16:01:02.417Z"},{"id":"6b0857c83c96f2d34d0b49f5","type":"video","provider":"youtube","url":"https://www.youtube.com/watch?v=PGreK-A0C6Y","embedUrl":"https://www.youtube-nocookie.com/embed/PGreK-A0C6Y","title":"Good API Design leads to better Rate Limiting","description":"Rate Limiting to protect your API and system from being degraded when clients make too many requests. But why are they making too many requests? Look at your API design because it might be causing your clients to make unnecessary requests. Rate Limiting is still needed but likely configured…","author":"CodeOpinion","thumbnailUrl":"https://i.ytimg.com/vi/PGreK-A0C6Y/hqdefault.jpg","durationSec":null,"lang":"en","topics":["event-sourcing"],"techs":["dotnet"],"tags":["api-design","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"youtube-rss","publishedAt":"2024-08-28T13:31:42.000Z","popularity":59,"verifiedAt":"2026-11-26T10:53:40.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:10.095Z","updatedAt":"2026-11-26T16:01:10.095Z"},{"id":"6b0857b53c96f2d34d0b3896","type":"article","provider":"web","url":"https://stripe.com/blog/rate-limiters","embedUrl":null,"title":"Scaling your API with rate limiters","description":"Online payment processing for internet businesses. Stripe is a suite of payment APIs that powers commerce for businesses of all sizes.","author":"stripe.com","thumbnailUrl":null,"durationSec":null,"lang":"en","topics":[],"techs":["general"],"tags":["hacker-news"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"hn","publishedAt":"2017-03-30T16:58:10.000Z","popularity":73,"verifiedAt":"2026-11-26T11:19:34.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:52.228Z","updatedAt":"2026-11-26T16:00:52.228Z"},{"id":"6b0857c73c96f2d34d0b491e","type":"video","provider":"youtube","url":"https://www.youtube.com/watch?v=u_5JppAExDs","embedUrl":"https://www.youtube-nocookie.com/embed/u_5JppAExDs","title":"Top 10 Rest API Design Pitfalls by Victor Rentea @ Spring I/O 2025","description":"Spring I/O 2025 - 22-23 May, Barcelona An entertaining review of the most common mistakes in designing an API, from the most outrageous goofs to the most dangerous “innocent” shortcuts. You’ll see examples of: Breaking Changes, Domain Model Leak, Sensitive Data Exposure, Performance Issues…","author":"Spring I/O","thumbnailUrl":"https://i.ytimg.com/vi/u_5JppAExDs/hqdefault.jpg","durationSec":null,"lang":"en","topics":["cqrs"],"techs":["java"],"tags":["api-design","performance","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"youtube-rss","publishedAt":"2025-09-03T21:03:59.000Z","popularity":66,"verifiedAt":"2026-11-26T10:56:51.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:10.095Z","updatedAt":"2026-11-26T16:01:10.095Z"},{"id":"6b0857bc3c96f2d34d0b4057","type":"podcast","provider":"apple-podcasts","url":"https://podcasts.apple.com/us/podcast/microservices-security-in-action-with-prabath/id1478997569?i=1000673444208","embedUrl":"https://embed.podcasts.apple.com/us/podcast/id1478997569?i=1000673444208","title":"Microservices Security in Action with Prabath Siriwardena - .NET 201","description":"Microservice architecture is very popular today. The panel talks with microservice security authors about their book and all aspects of securing microservices. Links Microservices Security in Action: Design secure network and API endpoint security for Microservices applications, with examples…","author":"Adventures in .NET","thumbnailUrl":"https://is1-ssl.mzstatic.com/image/thumb/Podcasts211/v4/6a/4e/3b/6a4e3bdb-bbf1-8601-a403-086ce24cb18f/mza_1088513295079016608.jpg/600x600bb.jpg","durationSec":3194,"lang":"en","topics":["microservices"],"techs":["dotnet","java"],"tags":["podcast","kubernetes","security","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"itunes","publishedAt":"2024-10-15T10:00:00.000Z","popularity":44,"verifiedAt":"2026-11-26T11:07:22.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:59.965Z","updatedAt":"2026-11-26T16:00:59.965Z"}],"resourceGroups":[{"type":"video","items":[{"id":"6b0857c83c96f2d34d0b49f5","type":"video","provider":"youtube","url":"https://www.youtube.com/watch?v=PGreK-A0C6Y","embedUrl":"https://www.youtube-nocookie.com/embed/PGreK-A0C6Y","title":"Good API Design leads to better Rate Limiting","description":"Rate Limiting to protect your API and system from being degraded when clients make too many requests. But why are they making too many requests? Look at your API design because it might be causing your clients to make unnecessary requests. Rate Limiting is still needed but likely configured…","author":"CodeOpinion","thumbnailUrl":"https://i.ytimg.com/vi/PGreK-A0C6Y/hqdefault.jpg","durationSec":null,"lang":"en","topics":["event-sourcing"],"techs":["dotnet"],"tags":["api-design","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"youtube-rss","publishedAt":"2024-08-28T13:31:42.000Z","popularity":59,"verifiedAt":"2026-11-26T10:53:40.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:10.095Z","updatedAt":"2026-11-26T16:01:10.095Z"},{"id":"6b0857c73c96f2d34d0b491e","type":"video","provider":"youtube","url":"https://www.youtube.com/watch?v=u_5JppAExDs","embedUrl":"https://www.youtube-nocookie.com/embed/u_5JppAExDs","title":"Top 10 Rest API Design Pitfalls by Victor Rentea @ Spring I/O 2025","description":"Spring I/O 2025 - 22-23 May, Barcelona An entertaining review of the most common mistakes in designing an API, from the most outrageous goofs to the most dangerous “innocent” shortcuts. You’ll see examples of: Breaking Changes, Domain Model Leak, Sensitive Data Exposure, Performance Issues…","author":"Spring I/O","thumbnailUrl":"https://i.ytimg.com/vi/u_5JppAExDs/hqdefault.jpg","durationSec":null,"lang":"en","topics":["cqrs"],"techs":["java"],"tags":["api-design","performance","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"youtube-rss","publishedAt":"2025-09-03T21:03:59.000Z","popularity":66,"verifiedAt":"2026-11-26T10:56:51.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:10.095Z","updatedAt":"2026-11-26T16:01:10.095Z"}]},{"type":"podcast","items":[{"id":"6b0857bc3c96f2d34d0b4057","type":"podcast","provider":"apple-podcasts","url":"https://podcasts.apple.com/us/podcast/microservices-security-in-action-with-prabath/id1478997569?i=1000673444208","embedUrl":"https://embed.podcasts.apple.com/us/podcast/id1478997569?i=1000673444208","title":"Microservices Security in Action with Prabath Siriwardena - .NET 201","description":"Microservice architecture is very popular today. The panel talks with microservice security authors about their book and all aspects of securing microservices. Links Microservices Security in Action: Design secure network and API endpoint security for Microservices applications, with examples…","author":"Adventures in .NET","thumbnailUrl":"https://is1-ssl.mzstatic.com/image/thumb/Podcasts211/v4/6a/4e/3b/6a4e3bdb-bbf1-8601-a403-086ce24cb18f/mza_1088513295079016608.jpg/600x600bb.jpg","durationSec":3194,"lang":"en","topics":["microservices"],"techs":["dotnet","java"],"tags":["podcast","kubernetes","security","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"itunes","publishedAt":"2024-10-15T10:00:00.000Z","popularity":44,"verifiedAt":"2026-11-26T11:07:22.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:59.965Z","updatedAt":"2026-11-26T16:00:59.965Z"}]},{"type":"article","items":[{"id":"6b0857bf3c96f2d34d0b42f3","type":"article","provider":"web","url":"https://learn.microsoft.com/en-us/azure/architecture/patterns/rate-limiting-pattern","embedUrl":null,"title":"Rate Limiting Pattern","description":"Control the rate at which your application sends requests to a service so that you stay within the service's throttling limits and overall capacity.","author":"Microsoft Azure Architecture Center","thumbnailUrl":"https://learn.microsoft.com/en-us/media/open-graph-image.png","durationSec":null,"lang":"en","topics":[],"techs":["general"],"tags":["azure","cloud"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":57,"verifiedAt":"2026-11-26T11:07:59.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:02.417Z","updatedAt":"2026-11-26T16:01:02.417Z"},{"id":"6b0857b53c96f2d34d0b3896","type":"article","provider":"web","url":"https://stripe.com/blog/rate-limiters","embedUrl":null,"title":"Scaling your API with rate limiters","description":"Online payment processing for internet businesses. Stripe is a suite of payment APIs that powers commerce for businesses of all sizes.","author":"stripe.com","thumbnailUrl":null,"durationSec":null,"lang":"en","topics":[],"techs":["general"],"tags":["hacker-news"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"hn","publishedAt":"2017-03-30T16:58:10.000Z","popularity":73,"verifiedAt":"2026-11-26T11:19:34.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:52.228Z","updatedAt":"2026-11-26T16:00:52.228Z"}]}],"siblings":[{"slug":"web-security","title":"Web application security","icon":"shield-alert","status":"available","current":false},{"slug":"api-security","title":"API security","icon":"lock-keyhole","status":"available","current":true},{"slug":"secrets-management","title":"Secrets management","icon":"vault","status":"available","current":false},{"slug":"secure-sdlc","title":"DevSecOps & secure SDLC","icon":"shield-ellipsis","status":"available","current":false}]}