Human and workload identities
Who is making the request?
Cloud identity answers who or what is acting. A human identity represents a person. A workload identity represents an application, service or automated deployment job. Both may be principals: entities that can be authenticated and authorized to act. A credential is evidence used to authenticate, such as a short-lived access token.
Authentication establishes identity. Authorization determines whether that identity can perform a requested action on a resource. For example, a developer may sign in successfully but still be denied permission to delete the production database. Authentication is not an administrator permission.
Human access: federation and MFA
Give each operator a distinct identity so activity can be attributed. Federation allows a trusted identity provider to establish an identity for access to cloud resources, often using short-lived sessions. It reduces the need to maintain separate permanent cloud credentials for every user. Multi-factor authentication (MFA) uses more than one authentication factor; it improves protection but does not replace authorization.
Protect highly privileged identities and recovery methods. In AWS, protect root access and avoid using it for routine work; follow current provider guidance for organization-managed root access. Azure tenant administrators and Google Cloud privileged administrators have different responsibilities and recovery mechanisms. Separate ordinary work from elevated administration, and review access when staff change roles. Do not use shared administrator passwords or ask a learner to enter actual MFA codes in a tutorial.
Workload access: temporary credentials
An application should not borrow an employee's permanent identity. Give the workload its own narrowly scoped identity and, when supported, obtain temporary credentials through the platform or a trusted federation mechanism.
| Provider | Example mechanism | Important boundary |
|---|---|---|
| AWS | IAM role and temporary credentials | Trust rules govern who can assume the role; permissions govern what it can do |
| Azure | Managed identity for supported Azure resources | A token identifies the workload; a suitable target permission is still needed |
| Google Cloud | Attached service account or Workload Identity Federation | The principal needs explicit access; avoid user-managed keys where possible |
These mechanisms are not identical. Check the service, token audience, identity binding and supported environment. A managed identity does not mean there are no credentials anywhere; the platform manages acquisition rather than the application storing a permanent secret. Temporary tokens remain sensitive until they expire or access is otherwise curtailed.
Worked example: deploy only to the test shop
The bookstore needs an automated pipeline to update its test web application. It must not read production orders or change access policies. Use this simplified policy design (not a deployable IAM policy).
Trusted test deployment job -> identity exchange with verified job context -> short-lived test-deployer session -> deploy operation on shop-test web appThe trust side must verify that the request comes from the approved test pipeline, not just any job from the same identity provider. The permission side restricts operations to the named test application. A deployment to production requires a different reviewed identity and approval workflow. Actual cloud implementations need provider-specific configuration, including conditions and token verification; this diagram alone does not enforce anything.
| Principal | Action | Target | Intended result |
|---|---|---|---|
| test-deployer | deploy | shop-test app | Allow |
| test-deployer | deploy | shop-prod app | Deny |
| test-deployer | read | prod orders | Deny |
| test-deployer | change-access | shop-test app | Deny |
| test-developer | read | shop-test logs | Allow |
Use least privilege: permit only required actions on required resources. Start with explicit requirements, not broad administrator access. In this toy model all unspecified operations are denied. Real authorization may involve multiple policies, inherited grants, explicit denies, resource policies and service-specific conditions; the matrix is not a cloud policy simulator.
Session lifetime and verification
Assume a fictional session is issued at minute 10 and expires at minute 25. For the classroom model it is valid at times from 10 inclusive to 25 exclusive. A matching request at minute 24 may proceed; at minute 25 it fails the session check. A new approved session is needed. A valid session at minute 15 still cannot change production access if that operation is outside its permissions.
Real token formats, lifetimes, caching, refresh and revocation behavior vary. Short sessions limit the usefulness of exposed tokens but do not prevent abuse during their validity. Do not print tokens in logs or store them in source control. Review audit records for identity, action, scope, result and time without exposing credentials. Test expected allowed and denied operations in an authorized environment before trusting a deployment design.
Common mistakes and safe practice
- Reusing an employee's credentials in a deployment script: assign a dedicated workload identity instead.
- Granting a broad role because a narrow permission was denied: inspect the required operation, target and applicable policy before changing access.
- Assuming successful sign-in proves permission to all resources: verify authorization at the requested scope.
- Treating a short-lived token as safe to share: protect all credentials and follow the provider's incident response and revocation guidance if exposure occurs.
Practice offline: design separate developer and deployment identities for a training app. Decide which can read test logs, deploy test code and access production data. Include a denied request and an expired session. No account, payment details, authentication or real credentials are required.
Further reading: AWS IAM best practices, Azure managed identities, Google Cloud service account key guidance. Next: cloud pricing, budgets and first cost model.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Human and workload identities — knowledge check
Choose the best answer for each offline scenario.
A developer signs in but cannot delete the production database. What failed?
What should a test deployment job use when supported?
What does a role trust rule describe in the toy deployment example?
A session expires at minute 25. At minute 25, is it valid in the stated model?
A test-deployer requests production order data during a valid session. What is intended?