Skip to content

Commit 19409a7

Browse files
Merge branch 'latest' into W-21162798-Combine-overviews-for-agent-network/agent-fabric-ie
2 parents 8dfd928 + 69d8944 commit 19409a7

2 files changed

Lines changed: 165 additions & 33 deletions

File tree

modules/ROOT/pages/af-project-files.adoc

Lines changed: 159 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ tools:
342342
name: talent-pool-mcp # Exchange asset ID of MCP server. By default, the groupId for this asset is the same as that in exchange.json.
343343
allowed: # Allowlist specific tools
344344
- TalentPoolMcpServer.match_email_to_address
345+
headersToPropagate:
346+
- Authorization
347+
- X-Correlation-Id # Optional. Header names to forward when invoking this tool.
345348
- mcp:
346349
ref:
347350
name: slack-mcp
@@ -358,6 +361,7 @@ The `tools` element has these properties.
358361
|`mcp.ref` |The reference to the MCP server that is available to this broker. |String |See <<mcp-servers-section,MCP Servers>> |Yes
359362
|`mcp.connection.ref` |Connection reference. |String |See <<connections-section,Connections>> |No
360363
|`mcp.allowed` |Filters the list of tools advertised by the MCP server to only those in this list. Mutually exclusive with 'denied'. |Array of strings |Array of tool name strings |No
364+
|`mcp.headersToPropagate` |The names of the request headers to propagate when the broker invokes this tool. |Array of strings |Array of header name strings |No
361365
|===
362366

363367
[[links-section]]
@@ -376,6 +380,9 @@ links:
376380
ref:
377381
name: hr-agent # Exchange asset ID of the linked agent. By default, the groupId for this asset is the same as that in exchange.json.
378382
namespace: # Optional. If the asset was defined in a different business group, set the corresponding groupId here.
383+
headersToPropagate:
384+
- Authorization
385+
- X-Correlation-Id # Optional. Header names to forward when invoking this agent.
379386
- agent:
380387
ref:
381388
name: badging-agent
@@ -415,6 +422,7 @@ The `links` element has these properties.
415422
|`links[].agent.ref.name` |Exchange asset ID of the linked agent. This references the `assetId` that the agent has in Anypoint Exchange, not the human-friendly name.|String|Asset ID string (for example, "hr-agent", "crm-agent"). By default, the groupId for this asset is the same as that in exchange.json|Yes
416423
|`links[].agent.ref.namespace` |Business group ID (groupId) where the asset is defined. Use this when the asset was defined in a different business group than the current one.|String|Group ID string. To find the groupId, look in the `dependencies` section in `exchange.json`|No
417424
|`links[].agent.connection.ref` |Connection reference.|String|See <<connections-section,Connections>>. This references a connection defined in the `connections` section|No
425+
|`links[].agent.headersToPropagate` |The names of the request headers to propagate when the broker invokes this agent.|Array of strings|Array of header name strings |No
418426
|===
419427

420428

@@ -779,7 +787,7 @@ The `connections` element has these properties.
779787
|`spec` |Connection specification. Properties vary by connection kind. |Object |Object with spec properties (See <<spec-section,Spec>>) |Yes
780788
|`spec.url` |The URL for the connection endpoint. |String |Valid URL string |Yes (for agent and llm), No (for mcp)
781789
|`spec.authentication` |Authentication configuration for the connection. |Object |Authentication object (See <<authentication-types,Authentication types>>) |No
782-
|`spec.authentication.kind` |The type of authentication. |String |`basic`, `oauth2-client-credentials`, `apikey-client-credentials`, `apiKey` |Yes (when authentication is specified)
790+
|`spec.authentication.kind` |The type of authentication. |String |`basic`, `oauth2-client-credentials`, `apikey-client-credentials`, `apiKey`, `in-task-authorization-code`, and `oauth2-obo` |Yes (when authentication is specified)
783791
|`spec.authentication.username` |The username for basic authentication. |String |Any string value |Yes (for basic auth)
784792
|`spec.authentication.password` |The password for basic authentication. |String |Any string value |Yes (for basic auth)
785793
|`spec.authentication.headerName` |The name of the header in which to set the key. If not specified, 'Authorization' is set by default. |String |Any string value |No
@@ -864,7 +872,7 @@ Both agents and MCP servers support the same authentication types with custom he
864872
[source,yaml]
865873
----
866874
authentication:
867-
Kind: basic
875+
kind: basic
868876
username: "username"
869877
password: "password"
870878
----
@@ -879,6 +887,18 @@ kind: basic
879887
headerName: X-API-Authorization # Custom header instead of default "Authorization"
880888
----
881889

