How to Use JWT Oauth Authentication

How to use JWT Oauth Authentication for certain elements and custom elements.

Generally the field in the element ui for JWT Base64 Encoded Key actually refers to a private key that is used to sign a cert uploaded to the provider for use with a digital signature. This key is the base64key.pem that is generated by following these steps:

//Create the private key

1. openssl genrsa -out private_key.pem 2048

//Convert the private key to PKCS8 and DER format (so our Java code base can read it)

2. openssl pkcs8 -topk8 -inform PEM -outform DER -in private_key.pem -out private_key_pkcs8.der -nocrypt

//Base64 encode the private key

3. cat private_key_pkcs8.der | base64 > base64Key.pem

//Create a certificate and sign it with the private key

4. openssl req -new -x509 -key private_key.pem -out cacert.pem -days 1095

After running the following steps, the files you will need to provision an instance are cacert.pem and base64Key.pem. You will want to upload the cacert.pem to the provider as long as the provider allows for digital signatures for authentication.

Please be sure to set the callback url to : https://auth.cloudelements.io/oauth in the oauth set up for the provider.

When you go to provision an instance using JWToauth you will need to following values:

JWT Issuer - appID;

OAuth API Key - appID;

JWT Subject - userID

JWT Base 64 Encoded Key -> base64Key.pem