0

I'm working on integrating salesforce instances with an external service that I control and we're currently evaluating using JWTs to authenticate. If I have a certificate in the Certificate and Key management store it's pretty easy to generate the JWT, but I'm struggling with bootstrapping the process.

I could have someone go into their instance and click the Generate self-signed certificate button, but I'm trying to automate it. My question is how do I programmatically generate a self-signed certificate and add it to the Certificate and Key Management store? Alternatively we are looking at setting up our own CA and issuing the certificate, in which case I'd need a way to programmatically import a signed certificate into the key store.

1 Answer 1

1

You can do this by using the metadata API to deploy a Certificate with caSigned set to false. This will generate a certificate you can use for the rest of the process.

1
  • how can the same approach be used if wishing to create a NEW certificate for a Salesforce instance and not deploy known certificate metadata to a new Salesforce instance? Commented Jul 19, 2024 at 16:53

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.