890+
The `basic` authentication has these properties.
891+
892+
[cols="1,2,1,2,1",options="header"]
893+
|===
894+
|Parameter |Description |Type |Valid Values |Required
895+
896+
|`kind` |Authentication type. |String |`basic` |Yes
897+
|`username` |The username for authentication. |String |Any string |Yes
898+
|`password` |The password for authentication. |String |Any string |Yes
899+
|`headerName` |The name of the header in which to set the credentials. If not specified, `Authorization` is used. |String |Any string |No
900+
|===
901+
882902
[[oauth-client-credentials]]
883903
==== OAuth 2.0 Client Credentials
884904

@@ -888,10 +908,29 @@ authentication:
888908
kind: oauth2-client-credentials
889909
clientId: "client_id"
890910
clientSecret: "client_secret"
891-
tokenUrl: "https://oauth.provider.com/token"
911+
token:
912+
url: "https://oauth.provider.com/token"
913+
bodyEncoding: form
914+
timeout: 300
892915
scopes: ["read", "write"] # Optional
893916
----
894917

918+
The `oauth2-client-credentials` authentication has these properties.
919+
920+
[cols="1,2,1,2,1",options="header"]
921+
|===
922+
|Parameter |Description |Type |Valid Values |Required
923+
924+
|`kind` |Authentication type. |String |`oauth2-client-credentials` |Yes
925+
|`clientId` |The client ID. |String |Any string |Yes
926+
|`clientSecret` |The client secret. |String |Any string |Yes
927+
|`token` |Configuration for fetching the token. |Object |Object with token properties |Yes
928+
|`token.url` |The URL of the token provider. |String |Valid URL |Yes
929+
|`token.timeout` |Time in seconds to wait for the service to return the token. |Number |Any number |No
930+
|`token.bodyEncoding` |The encoding format for the token request body. |String |`form`, `json` |No
931+
|`scopes` |An array of scopes to request. |Array |Array of scope strings |No
932+
|===
933+
895934
[[anypoint-client-credentials]]
896935
==== Anypoint Client Credentials
897936

@@ -903,6 +942,17 @@ authentication:
903942
clientSecret: "client_secret"
904943
----
905944

945+
The `apikey-client-credentials` authentication has these properties.
946+
947+
[cols="1,2,1,2,1",options="header"]
948+
|===
949+
|Parameter |Description |Type |Valid Values |Required
950+
951+
|`kind` |Authentication type. |String |`apikey-client-credentials` |Yes
952+
|`clientId` |The client ID. |Object |Object with `value` and optional `name` (default header name is `client_id`) |Yes
953+
|`clientSecret` |The client secret. |Object |Object with `value` and optional `name` (default header name is `client_secret`) |Yes
954+
|===
955+
906956
[[api-key]]
907957
==== API Key Authentication
908958

@@ -924,6 +974,112 @@ authentication:
924974
headerName: X-Custom-Auth-Token # Custom header name
925975
----
926976

