Identity life cycle

Access must follow each person from joining, through moves, to leaving

Access held by one person, in applicationsWithout a processWith joiner, mover, leaver stepsJoins: salesMoves: financeLeavesold access keptstill active30 days laterJoins: salesMoves: financedisabled the same dayLeavessales removedAccess must follow each person from joining, through every move, to the day they leave.Joiners get the access their role needs (provisioning). Movers get the new role’s access and lose the old one;skipping that step causes privilege creep. Leavers are disabled at once (deprovisioning): accounts left behind,called orphaned accounts, are a favourite way in. Regular access reviews catch whatever the process misses.

Joiners are provisioned, movers lose old access, leavers are deprovisioned. Otherwise: privilege creep and orphaned accounts.

Access control models

Who decides: the owner, labels, a role, a rule, or attributes

ModelWho decidesExampleDACDiscretionarythe owner of the resourceyou share a file with a colleagueMACMandatorythe system, by labels nobody can changeSecret clearance reads Secret filesRBACRole-basedthe role a person holdsnurses read patient chartsRule-basedRule-basedfixed rules for everyoneno logins between 22:00 and 06:00ABACAttribute-basedattributes of user, resource, contextfinance + managed laptop + office hoursAccess models differ in who makes the decision: the owner, the system’s labels, a role, a rule, or attributes.DAC is flexible and leaky: owners share freely. MAC is rigid and strong, used where classification rules: themilitary, intelligence. RBAC is how most organisations work. ABAC adds context, such as device and time, and isthe basis of zero trust. Real systems combine them: roles for the baseline, attributes for the conditions.

Models: DAC (owner), MAC (labels), RBAC (role), rule-based, and ABAC (attributes).

Mandatory access control · Going deeper · 1 of 2

No read up, no write down: Bell-LaPadula

Top SecretSecretConfidentialUnclassifiedCleared: Secret✗ no read up✓ read down✗ no write down: a Secret document cannot be saved as ConfidentialMandatory access control labels every file and person; the Bell-LaPadula rules keep secrets from leaking down.The simple security rule: no read up (you cannot read above your clearance). The star property: no write down(you cannot copy what you know into a lower, less protected level). Users cannot change labels; only the systemand its administrators can. Biba is the mirror for integrity: no read down, no write up.

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: is the role allowed?PriyaRoleAccountantLedgerread, writeSame answer from home at 3 a.m. ona personal laptop as from the office.ABAC: do the attributes satisfy the policy?user.departmentfinance✓device.managedyes✓request.time03:12✗ not 07:00–19:00resource.classconfidential✓Policy: finance staff on managed devices,during working hours. Result: denied.Roles group permissions by job; attributes add the context of each request, such as device and time.RBAC is simple to audit: list the roles and who holds them. Its weakness is role explosion, hundreds of rolesfor every variation. ABAC writes one policy over attributes of the user, the resource, the action and theenvironment, and evaluates it on every request. Cloud IAM conditions and conditional access are ABAC.

RBAC grants by role; ABAC evaluates attributes of user, resource, action and environment on each request.

Privileged access

Admin power should be borrowed for an hour, not owned all year

Hours a year that one administrator account can do damageStanding admin rights8,760 hJust-in-time, two 1-hoursessions a week104 h: 1.2% of the yearRequestwith a reason, a ticketApproveby a second personElevatefor 60 minutes onlyRecordevery command, videoRevokeautomaticallyPasswords for shared admin accounts live in a vault, are checked out, and are changed after every use.Administrator power should be borrowed for an hour with approval, not owned around the clock.Privileged accounts are the attacker’s goal in almost every serious breach. Privileged access management (PAM)removes standing rights: elevation is requested, approved, time-boxed, recorded and removed. A stolen adminpassword is then worthless most of the time. Everyday work happens from a separate, unprivileged account.

Privileged access management: just-in-time elevation, approval, session recording, and a password vault.

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.

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.

Single sign-on and SAML

One identity provider vouches for you, and every app trusts it

