Skip to content

Commit 152c4aa

Browse files
committed
Enhance authentication documentation in af-project-files.adoc by adding detailed property tables for 'basic', 'oauth2-client-credentials', 'apikey-client-credentials', 'in-task-authorization-code', and 'oauth2-obo' types. Updated YAML examples and descriptions for clarity and consistency.
1 parent 7cfac36 commit 152c4aa

1 file changed

Lines changed: 97 additions & 4 deletions

File tree

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

Lines changed: 97 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ Both agents and MCP servers support the same authentication types with custom he
864864
[source,yaml]
865865
----
866866
authentication:
867-
Kind: basic
867+
kind: basic
868868
username: "username"
869869
password: "password"
870870
----
@@ -879,6 +879,18 @@ kind: basic
879879
headerName: X-API-Authorization # Custom header instead of default "Authorization"
880880
----
881881

882+
The `basic` authentication has these properties.
883+
884+
[cols="1,2,1,2,1",options="header"]
885+
|===
886+
|Parameter |Description |Type |Valid Values |Required
887+
888+
|`kind` |Authentication type. |String |`basic` |Yes
889+
|`username` |The username for authentication. |String |Any string |Yes
890+
|`password` |The password for authentication. |String |Any string |Yes
891+
|`headerName` |The name of the header in which to set the credentials. If not specified, `Authorization` is used. |String |Any string |No
892+
|===
893+
882894
[[oauth-client-credentials]]
883895
==== OAuth 2.0 Client Credentials
884896

@@ -888,10 +900,29 @@ authentication:
888900
kind: oauth2-client-credentials
889901
clientId: "client_id"
890902
clientSecret: "client_secret"
891-
tokenUrl: "https://oauth.provider.com/token"
903+
token:
904+
url: "https://oauth.provider.com/token"
905+
bodyEncoding: form
906+
timeout: 300
892907
scopes: ["read", "write"] # Optional
893908
----
894909

910+
The `oauth2-client-credentials` authentication has these properties.
911+
912+
[cols="1,2,1,2,1",options="header"]
913+
|===
914+
|Parameter |Description |Type |Valid Values |Required
915+
916+
|`kind` |Authentication type. |String |`oauth2-client-credentials` |Yes
917+
|`clientId` |The client ID. |String |Any string |Yes
918+
|`clientSecret` |The client secret. |String |Any string |Yes
919+
|`token` |Configuration for fetching the token. |Object |Object with token properties |Yes
920+
|`token.url` |The URL of the token provider. |String |Valid URL |Yes
921+
|`token.timeout` |Time in seconds to wait for the service to return the token. |Number |Any number |No
922+
|`token.bodyEncoding` |The encoding format for the token request body. |String |`form`, `json` |No
923+
|`scopes` |An array of scopes to request. |Array |Array of scope strings |No
924+
|===
925+
895926
[[anypoint-client-credentials]]
896927
==== Anypoint Client Credentials
897928

@@ -903,6 +934,17 @@ authentication:
903934
clientSecret: "client_secret"
904935
----
905936

937+
The `apikey-client-credentials` authentication has these properties.
938+
939+
[cols="1,2,1,2,1",options="header"]
940+
|===
941+
|Parameter |Description |Type |Valid Values |Required
942+
943+
|`kind` |Authentication type. |String |`apikey-client-credentials` |Yes
944+
|`clientId` |The client ID. |Object |Object with `value` and optional `name` (default header name is `client_id`) |Yes
945+
|`clientSecret` |The client secret. |Object |Object with `value` and optional `name` (default header name is `client_secret`) |Yes
946+
|===
947+
906948
[[api-key]]
907949
==== API Key Authentication
908950

@@ -924,9 +966,22 @@ authentication:
924966
headerName: X-Custom-Auth-Token # Custom header name
925967
----
926968

969+
The `apiKey` authentication has these properties.
970+
971+
[cols="1,2,1,2,1",options="header"]
972+
|===
973+
|Parameter |Description |Type |Valid Values |Required
974+
975+
|`kind` |Authentication type. |String |`apiKey` |Yes
976+
|`apiKey` |The value of the API key. |String |Any string |Yes
977+
|`headerName` |The name of the header in which to set the key. If not specified, `Authorization` is used. |String |Any string |No
978+
|===
979+
927980
[[in-task-auth]]
928981
==== In-Task Authorization Code
929982

983+
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[].
984+
930985
[source,yaml]
931986
----
932987
authentication:
@@ -944,10 +999,31 @@ authentication:
944999
tokenTimeout: 300 #Optional. Timeout in seconds for token requests. Default: 300.
9451000
----
9461001

1002+
The `in-task-authorization-code` authentication has these properties.
1003+
1004+
[cols="1,2,1,2,1",options="header"]
1005+
|===
1006+
|Parameter |Description |Type |Valid Values |Required
1007+
1008+
|`kind` |Authentication type. |String |`in-task-authorization-code` |Yes
1009+
|`authorizationEndpoint` |OAuth2 authorization endpoint URL. Used to generate the authentication challenge. |String |Valid URL |Yes
1010+
|`tokenEndpoint` |OAuth2 token endpoint URL. Used to generate the authentication challenge. |String |Valid URL |Yes
1011+
|`scopes` |OAuth2 scopes required for step-up authentication. |String |Space- or comma-separated scope list (e.g. `openid profile email`) |Yes
1012+
|`redirectUri` |OAuth2 redirect URI the client uses in the authorization flow. |String |Valid URI |Yes
1013+
|`secondaryAuthProvider` |Name of the IdP (e.g. `okta`, `auth0`). Informational only, for the authentication card. |String |Any string |No
1014+
|`responseType` |OAuth2 response type. |String |Typically `code`. Default: `code` |No
1015+
|`codeChallengeMethod` |PKCE code challenge method. |String |Typically `S256`. Default: `S256` |No
1016+
|`tokenAudience` |Intended recipient of the token (e.g. agent or API URL). |String |Any string |No
1017+
|`bodyEncoding` |Encoding for the token request body. |String |`form`, `json`. Default: `form` |No
1018+
|`tokenTimeout` |Timeout in seconds for token requests. |Integer |Positive integer. Default: 300 |No
1019+
|`challengeResponseStatusCode` |HTTP status code returned for auth-required challenge responses. Typically 200 for JSON-RPC compatibility. |Integer |HTTP status code. Default: 200 |No
1020+
|===
1021+
1022+
9471023
[[obo-credential-injection]]
9481024
==== OAuth 2.0 OBO Credential Injection
9491025

950-
This authentication type supports OAuth 2.0 Token Exchange and Microsoft Entra ID On-Behalf-Of protocols.
1026+
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[].
9511027

9521028
Using OAuth 2.0 Token Exchange:
9531029

@@ -977,7 +1053,24 @@ authentication:
9771053
clientSecret: clientSecret
9781054
scope: api://downstream-client-id/.default
9791055
timeout: 5000 #optional, Timeout for token exchange requests in milliseconds. Default: 10000.
980-
----
1056+
----
1057+
1058+
The `oauth2-obo` authentication has these properties.
1059+
1060+
[cols="1,2,1,2,1",options="header"]
1061+
|===
1062+
|Parameter |Description |Type |Valid Values |Required
1063+
1064+
|`kind` |Authentication type. |String |`oauth2-obo` |Yes
1065+
|`flow` |Token exchange flow type. |String |`oauth2-token-exchange` (RFC 8693), `microsoft-entra-obo` |Yes
1066+
|`clientId` |OAuth2 client ID for token exchange. |String |Any string |Yes
1067+
|`clientSecret` |OAuth2 client secret for token exchange. |String |Any string |Yes
1068+
|`tokenEndpoint` |OAuth2 token endpoint URL for token exchange. |String |Valid URL |Yes
1069+
|`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
1070+
|`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
1071+
|`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`
1072+
|`timeout` |Timeout for token exchange requests in milliseconds. |Integer |Positive integer. Default: 10000 |No
1073+
|===
9811074

9821075
[[exchange-json-file-element]]
9831076
== exchange.json File Element

0 commit comments

Comments
 (0)