Automatically expose the Named Credentials JWT’s public key with External Credential in the keys endpoint
Salesforce JWT (JSON Web Token) OAuth 2.0 Bearer Flow enables secure, server-to-server integration without user interaction by using a digital certificate to sign a token. It replaces username/password authentication for high-security, automated, or backend-to-backend communication, requiring a Connected App, RSA SHA256 signing, and specific claims (iss, sub, aud, exp).
Salesforce utilizes JSON Web Key Sets (JWKS) for secure token-based authentication, specifically for scenarios like validating external JSON Web Tokens (JWTs), configuring OAuth 2.0 flows, and managing public keys for server-to-server integrations
Below steps are required to expose the JWKS and it is not supported with new Named credentials.
1. Create test org and Switch to the Lightning UI if you haven't done so. External Credentials are available only in Lightning.
2. Create a certificate on the Certificate and Key Management3. Go to the Named Credentials page ([Security]-[Named Credentials]) and create a Legacy Named Credentials.
Label: Legacy1
Identity Type: [Named Principal]
Authentication Protocol : [JWT Token Exchange]
JWT Signing Certificate: <the created certificates>
4. Open https://<mydomain>/id/keys. You'll see the certificate used for the named credential with Legacy type.
This is expected behaviour
004980324

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.