I am trying to get an access token by following the guide OAuth 2.0 JWT Bearer Token Flow. But I am stuck on the following
The developer writes an app that generates a JWT. The JWT is signed with the X509 Certificate’s private key, and the connected app uses the certificate to verify the signature.
I know you can create a self-signed cert through salesforce but that never gives you a private key.
How do you create a self signed x509 certificate that you can upload to salesforce and use with your connected app?
Best Answer
You use OpenSSL for that. On Linux/macOS, a script like this will generate multiple certificates, if you need them (for multiple environments in a CI/CD context, for example).
Of course, the downside of this sample script is that all certificates will be generated with the same password (and that's not good). Take that into consideration if you use it.
Search for the equivalent commands on Windows.