I was trying to setup a Named Credentials with JWT Token Exchange (i.e. not the basic "JWT" option) to use GCP Identity Federation and I got this error when doing an APEX Http callout:
EXCEPTION_THROWN [13]|System.CalloutException: Unable to complete the JWT token exchange. Error: invalid_request. Error description: subject_token must be nonempty..
The field "subject_token" is not exposed in the Salesforce GUI to configure. How can I solve this please ?
EDIT I understand that the JWT generation (with self-signed certificate or CA signed certificate) option in Named Credentials can be a solution but I am after a more automated and secure way through "JWT Token Exchange".
EDIT Unfortunately, the answer Generate JWT token for external app does not answer my question.
subject_tokenand there are more issues – identigral Jun 13 '22 at 18:42subject_token. – jldupont Jun 14 '22 at 11:26