977+
The `apiKey` authentication has these properties.
978+
979+
[cols="1,2,1,2,1",options="header"]
980+
|===
981+
|Parameter |Description |Type |Valid Values |Required
982+
983+
|`kind` |Authentication type. |String |`apiKey` |Yes
984+
|`apiKey` |The value of the API key. |String |Any string |Yes
985+
|`headerName` |The name of the header in which to set the key. If not specified, `Authorization` is used. |String |Any string |No
986+
|===
987+
988+
[[in-task-auth]]
989+
==== In-Task Authorization Code
990+
991+
Use `in-task authorization code` when the connection needs secondary credentials obtained during a task using the OAuth 2.0 Authorization Code flow. OAuth2 tokens are extracted from message data and injected into the `Authorization` header for upstream calls. This supports step-up or in-task authentication (for example, when a user must re-authenticate for a sensitive action). For more information about the associated policy, see xref:gateway::policies-outbound-a2a-intask-authorization-code.adoc[].
992+
993+
[source,yaml]
994+
----
995+
authentication:
996+
kind: in-task-authorization-code
997+
secondaryAuthProvider: providerName
998+
authorizationEndpoint: https://oauth.provider.com/authorize
999+
tokenEndpoint: https://oauth.provider.com/token
1000+
scopes: Read
1001+
redirectUri: https://oauth.provider.com/callback
1002+
responseType: code
1003+
tokenAudience: https://api.example.com/agents/my-agent
1004+
codeChallengeMethod: S256
1005+
bodyEncoding: form
1006+
challengeResponseStatusCode: 200 #Optional, Status code for challenge response. Default: 200.
1007+
tokenTimeout: 300 #Optional. Timeout in seconds for token requests. Default: 300.
1008+
----
1009+
1010+
The `in-task-authorization-code` authentication has these properties.
1011+
1012+
[cols="1,2,1,2,1",options="header"]
1013+
|===
1014+
|Parameter |Description |Type |Valid Values |Required
1015+
1016+
|`kind` |Authentication type. |String |`in-task-authorization-code` |Yes
1017+
|`authorizationEndpoint` |OAuth2 authorization endpoint URL. Used to generate the authentication challenge. |String |Valid URL |Yes
1018+
|`tokenEndpoint` |OAuth2 token endpoint URL. Used to generate the authentication challenge. |String |Valid URL |Yes
1019+
|`scopes` |OAuth2 scopes required for step-up authentication. |String |Space- or comma-separated scope list (for example, `openid profile email`) |Yes
1020+
|`redirectUri` |OAuth2 redirect URI the client uses in the authorization flow. |String |Valid URI |Yes
1021+
|`secondaryAuthProvider` |Name of the IdP (for example, `okta`, `auth0`). Informational only, for the authentication card. |String |Any string |No
1022+
|`responseType` |OAuth2 response type. |String |Typically `code`. Default: `code` |No
1023+
|`codeChallengeMethod` |PKCE code challenge method. |String |Typically `S256`. Default: `S256` |No
1024+
|`tokenAudience` |Intended recipient of the token (for example, `agent1` or API URL). |String |Any string |No
1025+
|`bodyEncoding` |Encoding for the token request body. |String |`form`, `json`. Default: `form` |No
1026+
|`tokenTimeout` |Timeout in seconds for token requests. |Integer |Positive integer. Default: 300 |No
1027+
|`challengeResponseStatusCode` |HTTP status code returned for auth-required challenge responses. Typically 200 for JSON-RPC compatibility. |Integer |HTTP status code. Default: 200 |No
1028+
|===
1029+
1030+
1031+
[[obo-credential-injection]]
1032+
==== OAuth 2.0 OBO Credential Injection
1033+
1034+
This authentication type supports OAuth 2.0 Token Exchange and Microsoft Entra ID On-Behalf-Of protocols. For more information about the associated policy, see xref:gateway::policies-outbound-oauth-obo.adoc[].
1035+
1036+
Using OAuth 2.0 Token Exchange:
1037+
1038+
[source,yaml]
1039+
----
1040+
authentication:
1041+
kind: oauth2-obo
1042+
flow: oauth2-token-exchange
1043+
tokenEndpoint: https://oauth.provider.com/token
1044+
clientId: clientId
1045+
clientSecret: clientSecret
1046+
targetType: audience
1047+
targetValue: https://api.example.com/agents/my-agent
1048+
scope: Read #optional, OAuth 2.0 scope to request. Required for Microsoft Entra OBO (for example, api://downstream-client-id/.default). Optional for OAuth 2.0 Token Exchange (RFC 8693).
1049+
timeout: 5000 #optional, Timeout for token exchange requests in milliseconds. Default: 10000.
1050+
----
1051+
1052+
Using Microsoft Entra ID On-Behalf-Of:
1053+
1054+
[source,yaml]
1055+
----
1056+
authentication:
1057+
kind: oauth2-obo
1058+
flow: microsoft-entra-obo
1059+
tokenEndpoint: https://oauth.provider.com/token
1060+
clientId: clientId
1061+
clientSecret: clientSecret
1062+
scope: api://downstream-client-id/.default
1063+
timeout: 5000 #optional, Timeout for token exchange requests in milliseconds. Default: 10000.
1064+
----
1065+
1066+
The `oauth2-obo` authentication has these properties.
1067+
1068+
[cols="1,2,1,2,1",options="header"]
1069+
|===
1070+
|Parameter |Description |Type |Valid Values |Required
1071+
1072+
|`kind` |Authentication type. |String |`oauth2-obo` |Yes
1073+
|`flow` |Token exchange flow type. |String |`oauth2-token-exchange`, `microsoft-entra-obo` |Yes
1074+
|`clientId` |OAuth2 client ID for token exchange. |String |Any string |Yes
1075+
|`clientSecret` |OAuth2 client secret for token exchange. |String |Any string |Yes
1076+
|`tokenEndpoint` |OAuth2 token endpoint URL for token exchange. |String |Valid URL |Yes
1077+
|`targetType` |Parameter type for specifying the target service (audience for logical name, resource for physical URI). Used for OAuth 2.0 Token Exchange. |String |`audience`, `resource`. Default: `audience` |No
1078+
|`targetValue` |Target audience URI or resource URI for the exchanged token. Required for OAuth 2.0 Token Exchange. |String |Valid URI |Required when using `oauth2-token-exchange` with a target
1079+
|`scope` |OAuth scope to request. Required for Microsoft Entra OBO (e.g. `api://downstream-client-id/.default`). Optional for OAuth 2.0 Token Exchange. |String |Any string |Required for `microsoft-entra-obo`
1080+
|`timeout` |Timeout for token exchange requests in milliseconds. |Integer |Positive integer. Default: 10000 |No
1081+
|===
1082+
9271083
[[exchange-json-file-element]]
9281084
== exchange.json File Element
9291085

