İçeriğe geç

Checkpoint challenge

Bu içerik henüz dilinizde mevcut değil.

Original, hands-on practice. Never modeled on actual exam questions. This closes the chapter Agents and Identity, chapter 17 of Securing Salesforce: Identity and Access.

The Burger House from chapter 11 has grown. It now runs an agent: every night it tidies up orders in Salesforce, and on Fridays it updates Priya’s standing order for her, as her. Same agent, two jobs. One is its own work. The other is Priya’s.

In part 1, you give the agent’s app both doors from module 2, and see what each one leaves behind: whose name is on the change, and what Login History says. In part 2, you leave the lab and design the identity of three agents at Steve Trucking, on paper.

  • One external client app, the Burger House, with two flows: client credentials, running as the agent’s own integration user; and JWT bearer, acting as Priya.
  • One change each way, to a record you can see.
  • Whose name is on each change, and what Login History shows for each login.
  • Three agents designed: a lane drawing and an identity card each.
  • Lab orgs only. No company data, nothing personal.
  • Never an administrator as the agent’s user.
  • Keep secrets and keys out of shared places. The consumer secret and server.key stay on your machine.
  • Put it away afterwards (step 8).

1. Give the agent its own user. In the org you used in chapters 8 and 11, create a user called “Burger House Agent,” with the Salesforce Integration license and the Minimum Access - API Only Integrations profile, as in chapter 8. Give it a permission set that lets it read and edit Accounts, and nothing else. This is the agent acting as itself: its own identity, never a shared one (module 2).

2. Open the second door on the same app. Open the Burger House external client app from chapter 11. In its settings, enable the client credentials flow beside the JWT bearer flow; in its policies, set the client credentials flow’s execution user to Burger House Agent. This course hasn’t yet tested one external client app carrying both flows; if the settings won’t allow it, make a second app for the agent. Priya stays the only person allowed to use the JWT bearer flow, through her permission set.

3. As itself. From the terminal, get a token with client credentials, as you did in chapter 8: your My Domain’s token endpoint, the app’s consumer key and secret. Then update a different Account, one Priya doesn’t own, by adding a line to its Description: “Tidied by the agent.” Open the Account. Who’s in Last Modified By?

4. As Priya. Build and sign a JWT for Priya, as in chapter 11, and present it. With the token, update Priya’s Account’s Description: “Standing order updated for Priya.” Who’s in Last Modified By now?

5. Try to cross over. With Priya’s token, try to update the Account from step 3. With the agent’s token, try to read something only Priya can see, if your lab has it. Each token carries exactly one identity’s access, and nothing more.

6. Find both in the logs. Open Login History (chapter 16, module 2) and find the two logins. For each one, note the user, the application, the login type and the login subtype. This course hasn’t yet recorded what Login History shows for each. Could someone who reads only Login History tell which was the agent’s own work and which was Priya’s?

7. Write the identity card. One paragraph for the Burger House agent: its owner (you), its own user and what it may do, who it may act for and how, its app’s token policy, and how to stop it in a hurry.

8. Put it away. Turn off the client credentials flow on the app, deactivate Burger House Agent, and delete server.key if you’re done with chapter 11’s lab.

No org for this part. A page, a pencil, and module 1’s two questions.

Steve Trucking delivers, and sometimes installs, goods for Retail Partners, the large retailers, to their customers, the Recipients. The Data Architect course designed what three of its agents may see. Here, you design who they are.

  • The care team’s agent. Helps a care agent in Salesforce summarize a delayed delivery and draft a reply.
  • The Recipient’s agent. On the tracking page and by text message, answers “where’s my delivery?” for a Recipient who has no Salesforce login.
  • The nightly reconciliation agent. Every night, matches Steve Trucking’s deliveries with each Retail Partner’s own order system.

9. Draw the lanes. For each agent, a swim lane, like module 1’s: the person (if any), the agent, Salesforce, and anything outside. Every call with its answer underneath.

10. Answer the two questions at every arrow. Who is this? Who is it acting for?

11. Fill in an identity card for each:

The care team’s agentThe Recipient’s agentThe reconciliation agent
Runs as
Comes in through
Acts for
Public and private actions
Each hop: on-behalf-of, server-to-server or in-task
Owner
How you’d stop it
  • Part 1: why does the same app leave two different names? Because the token decides who the request runs as, not the app. Client credentials gave the agent’s own user; JWT bearer gave Priya. One app, two identities, exactly as module 2’s table says.
  • Who would you blame for the step 3 change if the agent had used a shared integration user? Nobody in particular. That’s why the agent gets its own.
  • The care team’s agent: an employee agent, so it runs as the care agent (module 1). No new door, no new user.
  • The Recipient’s agent: a service agent, running as its agent user. “Where’s my delivery?” is a private action, so it needs a verified Recipient first, a code to the phone on the delivery, and every query scoped to that delivery (module 3).
  • The reconciliation agent: its own work, so client credentials as its own user, into Salesforce. Out to each partner: server-to-server if the data is the partner’s business, never a person’s token (modules 2 and 4). Its owner is a person, not a team mailbox (module 6).
  • Two changes, two names in Last Modified By: Burger House Agent and Priya.
  • Each token refused for the other’s work.
  • Both logins found in Login History.
  • The client credentials flow off, Burger House Agent deactivated, keys deleted.
  • Three identity cards, every row filled.