CD6: Cloud foundations

Lesson 2 of 5 · reading 15–25 minutes; practice and project time is on the module page

Identity and access

🎯You'll be able to

Give people and programs only the access they need, avoid long-lived keys, and let a pipeline reach the cloud without storing a password.

🏠The everyday picture

In an office, the cleaner's key opens the corridors, not the accounts safe. Visitors get a day pass that stops working at 6 pm, rather than a permanent key they might lose.

📘What it really is

📝A worked example

Input: compare two ways for the RouteRani deploy job to reach AWS.

Expected output:

Access key in a GitHub secret OIDC role
What's stored in GitHub a key that works until someone deletes it nothing secret, only the role's name
If it leaks works from anywhere, for months a token that expires within the hour, accepted only for your repository
Who can use it any workflow that can read the secret only jobs matching the trust conditions, such as main in the production environment
Rotation manual not needed

🌍Where it's used

📝Case scenario

A developer at an edtech startup pushed a long-lived AWS access key to a public repository by mistake. Automated bots found it within minutes and started cryptocurrency-mining servers in several regions, running up a large bill overnight. The key belonged to an admin user with no restrictions. Afterwards they removed all long-lived keys, moved the pipeline to OIDC, and gave developers roles through single sign-on with MFA.

🖱️Try it

Write a least-privilege policy for a job that may only upload files to the routerani-reports bucket under the daily/ folder (action s3:PutObject, resource arn:aws:s3:::routerani-reports/daily/*). Success: no * in the action, and the resource names one folder.

⚠️Common mistakes

🛠️For your project

Project 2's deploy job uses GitHub's production environment. In your capstone write-up, explain how it would reach a cloud with OIDC instead of a stored key.

✅Quick check

Why prefer roles over access keys for programs?

Show the answer

Roles give short-lived credentials automatically, so there's no long-lived key to leak or rotate.

What does OIDC let a pipeline do?

Show the answer

Prove its identity with a short-lived token and get a cloud role without storing a secret.

← PreviousRegions, zones and who's responsible for what
ProLearners Assist