modules/ROOT/pages/af-troubleshoot-agent-networks.adoc

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,39 +17,23 @@ Enable logging and log levels from CloudHub 2.0 or Runtime Fabric:
1717
* xref:runtime-fabric::deploy-to-runtime-fabric.adoc#configure-logging-and-log-levels[Runtime Fabric]
1818
. Set the log level to Debug for these classes:
1919
+
20-
* `com.mulesoft.modules.agent.broker`
21-
* `org.mule.service.http.impl.service.HttpMessageLogger`
20+
* `com.mulesoft.modules.agent.broker` (For agent broker)
21+
* `INSECURE-LOGGING` (For content that can potentially contain sensitive information, such as LLM reasoning, and inputs and outputs from agents and assets defined in `tools` and `links`)
2222

2323
[IMPORTANT]
24-
HTTP wire logging displays HTTP headers and payload in plain text. Avoid leaving it enabled indefinitely or unsupervised, as it can negatively impact API performance.
24+
`INSECURE-LOGGING` is very likely to contain sensitive information, such as personally identifiable information (PII). Make sure to disable it after troubleshooting is completed.
2525

2626
[[enable-message-logging]]
2727
== Enable Message Logging Policy
2828

29-
Use API Manager or manually edit the agent network file to add a message logging policy.
29+
Edit `agent-network.yaml` to set message logging for MCP servers and agents.
3030

31-
=== Using API Manager
32-
33-
. In API Manager, select the API, agent, or MCP server instance for which you want to apply the policy.
34-
. Follow the steps in xref:gateway::flex-managed-message-log.adoc#configure-message-logging-in-connected-mode[Configure Message Logging in Connected Mode] and add these settings:
35-
+
36-
* In the Messages field, enter `#[attributes]`.
37-
* Select the checkboxes for **Before Calling API** and **After Calling API**.
38-
. Click **Save**.
39-
40-
Afterward, you should see a Message Log option for the API, agent, or MCP server.
41-
42-
[NOTE]
43-
If you redeploy the network, this policy is deleted.
44-
45-
=== Using the Agent Network File
46-
47-
In the `connection` section of the API, agent, or MCP server instance you want to log, add the following inside `policies`:
31+
Message logging uses the xref:gateway::policies-included-message-logging.adoc[Flex Gateway Message Logging policy]. In the `connection` section of the agent or MCP server instance you want to log, add the following logging policy inside `policies`:
4832

4933
[source,yaml]
5034
----
5135
52-
policies: ## add the following inside the policy setting
36+
policies: ## add the following inside the policy setting
5337
- ref:
5438
name: message-logging
5539
namespace: business_group_UUID
@@ -83,14 +67,6 @@ If Anypoint Monitoring isn't showing traces for agents and MCP servers, check th
8367
* In API Manager, verify you've enabled the tracing policy for all brokers and agents.
8468
* In the managed Flex Gateways, verify that you've enabled Distributed Tracing for ingress and egress.
8569

86-
=== Issue: Agent Visualizer Shows Disconnected Nodes
87-
88-
If Agent Visualizer shows disconnected nodes with no edges, delete the `extensions` from the `spec.capabilities` section in `agent-network.yaml`.
89-
90-
=== Issue: Null Response from Broker
91-
92-
If your agent network broker returns a null response, restart the broker.
93-
9470
=== Issue: No Agent Network Commands in Anypoint Code Builder
9571

9672
If you installed Anypoint Code Builder successfully, but you don’t see agent network commands in the interface, verify that you have the latest version of the Anypoint Extension Pack. Then, restart VS Code.

0 commit comments

Comments
 (0)