liveBook · Manning

What you will learn in Software Security for Developers

With examples in Java and Spring

by Adib Saikali, Laurențiu Spilcă

Chapter by chapter

Chapter 1: Making sense of application security

1.1 Developers’ responsibility in software security · 1.1.1 What does secure development actually look like? · 1.1.2 How security expectations shape the developer’s role · 1.2 Securing the supply chain risk · 1.3 Roles and responsibilities in security · 1.4 What you will learn in this book · 1.5 Summary

What you learn in chapter 1 →

Chapter 2: Standards for implementing authentication

2.1 Logging users in · 2.1.1 Customer authentication · 2.1.2 Employee authentication · 2.1.3 Partner authentication · 2.1.4 Phishing-resistant authentication · 2.1.5 Authentication technology from a developer’s perspective · 2.1.6 Exercises · 2.2 Securing application credentials · 2.2.1 Exercises · 2.3 Exercise answers · 2.4 Summary

What you learn in chapter 2 →

Chapter 3: Service-to-service communication

3.1 Securing the service-to-service call chain · 3.1.1 Propagating user identity through the service call chain · 3.1.2 Determining service identity · 3.1.3 Exercises · 3.2 Securely running services on Kubernetes · 3.2.1 Exercises · 3.3 Security technologies every developer should know · 3.3.1 Exercises · 3.4 Exercise answers · 3.5 Summary

What you learn in chapter 3 →

Chapter 4: Message integrity and authentication

4.1 The goals of cryptography · 4.2 Cryptographic hash functions · 4.2.1 Secure Hash Algorithm · 4.2.2 Verifying integrity using a cryptographic hash function · 4.2.3 Design for hash function change · 4.2.4 Exercises · 4.3 Java Cryptography Architecture and Java Cryptology Extensions · 4.4 Implementing message integrity in Java · 4.5 Message authentication code · 4.5.1 Hashed message authentication code · 4.5.2 Java support for HMAC · 4.5.3 Exercises · 4.6 Guaranteeing authenticity using HMAC · 4.7 Exercise answers · 4.8 Summary

What you learn in chapter 4 →

Chapter 5: Advanced Encryption Standard

5.1 AES overview · 5.2 Modes of operation · 5.2.1 CBC mode · 5.2.2 Authenticated encryption · 5.2.3 GCM · 5.2.4 Exercises · 5.3 Java support for AES · 5.3.1 The ACME scenario · 5.3.2 Implementing the ACME scenario · 5.4 Authenticated Encryption with Associated Data · 5.4.1 Exercises · 5.5 AES best practices · 5.5.1 Selecting the AES key size · 5.5.2 Checklist for using AES-GCM correctly in Java · 5.5.3 Exercises · 5.6 Exercise answers · 5.7 Summary

What you learn in chapter 5 →

Chapter 6: Public key encryption and digital signatures: Unleashing RSA

6.1 The secret-key distribution problem · 6.1.1 Exercises · 6.2 Public key cryptosystems · 6.2.1 Exercises · 6.3 RSA public key cryptosystem · 6.3.1 Configuring RSA · 6.3.2 Hybrid encryption · 6.3.3 Signing data with RSA · 6.3.4 Exercises · 6.4 Java support for RSA · 6.5 Exercise answers · 6.6 Summary

What you learn in chapter 6 →

Chapter 7: Public key encryption and digital signatures: Using ECC

7.1 Elliptic-curve public key cryptosystems · 7.1.1 Configuring ECC · 7.1.2 Diffie-Helman key agreement · 7.1.3 Exercises · 7.2 Java support for elliptic curves · 7.2.1 Java support for encryption with elliptic curves · 7.2.2 Java support for signing with elliptic curves · 7.3 RSA vs. ECC · 7.3.1 Exercises · 7.4 Exercise answers · 7.5 Summary

What you learn in chapter 7 →

Chapter 8: Public key infrastructure and X.509 digital certificates: Know who you’re talking to

8.1 Inspecting X.509 digital certificates · 8.1.1 Inspecting X.509 certificates with OpenSSL · 8.1.2 Downloading a website’s X.509 digital certificate using the OpenSSL CLI · 8.1.3 Viewing the fields of an X.509 digital certificate · 8.1.4 Subject field: Identifying the public key and its owner · 8.1.5 Issuer field: Identifies who created the certificate · 8.1.6 Validity fields · 8.1.7 X.509 digital certificate encoding formats · 8.1.8 Exercises · 8.2 Verifying X.509 digital certificates · 8.2.1 Verifying the github.com X.509 certificate · 8.2.2 Exercises · 8.3 Exercise answers · 8.4 Summary

What you learn in chapter 8 →

Chapter 9: Working with X.509 certificates: Life cycle and self-signing

