Skip to content

Used to generate JWT via Shell script for Salesforce Jenkins Force.com Migration CI

Notifications You must be signed in to change notification settings

dcinzona/Jenkins-JWT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Must configure a connected app with a digital certificate

Code to generate the certificate:

openssl req \
    -subj "/C=US/ST=DC/L=Washington, DC/O=My Organization/CN=example.com" \
    -newkey rsa:2048 -nodes -keyout private.key \
    -x509 -days 3650 -out public.crt
  • connected app must have "offline access" in scopes
  • connected app must also be associated with the user / profile

Jenkins

Link to blog post that supported this development: http://doingpoorly.blogspot.com/2014/11/jwt-bearer-token-flow-can-be-used-for.html

Gov Cloud

  • Use the "My Domain" URL instead of login.salesforce.com / test.salesforce.com

Testing connectivity with jwlogin.sh

You can test connectivity by manually running jwlogin.sh on your workstation and manually specifying parameters.

  • Make sure you run jwlogin.sh from the same directory that contains your digital certificate private key (and the file should be named 'private.key')

Example:

./jwlogin.sh username@agency.gov https://agency.my.salesforce.com connectedAppClientId

About

Used to generate JWT via Shell script for Salesforce Jenkins Force.com Migration CI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages