Skip to content

Commit b509381

Browse files
Merge branch 'latest' into W-21177886-add-headersToPropogate-and-auth-required-ie
2 parents 4cf4dc3 + 235531a commit b509381

1 file changed

Lines changed: 151 additions & 3 deletions

File tree

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

Lines changed: 151 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ The `connections` element has these properties.
787787
|`spec` |Connection specification. Properties vary by connection kind. |Object |Object with spec properties (See <<spec-section,Spec>>) |Yes
788788
|`spec.url` |The URL for the connection endpoint. |String |Valid URL string |Yes (for agent and llm), No (for mcp)
789789
|`spec.authentication` |Authentication configuration for the connection. |Object |Authentication object (See <<authentication-types,Authentication types>>) |No
790-
|`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)
791791
|`spec.authentication.username` |The username for basic authentication. |String |Any string value |Yes (for basic auth)
792792
|`spec.authentication.password` |The password for basic authentication. |String |Any string value |Yes (for basic auth)
793793
|`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
@@ -872,7 +872,7 @@ Both agents and MCP servers support the same authentication types with custom he
872872
[source,yaml]
873873
----
874874
authentication:
875-
Kind: basic
875+
kind: basic
876876
username: "username"
877877
password: "password"
878878
----
@@ -887,6 +887,18 @@ kind: basic
887887
headerName: X-API-Authorization # Custom header instead of default "Authorization"
888888
----
889889

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+
890902
[[oauth-client-credentials]]
891903
==== OAuth 2.0 Client Credentials
892904

@@ -896,10 +908,29 @@ authentication:
896908
kind: oauth2-client-credentials
897909
clientId: "client_id"
898910
clientSecret: "client_secret"
899-
tokenUrl: "https://oauth.provider.com/token"
911+
token:
912+
url: "https://oauth.provider.com/token"
913+
bodyEncoding: form
914+
timeout: 300
900915
scopes: ["read", "write"] # Optional
901916
----
902917

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+
903934
[[anypoint-client-credentials]]
904935
==== Anypoint Client Credentials
905936

@@ -911,6 +942,17 @@ authentication:
911942
clientSecret: "client_secret"
912943
----
913944

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+
914956
[[api-key]]
915957
==== API Key Authentication
916958

@@ -932,6 +974,112 @@ authentication:
932974
headerName: X-Custom-Auth-Token # Custom header name
933975
----
934976

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+
9351083
[[exchange-json-file-element]]
9361084
== exchange.json File Element
9371085

0 commit comments

Comments
 (0)