<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/batch-endpoints-need-per-item-authorization-9himp8elw" -->

---
title: Batch endpoints need per-item authorization | daily.dev
description: Batch or bulk API endpoints that authorize once at the request level create a classic broken object-level authorization vulnerability: if a caller is validated...
canonical: https://daily.dev/posts/batch-endpoints-need-per-item-authorization-9himp8elw
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Batch endpoints need per-item authorization | daily.dev
og:description: Batch or bulk API endpoints that authorize once at the request level create a classic broken object-level authorization vulnerability: if a caller is validated...
og:url: https://daily.dev/posts/batch-endpoints-need-per-item-authorization-9himp8elw
og:image: https://api.daily.dev/og/posts/9Himp8elw.png
og:image:alt: Batch endpoints need per-item authorization
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch endpoints need per-item authorization

**[Auth By Example](https://daily.dev/sources/7eadcwhmohx0bchehapmt)** · [@authbyexample](https://daily.dev/authbyexample) · 1 min read · 0 upvotes · 0 comments

## Summary

Batch or bulk API endpoints that authorize once at the request level create a classic broken object-level authorization vulnerability: if a caller is validated to hit the endpoint but individual items in the list aren't checked, one legitimate id can smuggle unauthorized ones along with it. This pattern is increasingly common in agent tool calls and MCP-style bulk operations, where a gateway validates the session but never runs per-object checks on what the model packs into the list. The fix is to authorize each item inside the loop (actor, object, action) and return per-item allow/deny results. The piece points to Permit's MCP permissions model as one way to centralize these object-level checks instead of reimplementing them in every handler.

## Content

A batch or bulk API that authorizes once for the whole request is a classic leak.

You check that the caller can hit `/items/bulk`, then loop over `ids` and mutate everything in the list. One authorized id next to a sibling the caller should never touch — and the sibling rides along.

Authorize each item inside the loop: actor + object + action. Return per-item allow/deny (or omit denied items) so a single good id cannot smuggle the rest.

This shows up constantly with agent tool calls and MCP-style bulk ops: the model packs a list, the gateway validates the session once, and object-level checks never run. Same pattern as “I can read this row, so I can read every row in the batch.”

If you want those per-object checks in one place instead of reimplemented in every handler, teams often centralize them with something like Permit’s MCP permissions model — see https://docs.permit.io/ai-security/mcp-permissions/?utm_source=dailydev&utm_medium=social&utm_campaign=batch-endpoint-needs-per-item-authz&utm_content=authbyexample — then call `allowed` per resource before the write.

Rule of thumb: request-level auth gets you in the door; object-level auth decides which doors you open.

## Similar posts on daily.dev

- [Agents Turn Broken Auth Into a Breach at Machine Speed](https://daily.dev/posts/agents-turn-broken-auth-into-a-breach-at-machine-speed-ew6xjsbnf) · API Evangelist · 0 upvotes · 0 comments
- [Why MCP security is about permissions overhaul](https://daily.dev/posts/why-mcp-security-is-about-permissions-overhaul-7n53q6loo) · The New Stack · 0 upvotes · 0 comments
- [Everyone Knows About Broken Authorization – So Why Does It Still Work for Attackers?](https://daily.dev/posts/everyone-knows-about-broken-authorization-so-why-does-it-still-work-for-attackers--exddy4tnt) · Security Boulevard · 1 upvotes · 0 comments
- [Understanding MCP Authorization](https://daily.dev/posts/understanding-mcp-authorization-mp2ofxlrx) · portkey · 120 upvotes · 0 comments
- [Designing safer listItems and getItem permissions](https://daily.dev/posts/designing-safer-listitems-and-getitem-permissions-knn0orlvr) · Advanced Web Machinery · 81 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#mcp](https://daily.dev/tags/mcp), [#authorization](https://daily.dev/tags/authorization)

[View this post on daily.dev](https://daily.dev/posts/batch-endpoints-need-per-item-authorization-9himp8elw)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/batch-endpoints-need-per-item-authorization-9himp8elw","headline":"Batch endpoints need per-item authorization","text":"Batch or bulk API endpoints that authorize once at the request level create a classic broken object-level authorization vulnerability: if a caller is validated to hit the endpoint but individual items in the list aren't checked, one legitimate id can smuggle unauthorized ones along with it. This pattern is increasingly common in agent tool calls and MCP-style bulk operations, where a gateway validates the session but never runs per-object checks on what the model packs into the list. The fix is to authorize each item inside the loop (actor, object, action) and return per-item allow/deny results. The piece points to Permit's MCP permissions model as one way to centralize these object-level checks instead of reimplementing them in every handler.","url":"https://daily.dev/posts/batch-endpoints-need-per-item-authorization-9himp8elw","datePublished":"2026-09-28T12:26:21.577Z","dateModified":"2026-09-28T12:26:42.550Z","author":{"@type":"Person","name":"Auth By Example","url":"https://daily.dev/authbyexample","image":"https://media.daily.dev/image/upload/s--Fgz7IgGQ--/f_auto/v1789653205/avatars/avatar_7EADCwHmOHX0bChEhAPmt?_a=BAMAMicg0","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":60}},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/7eadcwhmohx0bchehapmt","name":"Auth By Example"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Auth By Example","item":"https://daily.dev/sources/7eadcwhmohx0bchehapmt"},{"@type":"ListItem","position":3,"name":"Batch endpoints need per-item authorization"}]}
```

