Identity and access management
Every request is checked twice: who are you, and may you do this?
Authentication proves who is asking. Authorisation decides whether they may. Both run on every request.
In a data centre you own, the walls keep strangers out. In the cloud there are no walls: everything is reached over the internet. What protects it is identity. Follow one request. Asha asks to delete a file. First, authentication: who are you? She proves it with a password and a code. If she cannot, the request stops there. Second, authorisation: may Asha delete this file? The service looks for a policy that says so. If none does, the answer is no. Only when both checks pass does the request reach the bucket. This happens on every request, for people and for software alike.
Identity and access management · Going deeper
How the decision is made: deny by default, and Deny wins
A request is denied unless a rule allows it, and an explicit Deny overrides any Allow.
Users, groups and roles
Permissions attach to groups and roles, not to one person at a time
People belong to groups; software and tasks use roles. Policies attach to those, and identities inherit them.
Who can be given permissions? People, first. But you do not hand permissions to people one by one. You put them in a group, and attach a policy to the group. Three developers may deploy and restart the application. Two people in finance may read invoices, and nothing else. When someone joins or moves, you change their group and the rest follows. Software needs permissions too, and software has no password to type. It is given a role: an identity that a server takes on, with its own policy. This web server may read product photos, and that is all.
Users, groups and roles · Going deeper · 1 of 2
The same parts under different names
IAM users, groups, roles and policies on AWS; Entra ID users, groups, managed identities and role assignments on Azure; accounts, groups, service accounts and role bindings on Google Cloud.
Users, groups and roles · Going deeper · 2 of 2
The root user: the one identity nothing can restrict
The identity that created the account can do anything, and no policy can limit it. Lock it away.
The identity that created the account can do anything, and no policy can limit it. Lock it away. What it is. When you open an AWS account, the email address and password you used become the root user. It can close the account, change the payment method and remove every other user. Azure’s nearest equivalent is the Global Administrator of the tenant; Google Cloud’s is the super administrator. What to do with it, on day one. Turn on multi-factor authentication preferably with a hardware key kept somewhere safe. Create no access keys for it and delete any that exist. Make an administrator identity for daily work and sign in with that instead. Use root only for the few tasks that need it such as changing the support plan or closing the account. This is a reliable exam question: the root user should be protected with MFA and not used for everyday tasks.
What it is
When you open an AWS account, the email address and password you used become the root user. It can close the account, change the payment method and remove every other user. Azure’s nearest equivalent is the Global Administrator of the tenant; Google Cloud’s is the super administrator.
What to do with it, on day one
- Turn on multi-factor authentication preferably with a hardware key kept somewhere safe.
- Create no access keys for it and delete any that exist.
- Make an administrator identity for daily work and sign in with that instead.
- Use root only for the few tasks that need it such as changing the support plan or closing the account.
Policies
A policy says who may do what, to which resources, and when
A policy lists an effect, actions, resources and optional conditions. Anything it does not allow stays denied.
Permissions themselves are written down as policies. Here is one, attached to the finance group. It is four lines. Effect: this policy allows something. Action: what it allows, here reading and writing files. Resource: on what. One folder, in one bucket, and nowhere else. And a condition: only when the request comes from the office network. That is the whole grammar. Everything this policy does not mention remains forbidden, because the starting point is always no.
Policies · Going deeper
Azure and Google: a role, given to someone, at a level
A role assignment joins who, which role and what scope. It is inherited by everything beneath that scope.
Least privilege
Grant only what the job needs, and a stolen key can do only that
Least privilege limits each identity to what its task requires, which limits the damage when it is misused.
How much should a policy allow? As little as the job needs. Here is why. This key was given administrator access, because that was quick. One day it is stolen. Everything the account holds is now exposed: the databases, the files, the servers. The thief can even start new machines and leave you the bill. This key was made for one job: a report that reads one bucket. If it is stolen, the thief can read that bucket. The damage ends there. Nobody can prevent every theft or mistake. You can decide in advance how far each one reaches.
Least privilege · Going deeper · 1 of 2
Defence in depth: seven layers, not one wall
Defence in depth stacks independent protections from the building to the data, so one failure is not a breach.
Least privilege · Going deeper · 2 of 2
Zero trust: verify every request, wherever it comes from
Zero trust drops the idea that anything inside the company network is safe. Every request is checked on its own merits.
Zero trust drops the idea that anything inside the company network is safe. Every request is checked on its own merits. The old model and the new. Castle and moat. Trust anyone inside the office network. Once an attacker is in, by a stolen laptop or one phishing email, they can reach everything. Zero trust. Trust nothing by location. Each request must prove who is asking and that the device is healthy, and gets only what that task needs. Three principles. How it shows up in practice. Conditional access rules such as “administrators must use a second factor” or “block sign-ins from unfamiliar countries” (Microsoft Entra Conditional Access). Short-lived credentials roles and temporary passes instead of permanent keys. Private subnets and security groups so that being inside the network grants nothing by itself.
The old model and the new
Castle and moat
Trust anyone inside the office network. Once an attacker is in, by a stolen laptop or one phishing email, they can reach everything.
Zero trust
Trust nothing by location. Each request must prove who is asking and that the device is healthy, and gets only what that task needs.
Three principles
How it shows up in practice
- Conditional access rules such as “administrators must use a second factor” or “block sign-ins from unfamiliar countries” (Microsoft Entra Conditional Access).
- Short-lived credentials roles and temporary passes instead of permanent keys.
- Private subnets and security groups so that being inside the network grants nothing by itself.
Multi-factor authentication
A stolen password opens nothing when a second proof is required
Multi-factor authentication (MFA) requires two kinds of proof, such as a password and a code from a phone.
Passwords get stolen. People reuse them, and fake login pages collect them by the thousand. So a password should never be enough. When Asha signs in, she gives her password, something she knows, and then a code from an app on her phone, something she has. Two different kinds of proof. A thief who tricked her into typing the password on a fake page has one of them. Without the phone, the sign-in stops. This single setting defeats nearly all attacks on accounts, and it costs nothing.
Multi-factor authentication · Going deeper
Single sign-on: one identity for every system
With single sign-on the clouds trust the company directory, so one account and one sign-in cover everything.
Identities for software
Software gets a temporary pass from a role, never a key stored in code
Give servers and functions a role. The platform supplies temporary credentials that expire and renew.
Applications need access too: a web server must read from a bucket. There are two ways to give it. The tempting way is to create a permanent key and type it into the code. Then the code is shared, the key travels with it, and one day it sits in a public repository. Whoever finds it can use it from anywhere, until somebody notices. The right way is a role. You attach it to the server. The identity service hands the server a pass that lasts about an hour, and replaces it before it runs out. No key is written anywhere, so there is nothing to leak.
Identities for software · Going deeper
Encryption and secrets: in transit, at rest, in a vault
Data is encrypted on the wire and on disk with keys from a key service; passwords live in a secret store.
Accounts and organisations
Separate accounts are the strongest wall, under one set of rules
An account (subscription, project) isolates resources and costs. An organisation applies guardrails to all of them.
One more tool sits above users and policies: the account itself. A company creates an organisation. It receives one bill, and it can set guardrails: rules that nobody beneath can override. Here: nothing may be created outside Europe. Under it, accounts are sorted into groups, such as production and development. And each system gets its own account. Accounts are walled off from each other completely. A developer experimenting in the sandbox cannot touch the production shop, whatever permissions they hold there. When a hard boundary is needed, a separate account is the answer.
Accounts and organisations · Going deeper · 1 of 2
Organisation, subscription, project: the levels by provider
AWS: organisation, OU, account. Azure: management group, subscription, resource group. Google: organisation, folder, project.
Accounts and organisations · Going deeper · 2 of 2
The audit log: who did what, and when
An audit log such as CloudTrail records every request with its identity, time, origin and result.
Lesson complete
You finished “Identity and access”
Nicely done.