Share E-Book
Scan to open this page

Scan with your phone to open this page

AuthorDaniel Deogun, Dan Bergh Johnsson, Daniel Sawano

Secure by Design teaches you principles and best practices for writing highly secure software. At the code level, you'll discover security-promoting constructs like safe error handling, secure validation, and domain primitives. You'll also master security-centric techniques you can apply throughout your build-test-deploy pipeline, including the unique concerns of modern microservices and cloud-native designs. What's Inside • Secure-by-design concepts • Spotting hidden security problems • Secure code constructs • Assessing security by identifying common design flaws • Securing legacy and microservices architectures Readers should have some experience in designing applications in Java, C#, .NET, or a similar language. Dan Bergh Johnsson, Daniel Deogun, and Daniel Sawano are acclaimed speakers who often present at international con- ferences on topics of high-quality development, as well as security and design.

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A design-first guide to building software that resists attack by construction rather than by patching, showing how domain modeling, safe code constructs, and secure pipelines make security a natural byproduct of good design. Best for developers and architects with some application-design experience in Java, C#, or similar languages. 【Book Arc】 - **Opening (~0%–10%)**: Frames why security keeps losing to feature work and why bolt-on audits and penetration tests fail late; introduces the idea that security is a concern woven through design, not a feature to add. - **Early (~10%–30%)**: Defines what "design" means here (every active decision, from code to architecture) and introduces the traditional approach's shortcomings, then pivots to driving security through design with early examples like domain primitives and safe parsing. - **Early–Middle (~30%–50%)**: Uses the "anti-Hamlet" intermission to show how shallow modeling lets a business-integrity flaw bleed money undetected, then argues for deep domain modeling and DDD building blocks (value objects, entities, aggregates, bounded contexts) as security tools. - **Middle (~50%–70%)**: Develops strict modeling habits—asking about upper limits, resolving ambiguity with business decisions, and using a ubiquitous language—so the model itself closes off whole classes of vulnerabilities. - **Late (~70%–90%)**: Moves to concrete secure code constructs and validation, plus security-centric techniques across the build-test-deploy pipeline. (Excerpts do not cover the specific chapters in this range in detail.) - **Ending (~90%–100%)**: Addresses securing legacy and microservices/cloud-native architectures, where distributed boundaries and inherited systems complicate design-driven security. (Excerpts do not cover the closing chapters in detail.) 【Key Takeaways】 - **Security is a concern, not a feature** (Opening): Treating it as a checklist item or a separate team's job guarantees it loses priority against business functionality; the book reframes it as a cross-cutting design property. - **Design means every active decision, at all levels** (Early): From a single class to system architecture, choices that shape behavior are design choices—and therefore security choices. - **The traditional "everyone must be a security expert" approach fails** (Early): Expecting all developers to hold deep security knowledge is unrealistic; design habits are easier to sustain in daily work. - **Domain primitives enforce invariants at creation time** (Early): Extracting concepts like `Username` into their own type with validation in the constructor makes invalid states unrepresentable, rather than validating scattered across the codebase. - **Shallow modeling creates hidden business-integrity flaws** (Early–Middle): The anti-Hamlet story shows systems can be mutually consistent yet collectively wrong, letting losses persist undetected—a security problem that no technical test catches. - **Deep modeling is a security technique** (Middle): DDD building blocks (value objects, entities, aggregates, bounded contexts) make the model strict and unambiguous, closing off vulnerabilities before code is written. - **Ask about limits and resolve ambiguity as business decisions** (Middle): Questions like "can there be more than one pet?" or "what's the maximum quantity?" surface constraints that, left vague, produce either over-general models or brittle assumptions. - **A ubiquitous language reduces misunderstanding risk** (Middle): Insisting on precise domain terminology—especially between business experts and developers—prevents the gaps where security-relevant requirements get lost. 【Reading Tips】 - Deep-read the opening chapters on why design matters and the anti-Hamlet intermission; they carry the book's core argument and are the most memorable. - Skim the DDD fundamentals if you already know value objects and aggregates, but slow down on how the authors connect modeling choices to security outcomes. - Treat the code listings as illustrations of principles, not copy-paste solutions; the value is in the reasoning about invariants and validation placement. - If you work on legacy or microservices systems, jump to the later architecture chapters first, then return to the modeling chapters for the underlying rationale. - Keep OWASP-style external references handy—the book points to them for parser configuration and similar concrete hardening, rather than reproducing everything. 【Coverage Limits】 This guide is based on stratified excerpts covering roughly the first half of the book in detail; the later chapters on secure code constructs, pipeline techniques, and microservices/cloud-native security are referenced but not deeply represented, so specifics there are not summarized.
Excerpt 1
face such as injection flaws and cross-site scripting (XSS). In 2011, Daniel Deogun and Daniel Sawano joined the team, which started an era of increased indu...
View in text
Excerpt 2
ting the logic would follow the principle of high cohesion. With that insight, you can go ahead and extract the logic into its own Username class that encaps...
View in text
Excerpt 3
the end-of-year inventory a few months earlier reported a higher level of loss-on-warehouse than usual. Management’s analysis was that there was a motivation...
View in text
Excerpt 4
on, then you need to figure out what it means to swap pets. Does that mean person A gets all of the pets of person B, and vice versa? Building blocks for you...
View in text
Excerpt 5
operations, and concepts remain the same, the model holds. But as soon as the semantics change, the model breaks, and the boundary of the context is found. R...
View in text
Excerpt 6
pecial case of using an access token. There are protocols, such as OAuth, that let an authentication server generate a token that can then be used as a proof...
View in text
Excerpt 7
ored needs of your business domain. and protected properly. Sending the data to the wrong place can have a significant neg- ative business impact. If you cre...
View in text
Excerpt 8
is just an int or a completely unrestricted String is hard. The interesting part is that taint analysis can be
View in text
Tags
AI categories
SoftwareCybersecurityProgramming
ISBN: 1617294357
Publish Year: 2019
Language: English
Pages: 368
File Format: PDF
File Size: 9.1 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…