liveBook · Manning

Security

As explained in Grokking Software Architecture

Security is the protection of software systems and their data from unauthorized access, misuse, disruption, or alteration.

A sturdy front door is not much help if one open window leads straight to the database. Security protects data and prevents unauthorized access, including by validating and sanitizing inputs. It is an architectural quality to design in from the start, not a final checklist. section 2.4 section 11.1

Assume an outer defense will eventually fail. Least privilege limits each user or service to the permissions it needs, reducing the damage from a compromise. Defense in depth adds layers so that one failure does not defeat the whole system. Zero trust extends this thinking by authenticating and authorizing internal requests too. section 11.2 section 11.10

An unlocked window: the Target breach

In 2013, attackers stole credentials from an HVAC vendor and entered Target’s vendor portal. Because internal systems were not properly segmented, they moved from the billing network to point-of-sale systems. Restricted vendor permissions and stronger network boundaries could have limited that path. section 11.7

Start a security boundary audit with a few concrete actions:

  • Map every entry point, including public service endpoints and any API gateway. section 11.8
  • Replace broad database administrator access with a restricted account; document the permissions and the reason for them in an architecture decision record. section 11.8
  • Find hardcoded passwords, API keys, and other secrets. Remove them from code and supply them at runtime; a secrets manager can also support credential rotation. section 11.8 section 11.5.2
CREATE USER order_processor WITH PASSWORD 'your_secure_password';
GRANT SELECT, INSERT, UPDATE ON orders TO order_processor;

The audit’s SQL example creates an order-processing user and grants specific permissions on the orders table. section 11.8

Security has tradeoffs, but not every quality can be dialed down for a deadline. A quick CSV export might temporarily sacrifice scalability, while unacceptable security risks remain off-limits—especially where security and data integrity are non-negotiable. section 2.5.1

How Grokking Software Architecture covers it

How deep it goes
Develops a breach-containment mindset into architectural controls and a step-by-step boundary audit.
Examples
Uses the Target vendor-portal breach and an Order Processor blast-radius audit to illustrate security failures and remedies.
What it assumes
Assumes familiarity with an Order Processor refactored using SOLID and separation of concerns, while introducing cloud identity basics.
What you can do after
Practice performing a boundary audit and documenting least-privilege and secret-handling decisions in an architecture decision record.
How it connects
Connects security to least privilege, defense in depth, zero trust, threat modeling, and architecture decision records.

Also explained in

Compare how 36 books explain security →

Related concepts

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