Auth MechanicsAUTHENTICATION & AUTHORIZATION, FROM THE WIRE UP.
LESSON 33 OF 40

Keep access within the correct tenant and task.

A tenant is a customer or organization using a shared service. An application programming interface (API) must check the user’s tenant, the resource’s tenant, and the permissions delegated to any acting service or agent.

Why this lesson?

An agent helps a user from tenant A read an order. The agent has wider service access, but it must not use that access to read another tenant’s order.

Learning goal and prerequisites
ONE NEW IDEA A tenant is a customer or organization using a shared service. An application programming interface (API) must check the user’s tenant, the resource’s tenant, and the permissions delegated to any acting service or agent.
Review the previous lesson if any of these terms are new. The link below opens that lesson.
Request sequence Authorization sequence
STEP 01

Request the order

The application treats the requested web address as input that the caller can change. It validates the credential, identifies the user and agent, and loads the actual tenant information for the order from trusted data.

Inspect request, response, and claims
Traffic inspector Examples only · not real requests
Try a failure scenario

↳ Change a condition

Read the detailed explanation
Key explanation

Why it exists, how it works, and where it fits

Multi-tenant systems and delegated workflows create two kinds of risk at once. A request may cross from one customer’s data into another customer’s data, and a service or agent may have more authority than the user task actually needs. Tenant and delegation boundaries keep those powers separated.

A tenant boundary makes sure that a user or service operating for tenant A cannot reach tenant B’s resources simply by changing an identifier in the request. The application should load the resource’s real tenant from trusted data and compare it with the verified identity and token context.

A delegation boundary limits the authority passed to another service or agent. The downstream component should receive only the actions, resources, recipients, and time period needed for its part of the task. Broad service privileges should not silently replace the user’s narrower grant.

These checks are useful because a valid credential can still be dangerous at the wrong boundary. The system should validate user authority, service authority, tenant membership, and the actual resource together. Audit records should also preserve who acted, for whom, and under which delegated permission.

Check your understanding
Lesson checkpoint

Pass the lesson quiz

Answer every question correctly to unlock the next lesson. Retry as often as you need.

Glossary Definitions of technical terms