Interview › Security & DevSecOps
What is encryption at rest versus in transit, and how do you ensure both? [Advanced]
Answer
Encryption at rest protects stored data such as disks, databases, backups, and object storage. Encryption in transit protects data moving across networks using protocols such as TLS or mTLS. A secure system needs both because data is exposed in different states.
Technical explanation
At-rest encryption usually uses KMS-managed keys, database TDE, disk encryption, backup encryption, or object-store encryption.
In-transit encryption uses TLS for client-server traffic and mTLS when both sides authenticate each other.
Key management, certificate lifecycle, and access control are as important as the encryption algorithm.
Hands-on example
Checklist: enable S3 SSE-KMS, EBS encryption by default, RDS encryption, encrypted backups, TLS-only listeners, HSTS for web apps, internal mTLS for service mesh traffic, and automated certificate rotation through cert-manager or the cloud provider.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Security & DevSecOps interview questions
- What is the difference between symmetric and asymmetric encryption? [Advanced]
- What is secrets management, and how does HashiCorp Vault work at a high level? [Intermediate]
- What is certificate management, and how do tools like cert-manager help? [Advanced]
- How do you apply least privilege to service-to-service communication (e.g., with Istio mTLS)? [Intermediate]
- What is the difference between authentication and authorization? [Advanced]
- What are Linux capabilities, and why drop them in containers? [Advanced]
- What are Kubernetes Pod Security Standards (privileged, baseline, restricted)? [Advanced]
- What is OPA, and what is the Rego language used for? [Intermediate]