Searching...
English
English
Español
简体中文
Français
Deutsch
日本語
Português
Italiano
한국어
Русский
Nederlands
العربية
Polski
हिन्दी
Tiếng Việt
Svenska
Ελληνικά
Türkçe
ไทย
Čeština
Română
Magyar
Українська
Bahasa Indonesia
Dansk
Suomi
Български
עברית
Norsk
Hrvatski
Català
Slovenčina
Lietuvių
Slovenščina
Српски
Eesti
Latviešu
فارسی
മലയാളം
தமிழ்
اردو
Building Secure and Reliable Systems

Building Secure and Reliable Systems

Best Practices for Designing, Implementing, and Maintaining Systems
by Heather Adkins 2020 555 pages
Technology
Engineering
Technical
Listen
9 minutes

Key Takeaways

1. Frameworks enforce security and reliability across applications

Frameworks enable code reuse: rather than accounting for all of the security and reliability aspects affecting a given functionality or feature, developers only need to customize a specific building block.

Standardized protection. Frameworks provide a consistent approach to addressing common security and reliability concerns across multiple applications. By centralizing critical functions like authentication, authorization, and error handling, frameworks reduce the likelihood of vulnerabilities arising from inconsistent implementations. This approach allows domain experts to design and develop secure building blocks, benefiting all teams using the framework.

Increased productivity. Using frameworks leads to higher productivity for developers, as they can focus on business logic rather than reinventing security and reliability features. Frameworks often come with built-in tools for monitoring, logging, and performance optimization, further streamlining development processes. This standardization also makes it easier to reason about code security and reliability, as common patterns are consistently applied across projects.

2. Simplicity in code design enhances security and maintainability

Avoid YAGNI code leads to improved reliability, and simpler code leads to fewer security bugs, fewer opportunities to make mistakes, and less developer time spent maintaining unused code.

