Skip to main content

Configure It Yourself

Use this page to build the Wayfinder AI agent setup manually instead of importing the declarative bundle from See It in a Sample App. Pick this path when you want to see exactly what gets created, adapt the setup to your own project, or learn the moving parts step by step. The end state is identical. Every walkthrough works against either path.

The first section is the shared foundation, required regardless of which walkthroughs you plan to exercise. The remaining sections build on it.

Set Up the Foundation​

The foundation creates the two resource servers, three roles, two demo users, and the OAuth application that Wayfinder Web uses to sign users in.

Every API call below needs an access token with the system scope. Obtain one for an administrator and export it, so the calls that follow can reuse it:

bash
export TOKEN="<access-token>"

Each call then sends -H "Authorization: Bearer $TOKEN".

  1. Create the wayfinder-agent resource server.

    Invoke the Resource Management API to create the resource server. Set the identifier to http://localhost:8790/chat, the chat API audience. Replace <organization-unit-id> with the ID of your default organization unit (look it up via GET /organization-units):

    bash
    curl -kL -X POST https://localhost:8090/resource-servers \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TOKEN" \
    -d '{
    "name": "Wayfinder Agent",
    "description": "Controls access to the Wayfinder Concierge agent",
    "identifier": "http://localhost:8790/chat",
    "ouId": "<organization-unit-id>",
    "delimiter": ":"
    }'

    Add a resource with handle agent under it:

    bash
    curl -kL -X POST https://localhost:8090/resource-servers/<wayfinder-agent-rs-id>/resources \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TOKEN" \
    -d '{ "name": "Agent", "handle": "agent" }'

    Then add one action under the resource:

    bash
    curl -kL -X POST https://localhost:8090/resource-servers/<wayfinder-agent-rs-id>/resources/<agent-resource-id>/actions \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TOKEN" \
    -d '{ "name": "Access", "handle": "access" }'
    ActionGenerated permission
    accessagent:access

    See Resource Servers.

  2. Create the wayfinder resource server.

    Invoke the Resource Management API again. The identifier is http://localhost:8787/mcp, a URL-shaped identifier per RFC 8707 that matches what the Wayfinder MCP server advertises in /.well-known/oauth-protected-resource. MCP Inspector reads that metadata and passes the value back as resource=... on /oauth2/token; ThunderID would reject the request with invalid_target otherwise. This resource server protects both the REST surface (/api/*) and the MCP surface (/mcp) of the Wayfinder server. Both check the same booking:* permissions:

    bash
    curl -kL -X POST https://localhost:8090/resource-servers \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TOKEN" \
    -d '{
    "name": "Wayfinder Booking",
    "description": "Protects the Wayfinder booking domain (REST and MCP surfaces)",
    "identifier": "http://localhost:8787/mcp",
    "ouId": "<organization-unit-id>",
    "delimiter": ":"
    }'

    Add a resource with handle booking:

    bash
    curl -kL -X POST https://localhost:8090/resource-servers/<wayfinder-rs-id>/resources \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TOKEN" \
    -d '{ "name": "Booking", "handle": "booking" }'

    Then add four actions under the resource. Repeat the call below for each handle (read, create, cancel, recommend):

    bash
    curl -kL -X POST https://localhost:8090/resource-servers/<wayfinder-rs-id>/resources/<booking-resource-id>/actions \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TOKEN" \
    -d '{ "name": "Read", "handle": "read" }'
    ActionGenerated permission
    readbooking:read
    createbooking:create
    cancelbooking:cancel
    recommendbooking:recommend

    Configure the booking resource server as the default for Wayfinder web sign-in tokens. The web application requests booking:* permissions without a resource, so the default must be the resource server that defines those permissions. The chat widget targets http://localhost:8790/chat explicitly.

    bash
    curl -kL -X PUT https://localhost:8090/server-config/defaultResourceServer \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TOKEN" \
    -d '{ "resourceServerId": "<wayfinder-rs-id>" }'
  3. Create the Chat User role.

    Send a POST to /roles. The role grants agent:access on the wayfinder-agent resource server:

    bash
    curl -kL -X POST https://localhost:8090/roles \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TOKEN" \
    -d '{
    "name": "Chat User",
    "description": "Grants access to use the Wayfinder Concierge agent",
    "ouId": "<organization-unit-id>",
    "permissions": [
    {
    "resourceServerId": "<wayfinder-agent-rs-id>",
    "permissions": ["agent:access"]
    }
    ]
    }'
  4. Create the Booking User role.

    Grant it booking:read, booking:create, and booking:cancel on wayfinder:

    bash
    curl -kL -X POST https://localhost:8090/roles \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TOKEN" \
    -d '{
    "name": "Booking User",
    "description": "Grants booking permissions for the Wayfinder sample",
    "ouId": "<organization-unit-id>",
    "permissions": [
    {
    "resourceServerId": "<wayfinder-rs-id>",
    "permissions": ["booking:read", "booking:create", "booking:cancel"]
    }
    ]
    }'
  5. Create the Recommender role.

    Grant it booking:recommend on wayfinder. This role will be assigned to the Wayfinder Concierge in a later step, not to a user:

    bash
    curl -kL -X POST https://localhost:8090/roles \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TOKEN" \
    -d '{
    "name": "Recommender",
    "description": "Grants the booking:recommend permission to the Wayfinder Concierge",
    "ouId": "<organization-unit-id>",
    "permissions": [
    {
    "resourceServerId": "<wayfinder-rs-id>",
    "permissions": ["booking:recommend"]
    }
    ]
    }'

    See Authorization.

  6. Create the Customer user type.

    Navigate to User types → Add user type. Name it Customer and define the schema with the attributes the agent needs to issue claims for:

    AttributeTypeRequiredNotes
    usernamestringYesUnique
    passwordstringNoMarked as a credential
    emailstringYesUnique
    given_namestringNo
    family_namestringNo

    See User Types.

  7. Create the two demo users.

    Navigate to Users → Add user. Select the Customer user type and create:

    UsernamePassword
    john.doejohn.doe
    jane.smithjane.smith

    See Manage Users.

  8. Assign user roles.

    • Roles → Chat User → Assignments tab → Add assignment. Pick User and assign john.doe.
    • Roles → Booking User → Assignments tab → Add assignment. Pick User and assign both john.doe and jane.smith.
  9. Register the WAYFINDER application.

    Navigate to Applications → Add application and choose Browser app as the type. Configure:

    SettingValue
    Client IDWAYFINDER
    Redirect URIhttp://localhost:5173
    Allowed grantsauthorization_code
    PKCERequired
    Allowed user typesCustomer

    See Manage Applications.

