Cloud security Workload identity 3 min read
What is cloud workload identity?
A report service needs to read one bucket. How can it authenticate without a permanent access key committed in its repository?
-
Give the workload a role
In AWS, an EC2 instance or Lambda function can run with an IAM role. The role’s trust policy lets the compute service assume it; its permissions policy says which AWS actions the application may call.
In short The role names who the workload is and what it can do.
-
The platform supplies temporary credentials
The AWS SDK obtains temporary credentials for the role from the runtime environment and refreshes them as needed. The application can call the allowed API without a long-lived IAM user access key in a config file.
In short Temporary credentials arrive at runtime instead of being baked into the app.
-
Keep the credential source away from untrusted code
Any code that can use the role may exercise its permissions. Give the role only the required bucket actions, and prevent unrelated containers or request-handling paths from reaching its credentials.
In short A role removes a stored key; its permissions still need tight scope.
What workload identity doesn’t guarantee
A role does not distinguish safe code from malicious code running as the workload. A compromised process may use every permission available to that runtime.
AWS role delivery is one example; other clouds use their own managed identities or workload federation systems.
Keep this
Attach an identity to the workload; let the platform provide temporary credentials.
Use the cloud’s workload identity mechanism, scope its role to the job, and prevent untrusted code from reaching the credential source.- Identity
- A role represents the application or compute service.
- Permission
- The role grants only the API access the workload needs.
- Credentials
- The platform supplies and refreshes temporary credentials.