Cloud Identity and Security
Secure cloud environments with least-privilege roles, key management, logging, and configuration guardrails.
- Certification
- CompTIA Cloud+
- Recommended study time
- 6h 35m
- Status
- Not started
Recommended study time
About 6h 35m in total, measured from the material on this page. At your session length of 45 minutes that is 9 sittings.
- Read the lesson24 min
About 3,063 words at a careful technical reading pace.
- Second pass with notes14 min
Re-read the harder parts and write your own notes.
- Recall from memory12 min
2 written recall questions.
- Practice decision12 min
One applied decision with feedback.
- Teach it back20 min
Write the topic in your own words.
- Real-world scenario15 min
Read the situation and justify your decision in writing.
- Hands-on practice3h 20m
Labs, commands and configuration until you can do it unaided.
- Spaced review1h 40m
4 short review sessions spread over the following weeks.
Learning objectives
- Design role-based cloud access using policies, roles, and short-lived credentials.
- Protect secrets and keys with managed services rather than embedded credentials.
- Enable and use cloud audit logging and configuration compliance tooling.
Start here
About 8 minutes of reading, in 10 short parts.
In the cloud, identity is the real perimeter: there is no physical wall around a virtual data centre, only permissions attached to accounts and roles. Getting identity and key management wrong is the single most common way cloud environments are actually breached.
Where you meet it: A security scan finds an access key hardcoded in a public code repository, and it turns out that key had far more permissions than the script it was written for ever needed.
The lesson, part by part
Open one part at a time. Each part stands on its own, so you can stop and come back.
In a traditional office, security largely means locked doors and badges controlling who can physically walk in. In the cloud there is no building to lock; instead, every single action — creating a server, reading a file, deleting a database — is only possible if the identity performing it has been explicitly granted permission to do that specific thing. This is why identity, not network location, is really the front line of cloud security.
Handing out a long-lived password or key that never expires is like giving someone a spare house key that works forever, even after they move away or the key gets copied by someone else. Modern cloud security instead prefers temporary, narrowly scoped permissions: like a hotel key card that only opens your specific room, only for your specific stay, and stops working automatically the day you check out.
Key ideas
If you remember nothing else from this topic, remember these.
- Cloud identity and access management is built on the principle of least privilege, granting only the specific permissions a role actually needs rather than broad administrative access by default.
- Roles and policies attached to a service or user define exactly which API actions are permitted on which resources, and overly broad policies are one of the most common real-world cloud misconfigurations.
- Multi-factor authentication significantly reduces the risk of account compromise even when a password is leaked, and cloud providers increasingly require it for privileged accounts.
- Long-lived static access keys embedded in code or configuration are a major and avoidable risk; temporary, automatically rotated credentials are the safer standard practice.
- Encryption at rest and in transit protect data differently, at rest protects stored data from unauthorized access to the underlying storage, and in transit protects data moving across a network from interception.
- Federated identity lets an organization use its existing directory as the source of truth for cloud access, avoiding duplicate account management and reducing the number of separate credentials to secure.
Investigating an overly permissive service account after a near-miss
A worked example, step by step.
A security review discovers an application's cloud service account has full administrative permissions across the entire environment, far beyond what the application actually needs.
- 01Identify the current policyReviewing the account's attached policy shows a wildcard permission granting access to every action on every resource, rather than a scoped set of actions.
- 02Determine actual usageCloud access logs are reviewed over the past 90 days to see which specific API calls the application actually makes, such as reading from one storage bucket and writing to one queue.
- 03Draft a least-privilege policyA new policy is written granting only read access to the specific bucket and write access to the specific queue the application actually uses, with no wildcard scope.
- 04Test in a non-production environmentThe new policy is applied to a staging copy of the service account, and the application is exercised through its normal workflows to confirm nothing is denied that should be allowed.
- 05Roll out to production with monitoringThe scoped policy replaces the old one in production, with access-denied logging enabled to catch anything unexpectedly blocked.
- 06Replace static keysThe account was also found using a long-lived static access key; it is replaced with a mechanism issuing short-lived temporary credentials automatically rotated by the platform.
- 07Add multi-factor requirements for human accessSeparately, all human accounts with any administrative access are required to enroll in multi-factor authentication before their next login.
- 08OutcomeThe application continues functioning normally with a fraction of its previous access, and a stolen credential would now expose far less of the environment.
Outcome: Scoping the service account to least privilege and eliminating static keys drastically reduced the blast radius of any future credential compromise.
Cloud identity and security reference
Worth keeping at hand while you work.
- Principle of least privilege
- Granting only the minimum permissions required to perform a specific task.
- IAM role
- A set of permissions that can be assumed by a user, service, or application without a permanent static credential.
- IAM policy
- A document defining which actions are allowed or denied on which resources.
- Multi-factor authentication (MFA)
- Requires a second verification factor beyond a password, significantly reducing account compromise risk.
- Static access key
- A long-lived credential pair; higher risk if leaked because it does not expire automatically.
- Temporary/short-lived credentials
- Automatically expiring credentials issued for a limited session, reducing exposure if leaked.
- Encryption at rest
- Protects stored data from unauthorized access to the underlying storage medium.
- Encryption in transit
- Protects data moving across a network from interception, typically via TLS.
- Federated identity / SSO
- Uses an external identity provider, such as an existing corporate directory, as the source of truth for cloud access.
- Wildcard permission
- A policy granting access to all actions or resources; a common sign of an overly broad, risky configuration.
- Access logging / audit trail
- Records of who did what and when, essential for investigating suspected compromise.
- Key rotation
- Regularly replacing credentials to limit how long a leaked credential remains useful to an attacker.
Common misunderstandings
What most beginners get wrong here.
Granting broad administrative access to a service account is fine as long as it is only used internally.
Overly broad permissions increase the impact of any compromise, regardless of whether the account was intended for internal use only; least privilege limits blast radius.
A password alone is sufficient for privileged cloud accounts if it is long and complex.
Multi-factor authentication protects against credential leaks and phishing in ways a password alone, no matter how complex, cannot.
Static access keys are fine as long as they are not committed to a public code repository.
Static keys carry risk from any leak vector, not just public exposure, which is why short-lived, automatically rotated credentials are the safer standard.
Encryption at rest alone protects data fully during normal application use.
Data must also be encrypted in transit, since encryption at rest does nothing to protect data while it moves across a network between services.
Federated identity is only useful for reducing password fatigue for end users.
It also centralizes access control and deprovisioning in one directory, so revoking access in one place removes it everywhere federated, reducing orphaned account risk.
Exam traps
How the question writers try to catch you out.
- A scenario describing a service account with excessive access is almost always testing recognition of a least privilege violation.
- Questions distinguishing encryption at rest from encryption in transit expect precise mapping of each to the specific state of data it protects.
- Static access key exposure scenarios test recognition that short-lived, automatically rotated credentials are the preferred mitigation, not simply better key storage.
- MFA questions often test that it mitigates credential theft and phishing risk specifically, not that it replaces the need for strong passwords entirely.
- Federated identity and single sign-on questions test understanding of centralized deprovisioning as a security benefit, not just user convenience.
Check yourself
Answer in your head first, then reveal. This is not scored.
What is the principle of least privilege?
Why are static access keys considered riskier than temporary credentials?
What is the difference between encryption at rest and encryption in transit?
How does federated identity reduce security risk beyond convenience?
Why is a wildcard permission in an IAM policy considered a red flag?
Quick reference
A condensed summary of the lesson above, for revision.
What It Is
Cloud IAM grants permissions through policies attached to users, groups, roles, and workload identities. Best practice uses short-lived role assumption rather than long-lived keys, scoped least-privilege policies, and separation between environments. Managed key and secret services store credentials and encryption keys with access logging. Audit logs record every control-plane action.
Why It Matters
A leaked long-lived access key with broad permissions is equivalent to handing over the data centre. Detection depends entirely on audit logging that must be enabled and retained before an incident, not after.
How It Works
- Policy evaluation combines identity, resource, and guardrail policies to allow or deny each API call.
- Role assumption issues temporary credentials with a limited lifetime and scope.
- Audit services record who called which API, when, and from where.
Where You See It
- Cloud landing zones, CI/CD pipelines, application deployment, incident investigation, and compliance audits.
Key Terms
- Least privilege policy
- Permissions scoped to required actions and resources.
- Role assumption
- Temporary credentials granted for a specific role.
- Workload identity
- Identity assigned to a service rather than a person.
- Secrets manager
- A service storing credentials with access control and rotation.
- Audit log
- Immutable record of control-plane API activity.
Examples
- An application should assume a role with only the storage actions it needs, not use a stored admin key.
- Configuration compliance tooling can flag public storage or unencrypted volumes automatically.
Common Problems
- Long-lived access keys in code
- Wildcard permissions
- Disabled or short-retention audit logs
- Unencrypted or public resources
- Shared accounts between environments
How It Fails
- A key committed to a repository is scanned and abused within minutes.
- Without audit retention, incident scope cannot be established at all.
- Overly broad roles let a compromised build pipeline reach production data.
How to Troubleshoot
- Use audit logs to establish exactly which identity performed an action.
- Test permissions with policy simulation before widening them.
- Check guardrail and organisation policies when an allowed action is still denied.
Practical Knowledge
- Rotate and eliminate static keys; prefer federated or workload identity.
- Scan repositories and images for secrets automatically as part of the pipeline.
Exam Coverage
- Cloud IAM and policy design
- Key and secret management
- Cloud logging, monitoring, and compliance
Interview Questions
- Why are long-lived access keys discouraged?
- How would you scope a policy for a service that only reads one storage bucket?
Watch and read
Verified official and reputable sources for this topic. Links open in a new tab.
Video training
Professor Messer video channel — general CompTIA training (no dedicated CompTIA Cloud+ course)
Professor Messer
WatchVideoFree
Lesson notes and bookmark
Notes and bookmarks for this lesson, saved with everything else you have marked.
No notes on this item yet.
Learning progress
0% across six evidence areas. Reading alone does not change progress.
Prerequisites
Next steps
- 01Review one cloud policy and remove any wildcard action or resource you cannot justify.
- 02Locate the audit log service in a cloud platform and confirm retention settings.