Three tools form the basis of cloud security: encryption to protect the data, identity and access management to control who may use it, and secure protocols to protect it on the move.

Security Goals

The CIA triad states the main goals. Confidentiality means that only authorised people can read the data. Integrity means that data is not changed without permission. Availability means that the data and services are there when needed. Two more goals are authentication, proving who someone is, and non-repudiation, so that a person cannot deny an action.

Encryption

Encryption changes readable data, called plaintext, into unreadable ciphertext using an algorithm and a key. Symmetric encryption, such as AES, uses the same key to encrypt and decrypt. It is fast and used for large data. Asymmetric encryption, such as RSA, uses a public key to encrypt and a private key to decrypt, and solves the problem of sharing keys, but is slower. Data should be protected at rest, when stored, in transit, when it moves, and where possible in use. A hash such as SHA-256 gives a fixed fingerprint of data, to check integrity. Digital signatures use the private key to prove origin. Key management is vital: keys must be created, stored, rotated and destroyed safely, using a Key Management Service (KMS) or a hardware security module (HSM). Client-side encryption keeps the key with the customer and not with the provider.

Definition: Encryption. The process of converting readable data into unreadable ciphertext using an algorithm and a key, so that only holders of the correct key can recover the original.

Identity and Access Management (IAM)

IAM controls who can do what with which resources. Authentication checks identity, by a password, a token or biometrics, and multi-factor authentication (MFA) needs two or more proofs, such as a password and a code from a phone. Authorisation decides what the verified identity may do. The principle of least privilege gives only the permissions that are needed. Role-based access control (RBAC) gives permissions to roles, and users are assigned roles. Single sign-on (SSO) lets one login serve many services, using standards such as SAML and OAuth 2.0 and OpenID Connect. Federation links identities between organisations. All actions should be logged and reviewed.

Secure Communication Protocols

TLS (Transport Layer Security), the successor of SSL, protects data between a browser and a server, and is the basis of HTTPS. IPsec protects traffic at the network layer, and is used in VPNs, which build an encrypted tunnel between a site and the cloud. SSH gives secure remote login. Certificates from a certificate authority prove the identity of a server. Firewalls, security groups and network ACLs filter traffic.

Table 3.2: Security tools

Tool Protects Example
Encryption Confidentiality AES, RSA
Hashing Integrity SHA-256
IAM and MFA Access Roles, one-time codes
TLS and VPN Data in transit HTTPS, IPsec

Example 3.2: Symmetric encryption in Python

Problem: Show a simple example of encrypting a message with a key and recovering it, using the XOR operation to illustrate the idea of a shared key. (This is a teaching toy, not secure.)

Solution:

  1. Take a key and XOR each byte of the message with it.
  2. XOR again with the same key to recover the message.

Result: The same key encrypts and decrypts, which is the idea of symmetric encryption.

msg = b"cloud"
key = 23
enc = bytes(b ^ key for b in msg)
dec = bytes(b ^ key for b in enc)
print(enc.hex(), dec)

Output

747b786273 b'cloud'

Common mistakes

  • Storing the encryption key next to the encrypted data.
  • Using only a password without a second factor for important accounts.
  • Giving administrator rights to everyone, instead of least privilege.

Key takeaways

  • The CIA triad is confidentiality, integrity and availability.
  • Encrypt data at rest and in transit, and manage the keys carefully.
  • Use least privilege, RBAC and multi-factor authentication.
  • TLS secures HTTPS, and IPsec secures VPNs.

Practice questions

  1. What is the CIA triad?
  2. Distinguish symmetric and asymmetric encryption.
  3. What is least privilege?

Answers to the practice questions

  1. Confidentiality, integrity and availability.
  2. Symmetric uses one shared key, asymmetric uses a public key to encrypt and a private key to decrypt.
  3. Giving a user only the permissions that are needed for the work.

Sources

  • Official BCA syllabus Cloud Computing, course code 25BCA405DS03, Unit III