9.1 Certificate life cycle: Issuance to revocation · 9.1.1 Creating a key pair · 9.1.2 Creating a CSR · 9.1.3 CSR validation · 9.1.4 Certificate issuance · 9.1.5 Certificate revocation · 9.1.6 Exercises · 9.2 Private CA for local development · 9.2.1 Creating a self-signed root certificate · 9.2.2 Installing the CA in the operating system’s trust store · 9.2.3 Issuing a certificate using the personal CA · 9.2.4 Exercises · 9.3 Exercise answers · 9.4 Summary

What you learn in chapter 9 →

Chapter 10: Transport Layer Security: How the internet is secured

10.1 Securing communication with TLS · 10.1.1 How TLS started · 10.1.2 TLS and mTLS · 10.1.3 Exercises · 10.2 What TLS protects you against · 10.2.1 Protection from eavesdropping · 10.2.2 Making sure that no tampering occurred · 10.2.3 Mitigating impersonation · 10.2.4 Exercises · 10.3 TLS in practice · 10.3.1 Exercises · 10.4 Exercise answers · 10.5 Summary

What you learn in chapter 10 →

Chapter 11: JSON Object Signing and Encryption

11.1 The standards layer cake · 11.2 The problem solved by JWA · 11.2.1 Exercises · 11.3 JWK · 11.3.1 Exercises · 11.4 JWS · 11.4.1 JWS structure · 11.4.2 Creating and verifying a JWS object · 11.4.3 The credit-card refund scenario with JWS · 11.4.4 Exercises · 11.5 JWE · 11.5.1 JWE structure · 11.5.2 Creating and verifying JWE objects · 11.5.3 Exercises · 11.6 JWT · 11.6.1 Exercises · 11.7 Exercise answers · 11.8 Summary

What you learn in chapter 11 →

Chapter 12: Single-sign on using OAuth2 and OpenID Connect

12.1 Splitting security data-management responsibilities · 12.1.1 Exercises · 12.2 Using authentication flows · 12.2.1 The authorization code grant type · 12.2.2 What are the tokens? · 12.2.3 The client credentials grant type · 12.2.4 Exercises · 12.3 Applying OIDC to ACME · 12.4 Exercise answers · 12.5 Summary

What you learn in chapter 12 →

Chapter 13: Deepening security with OpenID Connect

13.1 Augmenting the authorization code flow with PKCE · 13.1.1 Exercises · 13.2 Using refresh tokens to simplify authentication · 13.2.1 Exercises · 13.3 Supporting identity management with OIDC · 13.3.1 The identity layer and ID token · 13.3.2 The UserInfo endpoint · 13.3.3 Protection against replay and CSRF attacks · 13.3.4 Session management and logout · 13.3.5 Exercises · 13.4 Using multitenancy · 13.4.1 Exercises · 13.5 Exercise answers · 13.6 Summary

What you learn in chapter 13 →

Chapter 14: Passwordless login: Using magic links and one-time passwords

14.1 The real magic of magic-links authentication · 14.1.1 Exercises · 14.2 Authentication through OTPs · 14.2.1 Exercises · 14.3 Exercise answers · 14.4 Summary

What you learn in chapter 14 →

Chapter 15: Passwordless login: WebAuthn and hardware authentication

15.1 Biometric authentication · 15.1.1 Fingerprint scanning (most common) · 15.1.2 Facial recognition (rapidly growing) · 15.1.3 Iris or retina scanning (highly secure) · 15.1.4 Voice recognition (moderately secure) · 15.1.5 Palm-vein recognition (high security, less common) · 15.1.6 Exercises · 15.2 Authenticating using hardware keys · 15.2.1 Exercises · 15.3 Implementing WebAuthn authentication · 15.3.1 Exercises · 15.4 Exercise answers · 15.5 Summary

What you learn in chapter 15 →

Chapter 16: Implementing service identity

16.1 What service identity is · 16.1.1 Exercises · 16.2 Implementing service authorization at the application level · 16.2.1 Using the OAuth2 client credentials grant type · 16.2.2 Using API keys · 16.2.3 Using custom authorization logic · 16.2.4 Exercises · 16.3 Implementing service authorization at the infrastructure level · 16.3.1 Exercises · 16.4 Exercise answers · 16.5 Summary

What you learn in chapter 16 →

Chapter 17: Taming authorization: RBAC, ABAC, and ReBAC

17.1 Core authorization models · 17.1.1 RBAC · 17.1.2 ABAC · 17.1.3 ReBAC · 17.1.4 Exercises · 17.2 Authorization in real-world architectures · 17.2.1 Authorization within monoliths · 17.2.2 Service-oriented authorization · 17.2.3 Exercises · 17.3 Exercise answers · 17.4 Summary

What you learn in chapter 17 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.