Generate RSA Keys for Target API access
Generate RSA Keys for Target API access
Client needs to generate a RSA Private/Public Key pair for Stage and Prod by following methods
The both stage and prod Public Keys is to be sent to Target's Point of Contact. (tgtmaximo@target.com) Target's Point of contact will create profile for vendors.
Target's Point of contact has to provide the following to the Vendor. These values are to be used generate Bearer token (Bearer token need to map against the 'Authorization' header when making API request)-
- ClientID and Secret Id information
- Non-user account (NUA) username
Instructions to generate RSA Private/Public Key pair if vendor is using a Windows machine:
Installation of program
Below page has instructions on how to install open ssl for windows:
https://www.cloudinsidr.com/content/how-to-install-the-most-recent-version-of-openssl-on-windows-10-in-64-bit/
![mceclip0.png]()
After installation, you can execute the commands below in a command prompt to generate the keys.
Generate the key pair(pvtpair.pem)
Process to run in Command prompt
- Command window needs to be “Run as Administrator”
- Need to change directory (cd) to directory of the OpenSSL-Win64 bin folder
- Keys will generate in the bin folder location - C:\Program Files\OpenSSL-Win64\bin
Command to run to create the keys
- (Original command which did not work) openssl genrsa -out pvtpair.pem 2048cl
- (Without cl ending worked) openssl genrsa -out pvtpair.pem 2048
Export the public key(public.pem) which needs to be sent to Target
- openssl rsa -in pvtpair.pem -outform PEM -pubout -out public.pem
Project documents location https://bdsmktg.sharepoint.com/teams/IT/development/Shared%20Documents/Forms/AllItems.aspx?FolderCTID=0x012000ABE4CF4F595974429B80DC700D595554&View=%7B1A4E2133%2DD1&viewid=1a4e2133%2Dd1d3%2D4ebe%2D8b2c%2D5078ae44bd65&id=%2Fteams%2FIT%2Fdevelopment%2FShared%20Documents%2FProjects%2Fic7%2E1%20Target%20Maximo%20API