Skip to content
VirtualLP Virtual Learning Platform

Secure Cloud Software Requirements and Secure Development Practices

15 min read Topic 16 of 34

A password left in code or an API (Application Programming Interface) with missing access checks can expose data. Plan security while deciding what the software should do.

A security requirement is a written protection rule. For example, only a teacher may change marks. During development, build the checks, test them and review the results before release.

building a house

You plan the locks, fire exits and strong doors while drawing the house plan – not after people move in. Adding security at the end is costly and never as good. Software is the same.

Secure cloud software requirements

Security requirement

A security requirement is a clear, written rule about how software must protect data or control actions. For example, only a teacher may change marks. Requirements come from protection needs, threats, policies and applicable rules.

Where security requirements come from

  • The organisation's security policies and standards.
  • Laws and compliance rules – DPDP (Digital Personal Data Protection) Act 2023 (India), GDPR (General Data Protection Regulation) (Europe), PCI-DSS (Payment Card Industry Data Security Standard) (card payments), HIPAA (Health Insurance Portability and Accountability Act) (health data), RBI (Reserve Bank of India) guidelines (banks), ISO/IEC (International Electrotechnical Commission) 27001/27017/27018 (security standards).
  • Threat models and risk assessments (what could go wrong).
  • Customer and contract (SLA (Service Level Agreement)) promises.
  • Lessons from past incidents and penetration tests.

Functional vs non-functional security requirements

Functional security requirements Non-functional security requirements (qualities)
Say what the system must do Say how well, or under what limits
“Users must log in with MFA (Multi-Factor Authentication).” “The system must be available 99.95 % of the time.”
“Admins can lock an account.” “Passwords must be hashed with bcrypt.”
“All actions are written to an audit log.” “Login sessions expire after 15 minutes of inactivity.”
“Only the owner can export data.” “The service must resist the OWASP (Open Worldwide Application Security Project) Top 10 attacks.”

Proactive vs reactive requirements

Proactive (protective) Reactive (responsive)
Stop attacks before they happen Notice, respond to and recover from attacks
Input checking, encryption, least privilege, safe default settings Logging, intrusion detection, alerts, incident response, backup and restore

Main categories of cloud software security requirements

Category Example requirement
Identification & authentication Support SSO (Single Sign-On) through OpenID Connect; force MFA for administrators.
Authorisation Check role-based permissions on every API endpoint.
Confidentiality Encrypt all personal data at rest with AES-256 (Advanced Encryption Standard with a 256-bit key) using KMS (Key Management Service) keys; use TLS (Transport Layer Security) 1.2+ in transit.
Integrity Check and clean all input; sign webhooks with HMAC (Hash-based Message Authentication Code).
Availability Run in at least 2 Availability Zones; RPO (Recovery Point Objective) 1 hour, RTO (Recovery Time Objective) 4 hours.
Auditing & logging Record who, what, when and where for security events; keep for 1 year; protect logs from tampering.
Session management Use Secure, HttpOnly, SameSite cookies; create a new session ID at login.
Error handling Show simple, general messages; never show stack traces or secrets.
Data protection & privacy Collect only needed data, take consent, allow deletion, keep data in India.
Multi-tenancy isolation One customer can never read or change another customer's data.
Secrets management No passwords or keys in source code; keep them in a vault (AWS (Amazon Web Services) Secrets Manager, Azure Key Vault, HashiCorp Vault).
Secure configuration Hardened images, no default passwords, least-privilege service accounts.
Good requirements are SMART (Specific, Measurable, Achievable, Relevant and Time-bound)

Security requirements should be Specific, Measurable, Achievable, Relevant and Testable. "The system shall be secure" is useless; "The login page shall lock an account for 15 minutes after 5 failed attempts within 10 minutes" can be tested.

Misuse and abuse cases

A use case describes an allowed action, such as uploading an assignment. A misuse case describes an attack, such as uploading harmful code as an assignment. Write checks for file types, malware and safe file delivery.

Secure development practices

Security must be built into every phase of the Secure Software Development Life Cycle (SSDLC):

flowchart LR
    R[Requirements<br/>security & privacy<br/>requirements] --> D[Design<br/>threat modelling,<br/>secure architecture]
    D --> I[Implementation<br/>secure coding,<br/>code review, SAST]
    I --> T[Testing<br/>DAST, pen testing,<br/>fuzzing]
    T --> DP[Deployment<br/>hardening, IaC scanning,<br/>secrets management]
    DP --> M[Operations<br/>monitoring, patching,<br/>incident response]
    M -. feedback .-> R

Well-known frameworks: Microsoft SDL (Security Development Lifecycle), OWASP SAMM (Software Assurance Maturity Model), NIST (National Institute of Standards and Technology) SSDF (Secure Software Development Framework) (SP 800-218), BSIMM (Building Security In Maturity Model).

1. Threat modelling (design phase)

Think like an attacker before writing code – list what can go wrong. A popular method is Microsoft's STRIDE (each letter is one kind of threat):

