Database Security
Database security protects stored data from unauthorized access, modification, and exfiltration. It covers authentication, authorization, encryption at rest and in transit, auditing, injection prevention, and the principle of least privilege applied to database accounts and roles.
itDatabases and data storage | OpenSkills.info
Intro
Database Security
Database security keeps data confidential, correct, and available to authorized work. It also makes actions traceable when you need to investigate a mistake or attack.
The database is only one part of that job. Data moves through applications, drivers, networks, database processes, storage, logs, backups, and administrator tools. A weakness at any boundary can undermine controls elsewhere.
This course gives you a practical way to reason about those boundaries. You will learn to reduce exposure, separate identities, limit privileges, prevent injection, protect data, and preserve useful evidence.
Start with data and paths
Begin with the data, not a product setting.
Identify what the database holds. Classify the harm from unauthorized disclosure, modification, deletion, or loss of access. Include replicas, exports, logs, temporary files, snapshots, and backups.
Then map every path to that data:
- application and service connections;
- administrator and support access;
- replication and backup channels;
- monitoring, analytics, and export jobs;
- database management interfaces;
- storage and key-management systems.
Each path creates a trust boundary. Record who or what crosses it, how identity is checked, what access follows, and what evidence remains.
Use layers with different jobs
Database security works as a set of independent controls.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://cheatsheetseries.owasp.org/cheatsheets/Database_Security_Cheat_Sheet.html
Supports
- Database network isolation and restricted management access
- Encrypted database connections and server-certificate verification
- Secure authentication, credential storage, granular permissions, and hardening
- Low-privilege service accounts, security updates, protected backups, and relational database scope
- https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html
Supports
- SQL injection as unsafe mixing of untrusted input and query structure
- Prepared statements with bound parameters as the primary defense
- Allow-list mapping for identifiers and sort direction when binding is unavailable
- Dynamic SQL risk in stored procedures and least privilege as damage reduction
- https://cheatsheetseries.owasp.org/cheatsheets/NoSQL_Security_Cheat_Sheet.html
Supports
- NoSQL injection through unsafe query objects or query strings
- Risks from exposed management interfaces, weak access control, secrets, logs, and backups
- Server-side construction of safe driver query objects and validation of permitted fields and operators
- https://nvlpubs.nist.gov/nistpubs/specialpublications/NIST.SP.800-53r5.pdf
Supports
- Least privilege, separation of duties, privilege review, and logging of privileged functions
- Audit-record fields, storage capacity, failure response, search, time stamps, protection, and separate repositories
- Cryptographic protection for transmission confidentiality and integrity
- Protection of information at rest, including selected cryptographic mechanisms and secure offline storage
- Controlled key management, system backup, recovery, and configuration controls
- https://www.postgresql.org/docs/current/client-authentication.html
Supports
- Authentication as establishment of client identity
- Restriction of which database users can connect
- Relationship between client authentication and role-based privileges
- https://www.postgresql.org/docs/current/user-manag.html
Supports
- PostgreSQL roles as users or groups
- Role ownership, privileges, and membership
- Role management as PostgreSQL authorization mechanics
- https://www.postgresql.org/docs/current/ddl-rowsecurity.html
Supports
- Per-user row restrictions for read and modification operations
- Policy scope, role interaction, owner and bypass behavior, and execution context
- Need to test both permitted and denied behavior
