liveBook · Manning

Server-side property

As explained in Secure APIs

A server-side property is a data field whose value or authority is maintained by the server rather than supplied for client control.

A server-side property is a field whose value and authority belong to the server. Payment identifiers and statuses are examples: clients may receive them, but must not control them. section 6.5

The risk appears when one data model represents both request and response payloads. Optional server-managed fields can then enter user input, allowing a client to submit values such as status: settled instead of letting the server determine payment state. section 6.5

Payment creation

Accept amount and currency in POST /payments, then return a payment containing its generated id and status. Define a MakePayment input model with only client-controlled fields, use Payment for output, and reject additional properties.

How Secure APIs covers it

How deep it goes
Explains the shared-model failure mode and shows separate schemas, but does not detail implementation or testing procedures.
Examples
Uses payment identifiers, payment statuses, POST /payments payloads, and OpenAPI schemas to demonstrate the distinction.
What you can do after
Build it from scratch with separate input and output models that reject client attempts to set server-managed properties.
How it connects
Connects server-side properties to API design, request and response payloads, data models, and input validation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secure APIs. The section links point to the parts of the book it draws on.