Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Adib Saikali, Laurențiu Spilcă

Cloud applications have special security requirements and concerns. This book demonstrates effective real-world practices to keep your cloud and Kubernetes-deployed applications safe and sound. In Software Security for Developers you will learn how to: Configure industry standard security protocols correctly Quickly debug errors and exceptions form security libraries Utilize the developer-friendly Google Tink cryptography library Work with X.509 digital certificates for implementing application security Setup passwordless logins using the WebAuthentication protocol Implement single sign on using OpenID Connect protocol Establish authentication and authorization services using the Spring Authorization Server Make use of popular secret storage solutions including HashiCorp Vault, AWS KMS, Google KMS, and Azure Key Vault Use the security features of Kubernetes to secure deployed applications Securely containerize application code Software Security for Developers is a hands-on guide for working developers. It minimizes the abstract and complex security theory, instead focusing on the practices you need to secure applications running on Kubernetes and the cloud. In it, you’ll learn how to take advantage of pre-built security services in your daily development. Author Adib Saikali takes a developer-to-developer approach, sharing hard-won lessons from many years securing software in real-world environments. Easy-to-follow sample applications written in Java take you hands-on with security standards and protocols, turning complex concepts into practical solutions. about the reader For intermediate Java developers ready to up their security skills.

AI Reading Assistant

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

AI guide
【One-Line Pitch】 A hands-on security field guide for intermediate Java developers who need to ship cloud and Kubernetes applications that survive audits, dependency attacks, and misconfigured cryptography. If you already write Spring code but freeze when someone says "TLS," "JOSE," or "key rotation," this book is aimed at you. 【Book Arc】 - **Opening (~0%–10%)**: Frames security as a supply-chain and organizational problem, not just a coding bug. Introduces the cast—corporate InfoSec, auditors, platform engineers—and the core technologies (TLS, AES, hashing) every developer is expected to know. - **Early (~10%–35%)**: Builds cryptographic fundamentals from the ground up: hash functions and their limits against active tampering, JCA providers, and the Java libraries (Spring Boot, Nimbus, Google Tink) used throughout the samples. - **Middle (~35%–55%)**: Moves into symmetric encryption in practice—AES modes of operation, why ECB must never be used, IV reuse failures, AEAD/GCM for tamper detection, and the ordering of compression versus encryption. - **Late (~55%–80%)**: Shifts to standards and protocols: the JOSE layer cake (JWA, JWK, JWS, JWE), X.509 certificates, TLS configuration, and the authentication/authorization protocols (WebAuthn, OpenID Connect, Spring Authorization Server). - **Ending (~80%–100%)**: Applies everything to deployment: secret storage with HashiCorp Vault and cloud KMS offerings, secure container images, and hardened Kubernetes deployment manifests. 【Key Takeaways】 - **Security is a supply-chain discipline, not a code-only concern** (Opening): Vulnerabilities enter through dependencies and suppliers, so scanners must run on every commit and re-scan when vulnerability databases update—not just once before release. - **Cryptographic hashes detect accidents, not attackers** (Early): SHA-256 checksums catch network and disk corruption, but an attacker who edits both the file and its hash file defeats verification; active tampering needs signatures or MACs. - **Never use AES in ECB mode** (Middle): Deterministic block encryption leaks repeating plaintext patterns, letting attackers manipulate ciphertext (e.g., swapping in a valid "200 OK" block) without ever cracking the key. - **IV reuse is catastrophic** (Middle): Every AES encryption call should generate a fresh random IV via a cryptographically secure generator like `java.security.SecureRandom`; reusing a key/IV pair can expose plaintext or keys. - **AEAD protects data at rest, not just in transit** (Middle): GCM mode binds ciphertext to context (transaction ID, amount, date), so a malicious DBA or buggy code cannot silently swap encrypted values between database rows. - **Compress before you encrypt** (Middle): Compression exploits repetition, while encryption deliberately destroys it—reversing the order yields poor compression ratios. - **Start with default JCA providers, optimize later** (Early): OpenJDK's portable implementations are the sane baseline; swap in Amazon ACCP or Google Conscrypt only when measured cost savings justify the added deployment complexity. - **Know the JOSE layer cake** (Late): JWA names algorithms, JWK represents keys, JWS protects integrity, and JWE adds confidentiality—understanding this stack is prerequisite to debugging real-world token and signature errors. 【Reading Tips】 - **Deep-read the crypto chapters (Early–Middle)**: The AES mode and IV discussions are where copy-paste from the internet most often goes wrong; treat the "never use ECB" warning as the book's central practical lesson. - **Skim the organizational framing (Opening)**: The InfoSec/auditor context is useful for passing reviews, but the technical payoff starts once TLS and AES enter the picture. - **Run the sample applications**: The book is explicitly built around Java GitHub samples using Spring Boot, Nimbus, and Tink; reading code passively will not teach you to debug security library exceptions. - **Use the JOSE chapter as a reference**: Keep the JWA/JWK/JWS/JWE distinctions handy when working with OpenID Connect or Spring Authorization Server later. - **Treat Kubernetes and container chapters as checklists**: They are best consumed alongside your own deployment manifests rather than read abstractly. 【Coverage Limits】 The excerpts cover the book's framing, cryptography fundamentals, AES practice, and the start of JOSE, but do not detail the later chapters on X.509, WebAuthn, OpenID Connect, secret storage, or Kubernetes manifests beyond their stated scope. This guide therefore reflects the cryptographic core more fully than the deployment half.
Page 8
at security vulnerabilities are primarily a software issue. However, hardware security vulnerabilities have been common in recent years. Specter and Meltdown...
View in text
Excerpt 2
ctices for creating secure container images and follow them. Also, learn the best practices for writing secure Kubernetes deployment manifests and follow the...
View in text
Excerpt 3
les.readString(refundsFile)); } catch (IOException e) { throw new RuntimeException(e); } } } By computing the SHA-256 hash of the refunds.json file and compa...
View in text
Excerpt 4
, or should we encrypt the data first and then compress it? Compression algorithms work by replacing frequently repeating patterns of data with shorter patte...
View in text
Excerpt 5
y used with excellent support in many programming languages. However, it has come in some criticism due to unnecessary complexity in the standard that make i...
View in text
Excerpt 6
rve and modify data exchanged over the encrypted connection. Before using a public key to setup an encrypted communication channel, a client needs a way to d...
View in text
Excerpt 7
cation. When TLS is used, self-signed certificates are used. Still, self-signed certificates generate many errors when they are consumed, which leads to more...
View in text
Excerpt 8
lue. curl --location 'http://localhost:9000/oauth2/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Basic b2lkY...
View in text
Tags
AI categories
CybersecurityJavaCloud Native
Publish Year: 2025
Language: English
Pages: 433
File Format: PDF
File Size: 19.6 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…