Identity life cycle
Access must follow each person from joining, through moves, to leaving
Joiners are provisioned, movers lose old access, leavers are deprovisioned. Otherwise: privilege creep and orphaned accounts.
Authorisation starts long before anyone asks for a file. It starts with the identity’s life. Without a process, it goes like this. Sam joins sales and gets three applications. Sam moves to finance and gets three more, but keeps the old three. That is privilege creep. Sam leaves, and the account is still active a month later. That is an orphaned account, waiting for an attacker. With a process, the old access goes on the day of the move, and on the last day the account is disabled. Then, every quarter, managers review who has what and remove anything left over.
Access control models
Who decides: the owner, labels, a role, a rule, or attributes
Models: DAC (owner), MAC (labels), RBAC (role), rule-based, and ABAC (attributes).
Once someone is authenticated, a model decides what they may do. The models differ in who makes the decision. Discretionary: the owner decides. You share your file with a colleague. Flexible, and leaky. Mandatory: the system decides, by labels. A person cleared for Secret may read Secret files, and nobody can change the labels. Role-based: the role decides. Every nurse can read patient charts. This is how most organisations work. Rule-based: fixed rules apply to everyone, such as no logins at night. Attribute-based: a policy weighs facts about the user, the resource and the moment.
Mandatory access control · Going deeper · 1 of 2
No read up, no write down: Bell-LaPadula
In MAC, Bell-LaPadula protects confidentiality: no read up, no write down. Biba protects integrity the other way.
Access control models · Going deeper · 2 of 2
Roles group permissions by job; attributes add the context
RBAC grants by role; ABAC evaluates attributes of user, resource, action and environment on each request.
Compare the two most used models on the same request. With roles, Priya is an accountant, accountants may read and write the ledger, so she may. The answer is the same from the office at noon and from a personal laptop at three in the morning. With attributes, a policy says: finance staff, on managed devices, during working hours, may access confidential data. The request is checked against each attribute. Department: yes. Managed device: yes. Time: three twelve in the morning. No. Denied. Most organisations use both: roles for the baseline, attributes for the conditions.
Privileged access
Admin power should be borrowed for an hour, not owned all year
Privileged access management: just-in-time elevation, approval, session recording, and a password vault.
The most dangerous accounts are the administrators’. If an administrator holds those rights permanently, a stolen password is dangerous every hour of the year: eight thousand seven hundred and sixty hours. With just-in-time access, the same person is an administrator only when they need to be. Two one-hour sessions a week is a hundred and four hours a year. About one percent of the exposure. The process: request the access with a reason. Someone else approves. Rights are granted for sixty minutes. Every command is recorded. Then the rights are removed automatically.
Least privilege in practice · Going deeper
Service accounts, access reviews and break-glass accounts
Access reviews (attestation) confirm access is still needed; service accounts and break-glass accounts need special care.
Access reviews (attestation) confirm access is still needed; service accounts and break-glass accounts need special care. Keeping access small. Access reviews (attestation) managers or data owners confirm, every quarter, that each person still needs each access; anything unconfirmed is removed. Separate admin accounts administrators read email and browse from a normal account, and use the privileged one only for admin tasks. Service accounts identities used by software; give them only the rights the program needs, no interactive login, and rotate their secrets or use managed identities. Ephemeral credentials short-lived tokens issued on demand instead of passwords that live for years. Break-glass accounts. An emergency administrator account for when single sign-on or MFA fails. Its credentials are sealed in a vault or safe, any use triggers an alert, and it is tested and its password changed after each use. Least privilege applies to time as well as scope: just enough access, for just long enough.
Keeping access small
- Access reviews (attestation) managers or data owners confirm, every quarter, that each person still needs each access; anything unconfirmed is removed.
- Separate admin accounts administrators read email and browse from a normal account, and use the privileged one only for admin tasks.
- Service accounts identities used by software; give them only the rights the program needs, no interactive login, and rotate their secrets or use managed identities.
- Ephemeral credentials short-lived tokens issued on demand instead of passwords that live for years.
Break-glass accounts
An emergency administrator account for when single sign-on or MFA fails. Its credentials are sealed in a vault or safe, any use triggers an alert, and it is tested and its password changed after each use.
Single sign-on and SAML
One identity provider vouches for you, and every app trusts it
Single sign-on uses federation: apps trust signed assertions from an identity provider, via SAML or OIDC.
Single sign-on means one sign-in for every work application. Here is how one popular standard, SAML, does it. You open the payroll app. It does not know you, so it sends your browser to the company’s identity provider. You sign in there, once, with your password and passkey. The identity provider gives your browser a signed statement: this is Priya, in Finance. The browser hands it to the app. The app checks the signature against the identity provider’s certificate, and lets you in. The app never saw your password. Disable Priya once, and every app is closed to her.
Single sign-on and SAML · Going deeper · 1 of 3
OAuth lets an app act for you without ever seeing your password
OAuth 2.0 issues an access token with a limited scope. Use the authorization code flow with PKCE.
A photo-printing service wants to fetch your photos from another service. Should you give it your password? Never. OAuth exists for this. The print app sends you to the photo service’s authorization server, asking only for permission to read photos. You sign in there, not in the print app, and it asks: allow read access to your photos? You agree, and the app receives a one-time code. The app swaps the code, plus a secret it created at the start, called the PKCE verifier, for an access token valid for one hour. It calls the photo API with that token. It can read, and nothing more.
Single sign-on and SAML · Going deeper · 2 of 3
OAuth grants access; OpenID Connect adds who signed in
OpenID Connect adds an ID token, a signed JWT with the user’s identity, on top of OAuth.
OAuth answers one question: what may this app do? It does not say who you are. OpenID Connect adds that, as a signed token. Here is one, decoded. The issuer: who created and signed it. The subject: a stable identifier for the user. The audience: the one app this token is meant for. Any other app must reject it. Claims: facts such as the email address. When it was issued, and when it expires. And a nonce, so an old token cannot be replayed. The app checks the signature and these fields before trusting any of it.
Identity protocols · Going deeper · 3 of 3
SAML, OAuth and OpenID Connect side by side
SAML and OIDC authenticate users; OAuth authorises apps. LDAP, Kerberos and SCIM serve the directory.
Conditional access
Each sign-in is judged by who, which device, where and how risky
Conditional access combines identity, device, location and risk into allow, require MFA, or block.
Authorisation does not end with a role. Each sign-in can be judged on fresh evidence. Who is it? Priya, in Finance. Which device? A managed, patched laptop. Where? A country she has never signed in from. How risky does the sign-in look? Medium. A policy weighs these signals, on every sign-in and every time a token is renewed. It can allow the sign-in, ask for more proof, or block it. Here it asks for her passkey. This is zero trust at work: no request is trusted because of where it comes from.
Lesson complete
You finished “Authorisation and access”
Nicely done.