Reducing complexity. Simpler code is easier to understand, review, and maintain. By following principles like YAGNI (You Aren't Gonna Need It) and avoiding over-engineering, developers can create more robust and secure systems. Simpler code has fewer potential points of failure and is less likely to contain hidden vulnerabilities.

Improving maintainability. Regular refactoring and addressing technical debt are crucial for maintaining code simplicity over time. This ongoing process helps prevent the accumulation of complex, hard-to-understand code that can lead to security and reliability issues. Tools like linters and code health metrics can help teams identify areas for improvement and maintain high code quality standards.

3. Strong typing and sanitization prevent common vulnerabilities

Using strong types protects your code from errors of this type that a compiler doesn't capture.

Type safety. Strong typing helps catch errors at compile-time rather than runtime, preventing many common vulnerabilities before they reach production. By using specific types for different contexts (e.g., SafeHtml for HTML content, SafeUrl for URLs), developers can enforce security properties by design. This approach makes it much harder to introduce vulnerabilities like SQL injection or cross-site scripting (XSS).

Input validation. Proper input sanitization is crucial for preventing security vulnerabilities. By using dedicated libraries and frameworks for handling user input, developers can ensure that all data is properly validated and sanitized before being used in sensitive operations. This includes:

  • Escaping special characters in user-generated content
  • Validating and sanitizing URLs and file paths
  • Enforcing strict type checking for all inputs

4. Unit testing verifies individual components' behavior

Unit tests typically run locally as part of engineering workflows to provide fast feedback to developers before they submit changes to the codebase.

Granular verification. Unit tests focus on verifying the behavior of individual software components in isolation. This approach allows developers to catch bugs early in the development process and ensures that each component functions correctly before integration. Effective unit testing practices include:

  • Writing tests alongside or before the actual code (Test-Driven Development)
  • Covering both normal and edge cases
  • Using mocks and stubs to isolate dependencies

Continuous feedback. By integrating unit tests into the development workflow, teams can catch regressions and unintended side effects quickly. This continuous feedback loop helps maintain code quality and prevents the introduction of new bugs. Automated CI/CD pipelines can run unit tests on every code change, providing immediate feedback to developers.

5. Integration testing evaluates system-wide interactions

Integration testing moves beyond individual units and abstractions, replacing fake or stubbed-out implementations of abstractions like databases or network services with real implementations.

System-level verification. Integration tests evaluate how different components of a system work together, uncovering issues that may not be apparent when testing units in isolation. These tests help ensure that the system functions correctly as a whole, including interactions with external dependencies like databases and APIs. Key considerations for integration testing include:

  • Setting up realistic test environments
  • Managing test data securely
  • Handling asynchronous operations and timing issues

Balancing coverage and speed. While integration tests provide valuable insights into system behavior, they are typically slower and more resource-intensive than unit tests. Teams need to find the right balance between comprehensive integration testing and maintaining fast feedback loops. Strategies like selective integration testing based on risk assessment can help optimize test coverage without sacrificing development velocity.

6. Dynamic analysis tools detect runtime errors and vulnerabilities

Dynamic program analysis analyzes software by running programs, potentially in virtualized or emulated environments, for purposes beyond just testing.

Runtime error detection. Dynamic analysis tools like sanitizers can detect various runtime errors and vulnerabilities that may not be apparent through static analysis or regular testing. These tools instrument the code during compilation to add runtime checks for issues such as:

  • Memory leaks and buffer overflows
  • Use-after-free errors
  • Data races and deadlocks
  • Undefined behavior

Performance considerations. While dynamic analysis tools provide valuable insights, they can significantly impact performance. Teams often run these tools as part of nightly builds or dedicated testing pipelines to balance the need for thorough analysis with development speed. The insights gained from dynamic analysis can help teams prioritize bug fixes and improve overall code quality.

7. Fuzz testing uncovers edge cases and unexpected inputs

Fuzzing can be useful for testing service resilience.

Automated input generation. Fuzz testing involves generating large numbers of random or semi-random inputs to uncover bugs and vulnerabilities. This technique is particularly effective at finding edge cases and unexpected behaviors that manual testing might miss. Fuzz testing can help identify:

  • Memory corruption issues
  • Input validation flaws
  • Denial-of-service vulnerabilities
  • Parsing errors in file formats or network protocols

Continuous fuzzing. Integrating fuzz testing into continuous integration pipelines allows teams to constantly probe their systems for new vulnerabilities. As the codebase evolves, fuzzing can uncover regressions or new issues introduced by changes. Tools like libFuzzer and AFL (American Fuzzy Lop) make it easier to implement fuzz testing for various types of software.

8. Continuous validation ensures ongoing system resilience

Carefully designed test suites can evaluate the correctness of different pieces of software that perform the same task.

Proactive resilience. Continuous validation goes beyond traditional testing by constantly exercising the system under various conditions. This approach helps ensure that the system remains resilient to failures and attacks over time. Continuous validation techniques include:

  • Chaos engineering experiments
  • Regular disaster recovery drills
  • Automated security scanning and penetration testing
  • Performance stress testing under realistic load conditions

Evolving threat models. As systems grow and evolve, new vulnerabilities and failure modes may emerge. Continuous validation helps teams stay ahead of these challenges by regularly reassessing their systems' resilience. This process should include updating threat models, revising test scenarios, and incorporating lessons learned from real-world incidents and near-misses.

Last updated:

Review Summary

3.9 out of 5
Average of 100+ ratings from Goodreads and Amazon.

Building Secure and Reliable Systems receives mixed reviews, with an average rating of 3.90 out of 5. Readers appreciate its comprehensive coverage of security and reliability principles, particularly for large organizations. Many find it valuable for training and as a reference guide. However, some criticize its structure, verbosity, and occasional lack of clarity. The book is praised for integrating security and reliability concepts but is also noted for being Google-centric. While some chapters are considered too theoretical or detailed, others are highly practical. Overall, it's recommended for security professionals and SREs.

About the Author

Heather Adkins is an accomplished professional in the field of cybersecurity and information technology. As an author, she has contributed significantly to the literature on secure and reliable systems, drawing from her extensive experience in the industry. Adkins is known for her work at Google, where she has played a crucial role in developing and implementing security practices. Her expertise extends to areas such as risk management, incident response, and security engineering. Through her writing, Adkins aims to share best practices and insights gained from working in large-scale tech environments, helping other organizations improve their security and reliability postures.

0:00
-0:00
1x
Create a free account to unlock:
Bookmarks – save your favorite books
History – revisit books later
Ratings – rate books & see your ratings
Listening – audio summariesListen to the first takeaway of every book for free, upgrade to Pro for unlimited listening.
Unlock unlimited listening
Your first week's on us
Today: Get Instant Access
Listen to full summaries of 73,530 books. That's 12,000+ hours of audio!
Day 5: Trial Reminder
We'll send you a notification that your trial is ending soon.
Day 7: Your subscription begins
You'll be charged on Sep 26,
cancel anytime before.
What our users say
“...I can 10x the number of books I can read...”
“...exceptionally accurate, engaging, and beautifully presented...”
“...better than any amazon review when I'm making a book-buying decision...”
Compare Features
Free Pro
Read full text summaries
Listen to full summaries
Unlimited Bookmarks
Unlimited History
Benefits
Get Ahead in Your Career
People who read at least 7 business books per year earn 2.3 times more on average than those who only read one book per year.
Unlock Knowledge Faster (or Read any book in 10 hours minutes)
How would your life change if we gave you the superpower to read 10 books per month?
Access 12,000+ hours of audio
Access almost unlimited content—if you listen to 1 hour daily, it’ll take you 33 years to listen to all of it.
Priority 24/7 AI-powered and human support
If you have any questions or issues, our AI can resolve 90% of the issues, and we respond in 2 hours during office hours: Mon-Fri 9 AM - 9 PM PT.
New features and books every week
We are a fast-paced company and continuously add more books and features on a weekly basis.
Fun Fact
2.8x
Pro users consume 2.8x more books than free users.
Interesting Stats
Reduced Stress: Reading for just 6 minutes can reduce stress levels by 68%
Reading can boost emotional development and career prospects by 50% to 100%
Vocabulary Expansion: Reading for 20 minutes a day are exposed to about 1.8 million words per year
Improved Cognitive Function: Reading can help reduce mental decline in old age by up to 32%.
Better Sleep: 50% of people who read before bed report better sleep.
Can I switch plans later?
Yes, you can easily switch between plans.
Is it easy to cancel?
Yes, it's just a couple of clicks. Simply go to Manage Subscription in the upper-right menu.
Save 62%
Yearly
$119.88 $44.99/yr
$3.75/mo
Monthly
$9.99/mo
Try Free & Unlock
7 days free, then $44.99/year. Cancel anytime.