liveBook · Manning

Data at rest

As explained in AI-Powered Developer: Build software with ChatGPT and Copilot

Data at rest is data stored on persistent or nonvolatile media rather than actively moving across a network.

Data at rest is information stored on persistent or nonvolatile media rather than actively transmitted. Without protection, unauthorized parties may read or alter it, causing theft, corruption, legal exposure, and reputational damage. section 8.4 section 8.4.1

Protecting stored data requires more than encrypting a database:

  • Encrypt sensitive values before storing them, then decrypt them only for authorized use. section 8.4.2
  • Combine encryption with access controls, secure backups, audits, user education, key rotation, and input validation. section 8.4.1

Encrypting a value before database storage

A Python application can use the cryptography library's Fernet implementation to generate a key, encrypt plaintext into ciphertext, store the ciphertext as a database BLOB, and decrypt it after retrieval. A SQLite3 example demonstrates this flow, while production systems should use dedicated ORM support and secure key management.

How AI-Powered Developer: Build software with ChatGPT and Copilot covers it

How deep it goes
Explains risks, demonstrates Python and SQLite3 encryption, and stops short of prescribing a complete production architecture.
Examples
Uses a Fernet Python snippet, a SQLite3 database workflow, and the Ashley Madison breach as concrete examples.
What you can do after
Apply it via Python's cryptography library to encrypt sensitive values before storing them in SQLite3.
How it connects
Connects encryption with data in transit, access controls, secure backups, key management, hashing, and public-key encryption.

Also explained in

Compare how 3 books explain data at rest →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI-Powered Developer: Build software with ChatGPT and Copilot. The section links point to the parts of the book it draws on.