Generate JWT Keys | Mia-Platform Documentation (2024)

You can generate a JWT public and private keys using one of the following two utilities:

  • openssl
  • ssh-keygen

Use the one you prefer depending on your OS

Private Key Generation

First of all you have to create a private key in PEM format.

You can use one of the following methods to create it.

info

NIST recommends at least 2048-bit keys for RSA. An RSA key length of at least 3072 bits should be used if security is required beyond 2030.In this guide, we will use a key of 4096 bits.

openssl

Use the following command:

openssl genrsa -out ./private.key 4096

ssh-keygen

Use the following command:

ssh-keygen -t rsa -b 4096 -m PEM -f private.key

This command also allows to protect the key with a password: if you decide to do so, remember to set it in the PRIVATE_KEY_PASSWORD environment variable of the service.

Moreover this will create in your directory a private.key.pub public key file that you can delete or ignore.

Result

You should have in your current directory the private.key file containing your private key. Do not share this file with anyone and keep it secret. If someone obtained this private key, they would be able to impersonate you!

Public Key Generation

Now, you have to create one public key from the already generated private key. Use the same tool used in the step before.

openssl

Use the following command:

openssl rsa -in private.key -pubout -outform PEM -out public.key

ssh-keygen

Use the following command:

ssh-keygen -f private.key -e -m PKCS8 > public.key

Result

This will create in your current directory the public.key file containing your public key starting from your private key. You can share this file and this will be used by others to identify messages signed using your private key.

Client Credential Key format

The Client Credential accepts the public key in a JWK format. You can you a library or an online tool to generate the needed JWK.We suggest the following online tool.Configure it like this:

  • Public Key Use: Signing
  • Algorithm: RS256
  • Key ID: The same you set in PRIVATE_RSA_KEY_ID environment variable
  • PEM encoded key: your public key, copy here the contents of the file public.key.

Now you have the JWK necessary to register your client using the private key JWT.

Generate JWT Keys | Mia-Platform Documentation (2024)
Top Articles
REITs in S&P Indexes
Praca Jako Kierowca Uber - Partner Uber | MB PARTNER
Scheelzien, volwassenen - Alrijne Ziekenhuis
Jack Doherty Lpsg
Lowe's Garden Fence Roll
Hotels Near 625 Smith Avenue Nashville Tn 37203
Safety Jackpot Login
Hotels
Frank Lloyd Wright, born 150 years ago, still fascinates
Driving Directions To Fedex
Mail Healthcare Uiowa
What is international trade and explain its types?
A Fashion Lover's Guide To Copenhagen
4Chan Louisville
Miami Valley Hospital Central Scheduling
Keniakoop
What is the difference between a T-bill and a T note?
Animal Eye Clinic Huntersville Nc
Second Chance Maryland Lottery
Imagetrend Inc, 20855 Kensington Blvd, Lakeville, MN 55044, US - MapQuest
Amazing deals for DKoldies on Goodshop!
Full Standard Operating Guideline Manual | Springfield, MO
Craigslist Battle Ground Washington
Macu Heloc Rate
Move Relearner Infinite Fusion
Craigslist Panama City Beach Fl Pets
Dei Ebill
WPoS's Content - Page 34
Yu-Gi-Oh Card Database
Nikki Catsouras: The Tragic Story Behind The Face And Body Images
Guide to Cost-Benefit Analysis of Investment Projects Economic appraisal tool for Cohesion Policy 2014-2020
Lawrence Ks Police Scanner
Sam's Club Near Wisconsin Dells
Ark Unlock All Skins Command
Craigs List Stockton
Weapons Storehouse Nyt Crossword
Ticket To Paradise Showtimes Near Regal Citrus Park
Publictributes
Daily Times-Advocate from Escondido, California
Craigslist Mexicali Cars And Trucks - By Owner
Aurora Il Back Pages
Nimbleaf Evolution
Avatar: The Way Of Water Showtimes Near Jasper 8 Theatres
The Cutest Photos of Enrique Iglesias and Anna Kournikova with Their Three Kids
Upcoming Live Online Auctions - Online Hunting Auctions
Automatic Vehicle Accident Detection and Messageing System – IJERT
Cvs Minute Clinic Women's Services
Access One Ummc
Latest Posts
Article information

Author: Catherine Tremblay

Last Updated:

Views: 5906

Rating: 4.7 / 5 (47 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Catherine Tremblay

Birthday: 1999-09-23

Address: Suite 461 73643 Sherril Loaf, Dickinsonland, AZ 47941-2379

Phone: +2678139151039

Job: International Administration Supervisor

Hobby: Dowsing, Snowboarding, Rowing, Beekeeping, Calligraphy, Shooting, Air sports

Introduction: My name is Catherine Tremblay, I am a precious, perfect, tasty, enthusiastic, inexpensive, vast, kind person who loves writing and wants to share my knowledge and understanding with you.