Build the Agent Authentication Flow​

The Wayfinder sample uses an authentication flow to sign customers in and collect consent when they use the agent. This is separate from the Administration flow that an administrator runs to create the agent. Use an existing authentication flow with these steps, or configure the sample's flow below.

In Flows, create an Authentication flow named Wayfinder Agent Sign-in with these steps:

  1. A PROMPT node asking for username and password.
  2. A TASK_EXECUTION node running CredentialsAuthExecutor.
  3. A TASK_EXECUTION node running AuthorizationExecutor.
  4. A TASK_EXECUTION node running ConsentExecutor, with a consent prompt on its incomplete path. Route both consent decisions back to the executor.
  5. A TASK_EXECUTION node running AuthAssertExecutor on success, followed by END.

Use the wayfinder-agent-auth-flow definition in the sample distribution's thunderid-config/redirect/thunderid-config.yaml as the complete wiring reference. See Build a Multi-Factor Sign-In Flow for using the builder.

Register the Wayfinder Concierge Agent​

For agent creation, use an Administration flow with Delegated Agent Details and Delegated mode enabled on Provisioning, or Choose Agent Mode for an administrator-selected mode. The OBO and Choose Mode templates include these settings. Set this onboarding flow as the Console default.

  1. Navigate to Agents. Click Add agent.
  2. Select the organization unit and owner when prompted. In Agent Details, set the Name schema attribute to WAYFINDER-CONCIERGE.
  3. If the flow asks for a mode, select Act on behalf of a signed-in user.
  4. Set Authorized redirect URIs to http://localhost:5173/agent-callback. For Login flow, select Wayfinder Agent Sign-in or the existing authentication flow you configured for the sample. Select Customer as the User type.
  5. Complete onboarding. Copy the client ID and client secret for ai-agent/.env; the secret is shown only once.
  6. In Roles → Recommender → Assignments, click Add assignment. Select Agent and assign WAYFINDER-CONCIERGE.

The Administration flow saves these settings during creation. It does not run the customer's sign-in flow. See Create and Manage Agents for subsequent changes.

Start the Sample​

With every resource in place, follow the commands in the Wayfinder sample's README, passing the agent client secret you captured when you registered the agent.

Explore with AI

ThunderID LogoThunderID Logo

Product

DocsAPIsSDKs
© Copyright Linux Foundation Europe.For web site terms of use, trademark policy and other project policies please see https://linuxfoundation.eu/en/policies.