You, in a browserThe app (service provider)Identity provider1 open the payroll app2 not signed in: go to the identity provider3 sign in once: password + passkey4 a signed assertion: “this is Priya, in Finance”5 handed to the app: signature checked, inWith single sign-on, one identity provider vouches for you, and every app trusts its signed statement.The app never sees your password; it trusts a digitally signed assertion from the identity provider (IdP), whichis federation. SAML does this with signed XML and is common for workplace apps; OpenID Connect does the samewith JSON tokens. Disable one account at the IdP and access to every connected app ends.

Single sign-on uses federation: apps trust signed assertions from an identity provider, via SAML or OIDC.

Single sign-on and SAML · Going deeper · 1 of 3

OAuth lets an app act for you without ever seeing your password

YouPhoto-print appAuthorization serverPhoto API1 scope photos.read + PKCE challenge2 sign in and consent: “allow read access to photos?”3 a one-time code, via the browser4 code + verifier → token, 1 hour5 GET /photos with the token: read onlyYour password never reaches the app.OAuth lets an app act for you, within limits you approve, without ever seeing your password.The app receives an access token with a scope (read photos, nothing else) and an expiry. The authorization codeflow with PKCE is the recommended flow for every kind of app: PKCE proves the app that started the flow is the oneredeeming the code. You can revoke the app’s access at any time without changing your password.

OAuth 2.0 issues an access token with a limited scope. Use the authorization code flow with PKCE.

Single sign-on and SAML · Going deeper · 2 of 3

OAuth grants access; OpenID Connect adds who signed in

A decoded ID token (a JWT): header . payload . signature{} + signature by the issuer’s private key"iss": "https://login.example.com",issuerwho signed it"sub": "248289761001",subjecta stable ID for the user"aud": "photo-print-app",audiencethe only app it is for"email": "priya@example.com",claimsfacts about the user"iat": 1763200000, "exp": 1763203600,issued, expiresone hour later"nonce": "n-0S6_WzA2Mj"noncestops replaying old tokensOAuth hands out access; OpenID Connect adds a signed ID token that says who signed in.OAuth on its own says “this app may read photos”, not “this is Priya”. OpenID Connect is a thin identity layer ontop of OAuth that returns an ID token: a JSON Web Token signed by the identity provider. The app checks thesignature, that it is the audience, and that the token has not expired. “Sign in with Google” is OIDC.

OpenID Connect adds an ID token, a signed JWT with the user’s identity, on top of OAuth.

Identity protocols · Going deeper · 3 of 3

SAML, OAuth and OpenID Connect side by side

SAML 2.0OAuth 2.0OpenID ConnectAnswerswho is this user?what may this app do?who is this user?Purposeauthentication (SSO)authorisation (delegation)authentication on OAuthTokensigned XML assertionaccess token (often a JWT)ID token (a JWT)Typical useworkplace apps, Entra, OktaAPIs, “allow this app to…”consumer and mobile sign-inYear2005, OASIS2012, IETF RFC 67492014, OpenID FoundationTwo protocols prove identity, one delegates access. Exams ask which one fits a scenario.Single sign-on to business apps: SAML or OIDC. Letting one service use another’s API on your behalf: OAuth.Directory lookups inside a company network use LDAP (secure it with LDAPS); Windows domain sign-in usesKerberos tickets. SCIM provisions and removes accounts in cloud apps automatically from the identity provider.

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

WhoPriya, FinanceDevicemanaged, patchedWherenew countryRiskunusual sign-in: mediumPolicy decisionevaluated on every sign-inand every token refreshAllownormal sign-inRequire morea passkey or MFA againBlocktoo riskyConditional access decides each sign-in from who, which device, where and how risky, not from a password alone.Here Priya’s device is healthy but the location is new, so the policy asks for a passkey before letting her in.This is zero trust in practice: a policy decision point evaluates every request with fresh signals, and a policyenforcement point carries out the answer. Microsoft Entra calls it Conditional Access.

Conditional access combines identity, device, location and risk into allow, require MFA, or block.

Lesson complete

You finished “Authorisation and access”

Nicely done.

Open in a new tab