Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Cloud security services and secure cloud software

An exam-focused guide to cloud security services and secure cloud software covering core concepts (CIA triad, authentication, encryption), common cloud security services (IAM, KMS, WAF, CASB, SIEM), secure software practices (SSDLC, threat modeling), worked examples (TLS handshake, IAM policy, STRID

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Cloud systems run many applications and store critical data for companies. Engineers use cloud security services and secure cloud software techniques to protect data, control who can access services, and reduce the chance of breaches that cause financial and reputational damage.

Key ideas

Start from first principles. Define before use.

  • Confidentiality — the property that information is not made available or disclosed to unauthorized actors. Use when deciding encryption and access controls.
  • Integrity — the property that information is complete and unaltered from its original state. Use when checking file or message tampering.
  • Availability — the property that authorized users can access information and services when needed. Use when planning redundancy and DDoS protection.

Together these three form the CIA triad (Confidentiality, Integrity, Availability), the basic security goals.

  • Shared responsibility model — clarify what the cloud provider secures (of the cloud) versus what you secure (in the cloud). Responsibilities vary by IaaS/PaaS/SaaS; state them in designs.

  • Threat model — a structured description of threats, attackers, their goals, capabilities, and the assets to protect. Define attacker capabilities (network access, cloud console access) before designing protections.

  • Attack surface — the sum of points where an attacker could try to enter or extract data. Reducing attack surface (close unused ports, remove dev accounts) lowers exposure.

  • Least privilege — give each user or process only the permissions they need. This limits damage when credentials are compromised.

  • Defense in depth — layered security controls so that a single control failing does not lead to full compromise.

Core cloud services and definitions (define then use):

  • Identity and Access Management (IAM) — system that creates and manages identities (users, groups, roles) and enforces authorization (decisions about what an identity may do). Use IAM to manage console/API access and resource permissions. Policies support least privilege using role-based and attribute-based access controls (RBAC and ABAC via conditions on tags, time, IP, etc.).
  • Authentication — the process of proving an identity (examples: passwords, one-time codes). Define Multi-Factor Authentication (MFA) as requiring two or more distinct authentication factors (something you know, have, or are).
  • Key Management Service (KMS) — managed service to create, store, rotate and control cryptographic keys used for encryption in the cloud.
  • Secrets management (e.g., Secrets Manager, Vault) — securely store, access, and rotate application secrets (database passwords, API keys); never hard-code secrets.
  • Hardware Security Module (HSM) — a physical appliance (or managed HSM) that stores keys and performs cryptographic operations in tamper-resistant hardware.
  • Server-Side Encryption (SSE) — server (cloud provider) performs encryption of stored data. Specify encryption-at-rest and encryption-in-transit separately. Keys may be provider-managed or customer-managed; always state key ownership and control (e.g., via KMS/HSM).
  • End-to-End Encryption (E2EE) — encryption performed by client and decrypted only by final client, not by intermediate servers (provider cannot read plaintext).
  • Web Application Firewall (WAF) — a filter that blocks malicious web traffic (common rules: SQL injection, XSS) at the application layer.
  • Network security controls (e.g., security groups, network ACLs, firewall rules) — enforce least-privilege ingress/egress at instance/subnet/perimeter layers; default deny and open only required ports/protocols.
  • Cloud Access Security Broker (CASB) — a policy enforcement point between cloud service users and cloud applications; provides visibility, compliance, threat protection and data security.
  • Data Loss Prevention (DLP) — set of processes and tools that detect and prevent data exfiltration or accidental sharing of sensitive data.
  • Security Information and Event Management (SIEM) — collects logs/events from systems, normalizes, correlates and alerts about suspicious activity.
  • Intrusion Detection/Prevention System (IDS/IPS) — IDS detects suspicious network/host activity; IPS can block it.

Cryptographic building blocks (define first):

  • Symmetric encryption — same secret key for encryption and decryption. Use for bulk data encryption.
  • Asymmetric encryption (public-key) — uses a key pair: public key to encrypt or verify, private key to decrypt or sign.
  • Hash function — deterministic function that maps data to a fixed-size digest; used for integrity checks. Unkeyed hashes do not provide authenticity; use MACs or digital signatures to detect tampering by attackers.
  • Message Authentication Code (MAC) — keyed hash to provide integrity and authenticity for messages.
  • Digital signature — a value computed with a private key that proves the sender and integrity; anyone with the public key can verify.

Secure software process terms:

  • Secure Software Development Lifecycle (SSDLC) — integrate security tasks into every phase: requirements, design (threat model), implementation (secure coding), testing (static/dynamic analysis), deployment (secure config), and maintenance (patching, monitoring).
  • Static Application Security Testing (SAST) — analysis of source code without executing it to find vulnerabilities.
  • Dynamic Application Security Testing (DAST) — testing the running application (black-box) to find issues.

Diagrams to draw in exams (describe exactly):

  1. TLS handshake diagram: For TLS 1.2 with ECDHE, draw two boxes labelled Client (left) and Server (right). Show arrows with labels: ClientHello (supported ciphers, client random), ServerHello (chosen cipher, server random), Certificate (server cert), ServerKeyExchange (ECDHE params), ClientKeyExchange (client ECDHE public), ChangeCipherSpec, Finished. Label where the pre-master (ECDH shared secret) is combined with client/server randoms via PRF to form the master secret and then session keys. For TLS 1.3, show: ClientHello (with KeyShare), ServerHello (with KeyShare), EncryptedExtensions, Certificate, CertificateVerify, Finished; note that there is no ServerKeyExchange/ClientKeyExchange, keys are derived with HKDF using transcript hashes, and ChangeCipherSpec is not used for key change.

  2. IAM role flow: draw User -> AssumeRole API call -> Temporary credentials returned -> Use creds to access resource. Label policy attached to role and resource policy.

  3. STRIDE threat model table: a small table with columns Asset, Threat (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege), Likelihood, Mitigation.

Assumptions to state when answering design problems: trust boundary locations (clients, provider management plane), which party controls keys, regulatory requirements (e.g., data residency), expected attacker capabilities.

Formulas

E_k(M) = C — Symmetric encryption: encrypt message M with key k to get ciphertext C. Applies when using block or stream ciphers. Symbols: M = plaintext (bytes), k = symmetric key, C = ciphertext.

D_k(C) = M — Symmetric decryption (same k). Symbols as above.

Enc_pk(M) = C — Asymmetric encryption using public key pk.

Dec_sk(C) = M — Asymmetric decryption using private key sk.

H(M) = h — Hash function producing digest h. Symbols: M message, h fixed-size digest.

MAC_k(M) = t — Message Authentication Code using key k gives tag t.

Sign_sk(M) = S and Verify_pk(M, S) -> {true,false} — Digital signature and verification. Symbols: sk = signing (private) key, pk = verification (public) key.

Note: for programming or cloud policies, remember these syntaxes to produce least-privilege role in JSON (example style):

{ "Effect": "Allow", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::bucket-name/*" } — IAM policy statement format (example style; provider-specific).

Worked examples

Example 1 — TLS 1.2 (short model answer): Show a secure TLS 1.2 handshake with ephemeral keys. (TLS 1.3 differences noted below.) Steps:

  1. Client sends ClientHello with supported cipher suites and random nonce.
  2. Server replies ServerHello choosing ECDHE + AES-GCM and sends its certificate (contains public key pk_server).
  3. Server sends ServerKeyExchange with ECDHE parameters (server ephemeral public value) if using ephemeral key exchange.
  4. Client verifies certificate (trust chain, validity, hostname). If valid, client sends ClientKeyExchange: its ECDHE ephemeral public value.
  5. Both compute shared secret Z = ECDH(client_eph_priv, server_eph_pub) and derive session keys using key derivation function with nonces.
  6. Client sends ChangeCipherSpec and Finished; server verifies and responds with Finished. Answer must include: certificate validation step, ephemeral key exchange for forward secrecy, and use of authenticated encryption (AES-GCM) for confidentiality+integrity. For TLS 1.3, key shares are in ClientHello/ServerHello; there is no ServerKeyExchange/ClientKeyExchange and keys are derived with HKDF and the handshake transcript (EncryptedExtensions, Certificate, CertificateVerify, Finished), with ChangeCipherSpec not used for key change.

Example 2 — IAM policy design (model answer): Problem: Allow a developer read-only access to a single production database backup S3 bucket, but deny deleting objects. Answer (steps):

  1. Create IAM role 'ProdBackupReader'.
  2. Attach policy: Allow s3:GetObject and s3:ListBucket on arn:aws:s3:::prod-backups and arn:aws:s3:::prod-backups/*.
  3. Explicitly Deny s3:DeleteObject on same resource to be safe.
  4. Require MFA and require access from corporate IP range using condition keys (e.g., aws:SourceIp).
  5. Use role assumption with short-lived credentials and audit via CloudTrail/SIEM. Include sample policy statement as given in Formulas section style.

Example 3 — STRIDE threat model for a simple cloud web app (short answer):

  1. Asset: user profile DB.
  2. Spoofing: weak authentication → enforce MFA and strong password policy; store passwords using strong hashing (bcrypt/Argon2) to protect at rest. Mitigation: MFA + strong auth policy.
  3. Tampering: unvalidated inputs → use parameterized queries. Mitigation: input validation, WAF.
  4. Repudiation: missing logs → enable immutable audit logs. Mitigation: SIEM + log retention.
  5. Information disclosure: backups stored unencrypted → enable KMS-managed encryption. Mitigation: SSE with KMS.
  6. Denial of Service: public API unlimited connections → rate limit, autoscale, DDoS protection. Mitigation: WAF and CDN.
  7. Elevation of Privilege: excessive IAM permissions → apply least privilege and role separation. Full-marks answer lists each STRIDE item, impact, and specific mitigation.

Common mistakes

  • Assuming TLS alone is enough; TLS protects transport but not server-side plaintext or misconfigured APIs.
  • Forgetting to mention logging/monitoring (SIEM/CloudTrail) when designing secure cloud systems.
  • Giving overly broad IAM policies (e.g., wildcard Action = "*"). Examiners penalize lack of least-privilege.
  • Mixing up SSE and E2EE: SSE means provider encrypts at rest; E2EE means provider cannot decrypt.

For your exam

Question types you will see: definitions (define CIA, IAM, KMS), short notes (WAF, CASB, SSE), design/derivation (draw TLS handshake and explain key derivation), case questions (secure a cloud web app), and policy snippets (write an IAM allow/deny statement). Full-marks answers include:

  • Clear definitions of terms used.
  • Trust assumptions and attack model.
  • Diagrams where helpful (draw labelled arrows and boxes for handshakes/flows).
  • Specific services or controls (IAM roles, KMS keys, WAF rules, SIEM alerts) and why each is chosen.
  • Consideration of key ownership, rotation, and audit/logging.

Quick check

  1. What are the three parts of the CIA triad?
  2. What is the difference between SSE and E2EE?
  3. Name two functions of a KMS.

Answers: Confidentiality, Integrity, Availability; SSE = provider-side encryption at rest (provider can decrypt), E2EE = only endpoints can decrypt; Create/rotate keys and perform cryptographic operations or store keys securely (key creation, rotation, access control, audit).

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?