Threat Breaks which goal Example Protection
Spoofing – pretending to be someone else Authentication A stolen API key is used to call the service MFA, short-lived login details
Tampering – changing data Integrity Changing the price in a request from ₹999 to ₹1 Check on the server, signatures
Repudiation – denying an action Non-repudiation A user says "I never placed that order" Audit logs, signed records
Information disclosure – leaking data Confidentiality A public S3 (Simple Storage Service) bucket with customer data Encryption, block public access
Denial of service – stopping the service Availability A flood of requests Rate limiting, auto-scaling, WAF (Web Application Firewall)
Elevation of privilege – getting more rights Authorisation A normal user becomes admin by changing an ID in the URL (Uniform Resource Locator) (IDOR (Insecure Direct Object Reference)) Check permissions on every request

2. Secure coding

Follow the OWASP Top 10 (2021) – the ten most common web app risks:

# Risk Prevention
A01 Broken access control – users reach things they shouldn't Deny by default; check ownership of every object
A02 Cryptographic failures – weak or missing encryption TLS everywhere, strong algorithms, no keys written in code
A03 Injection (SQL (Structured Query Language), OS (Operating System), LDAP) – attacker's input runs as a command Parameterised queries / ORM (Object-Relational Mapping), input validation
A04 Insecure design Threat modelling, secure design patterns
A05 Security misconfiguration – wrong settings Safe defaults, automatic settings checks
A06 Vulnerable & outdated components Scan libraries (SCA (Software Composition Analysis)), keep them updated
A07 Identification & authentication failures MFA, limits on login attempts, safe session handling
A08 Software & data integrity failures Signed builds, trusted CI/CD (Continuous Integration and Continuous Delivery) pipelines
A09 Security logging & monitoring failures Central logs and alerts
A10 Server-side request forgery (SSRF) – tricking the server into calling internal addresses Allow only approved outgoing URLs; protect metadata endpoints (IMDSv2)

SQL injection example:

// ❌ Vulnerable to SQL injection
String sql = "SELECT * FROM users WHERE email = '" + email + "'";

// ✅ Parameterised query
PreparedStatement ps = conn.prepareStatement("SELECT * FROM users WHERE email = ?");
ps.setString(1, email);

In the first example, text such as ' OR '1'='1 can change the SQL query. In the second, the parameterised query treats input as data. It does not let the input become part of the SQL command.

3. Code review and static analysis (SAST)

SAST means Static Application Security Testing.

SAST means Static Application Security Testing. Team members review each other's code using security checklists. SAST tools (SonarQube, Semgrep, CodeQL) read the source code and find risky patterns before it is merged. SCA tools (Dependabot, Snyk, OWASP Dependency-Check) find libraries with known security holes.

4. Security testing

  • DAST (Dynamic Application Security Testing) – test the running application from the outside, like an attacker (OWASP ZAP, Burp Suite).
  • IAST (Interactive Application Security Testing) – tools inside the app watch for problems while normal tests run.
  • Penetration testing – authorised experts try to break in (cloud providers publish rules for allowed testing).
  • Fuzzing – send random or broken inputs to find crashes.
  • Security unit tests – automated tests such as "a user cannot read another customer's invoice".

5. DevSecOps – security in the CI/CD pipeline

Shift security left – check early – and automate the checks so they run on every code change:

flowchart LR
    C[Commit] --> S1[Secret scanning] --> S2[SAST + SCA] --> B[Build container image] --> S3[Image scan] --> S4[IaC scan<br/>Terraform/Heat/CloudFormation] --> DP[Deploy to staging] --> S5[DAST] --> P[Production]

The pipeline checks for leaked secrets, code problems and unsafe libraries. It scans the container and infrastructure settings, then deploys to a test environment. DAST tests the running app before release.

6. Secure deployment and operations

  • Use hardened, minimal images; update (patch) regularly.
  • Review Infrastructure as Code like application code.
  • Load secrets from a vault at runtime and rotate them automatically.
  • Give workloads least-privilege roles (IAM (Identity and Access Management) roles, managed identities) instead of long-lived keys.
  • Monitor continuously, set up alerts and keep an incident response plan.
In the real world

Many cloud break-ins started with AWS access keys accidentally pushed to public GitHub repositories – automated bots find them within minutes. GitHub and AWS now scan for exposed keys automatically. That is a reactive control backing up the proactive rule "never store secrets in code".

Summary

  • Security requirements come from policies, laws, threats and contracts; they should be specific and testable (SMART).
  • Know the difference between functional (what) and non-functional (how well), and proactive (prevent) and reactive (detect/respond) requirements.
  • Misuse cases turn attacker goals into requirements.
  • Secure development builds security into every phase: threat modelling (STRIDE), secure coding (OWASP Top 10), code review, SAST/SCA, DAST/pen testing, DevSecOps and secure operations.

Practice questions

  1. What are secure cloud software requirements? Explain their categories with examples.
  2. Differentiate functional and non-functional security requirements.
  3. Differentiate proactive and reactive security requirements.
  4. Explain the STRIDE threat model with cloud examples.
  5. List the OWASP Top 10 and the prevention for any five.
  6. What is DevSecOps? Draw a secure CI/CD pipeline.
  7. Explain secure development practices across the SDLC (Software Development Life Cycle).

Create a free account to track your progress and unlock virtual labs.