skip to content

In a cloud platform's access model, what is a principal, and how do human, group and workload principals differ?

level: juniorimportance: must knowfreq 70%

answer

  1. who is calling, decided before what
  2. the name a grant is written against
  3. three kinds: person, group, workload
  4. a group holds grants, never calls
  5. software gets an identity of its own

basics

~20 s

A principal is the identity a platform authenticates and names when it decides whether a call is allowed: a person's login, a workload such as a batch job or service, or a group that holds grants for the humans inside it.

solid answer

~40 s

A **principal** is the named identity a request was authenticated as, and every access decision is made about it. A *human principal* is a person's login, usually federated from the company directory so that leaving the company removes it. A *workload principal* is the non-human identity a service, batch job or pipeline runs as; it is authenticated by a credential the platform issues, and it is the name that lands in the audit trail when the job writes something. A *group* is different in kind: it is a container of human principals that exists to hold grants on their behalf. It has no credential and never makes a call, so no request is ever authenticated as a group — a member's call is still made as that member.

go deeper

for a junior

Be able to say that a principal is the identity the platform authenticated, and name the three kinds: a person's login, a group that only holds grants, and the identity a job or service runs as.

for a middle

Explain why a group can never be the caller, and why a scheduled job needs its own identity rather than reusing the author's login — attribution, survival of a leaver, and a different permission set.

for a senior

Show that you diagnose by principal first: the actor in a failed call is usually not the actor the engineer had in mind, and the audit record names the member, never the group.

for a principal

Think about how principals are issued and retired across the estate: humans federated so leavers vanish, workloads named per job rather than per team, and a written rule for when a new identity is created instead of an existing one reused.

## What the platform authenticates before it authorises Every access decision a cloud platform makes has two halves. First it establishes **who is calling** — it authenticates the request and resolves it to a stable identity it issued, called the **principal**. Only then does it ask **what that principal may do**. Everything downstream hangs off the principal: the grants that are looked up, the denial message, and the line written into the audit trail of management API calls. The principal is not a person's name, a machine's address, or the team that owns the workload. It is an identifier inside the platform's own namespace. That matters because grants are written against that identifier, so two things that a human would call "the reconciliation job" — your own login when you run it by hand, and the scheduled job when it runs at night — are two different principals with two different sets of permissions. ## The three kinds you will actually name in a grant - **Human principal.** A person's login. In a mature estate these are not created locally on the platform at all; they are federated from the company directory, so a leaver disappears from the platform when HR removes them rather than when someone remembers. The principal is still a single named identity as far as the access model is concerned. - **Group.** A named container of human principals. A group is an administrative convenience: you attach grants to the group once and membership decides who gets them, so you change one membership list instead of a dozen permission documents. It is **not** a caller — it holds no credential and cannot authenticate. - **Workload principal.** The identity a running thing is: a service, a batch job, a scheduled task, a pipeline. It exists so that software has a name of its own instead of borrowing a person's. It is authenticated by a credential the platform issues to the workload rather than by a password someone types. | Kind | Can authenticate a call? | Can hold grants? | Name that appears in the audit trail | |---|---|---|---| | Human principal | Yes | Yes | The person's identity | | Group | No | Yes | Never the group — always the member who called | | Workload principal | Yes | Yes | The workload's own identity | ## Why the group row is the one that trips people Because a group holds grants, engineers start speaking about it as though it acted. It does not. When an engineer in the `platform-oncall` group deletes something, the audit record names **her**, not the group, and an investigator who searches for the group name finds nothing. The group only explains *why* she was allowed. The same asymmetry appears when a grant is attached to the resource being called rather than to the caller. Such a grant has to name the principal it applies to, and on some platforms a group is refused there outright, precisely because a group is not something that can turn up as a caller — you must name a concrete identity instead. Designs differ on this point, so the safe habit is to think of a group as a way of distributing grants to humans, not as a participant in a call. ## Why a workload gets a principal of its own Giving the nightly batch its own identity rather than letting it reuse an engineer's login buys three separate things: 1. **Attribution.** The audit trail says the job did it, not that a person who was asleep did it. 2. **Independence.** The job's access survives that engineer leaving, and the engineer leaving does not silently take production with them. 3. **A different permission set.** The job needs a narrow set of actions that is nothing like what its author needs interactively, and separate principals are the only way to express that. This is also the reason the most common cross-team failure exists at all: a write that works when you run it from your own session fails when the job runs it, because those are two principals and only one of them was granted anything. ## What an interviewer is checking They want to hear that you distinguish *who is calling* from *what is permitted*, that you know software gets an identity of its own, and that you do not describe a group as something that calls. It is a first-screen question, and the usual failure is vagueness: a candidate who says "the user" for every actor has not yet had to debug a permission problem where the actor was the surprise.

  • If the audit trail never records a group, what is the group actually good for?
    Administration. Grants attached to a group apply to everyone in it, so adding or removing a person is one membership edit rather than an edit to every permission document that mentions them. The group explains why a call was allowed; it never explains who made it, because the record names the member.
  • Why do mature estates federate human principals from the company directory instead of creating them on the platform?
    Because the joiner-mover-leaver process already exists there. A locally created login has to be remembered and deleted by hand, and the ones nobody remembers are exactly the ones that outlive the person. Federating makes removal from the directory the single act that ends platform access.
  • Can one workload have more than one principal?
    Yes, and it is often the right split. If a batch does two jobs with very different reach — reading source data and writing to a shared destination — running each step as its own identity keeps one step's compromise from carrying the other's permissions, and makes the audit trail say which step acted.

saying these in an interview costs you the question

  • Says a group makes the call and appears in the audit trail
  • Treats a person's login and the job's identity as the same actor
  • Thinks only humans can be principals and software just borrows a key
  • Believes a principal is the team or the machine rather than a platform identity
  • Cannot say what a group is for beyond 'grouping users'