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
What Is Ethical Fashion? Your Comprehensive Guide To Conscious Clothing
Certified Kosher—What Does It Mean? - Heart Of The Desert
Public Opinion Obituaries Chambersburg Pa
The UPS Store | Ship & Print Here > 400 West Broadway
Breaded Mushrooms
Unblocked Games Premium Worlds Hardest Game
GAY (and stinky) DOGS [scat] by Entomb
Joe Gorga Zodiac Sign
Fallout 4 Pipboy Upgrades
Little Rock Arkansas Craigslist
Audrey Boustani Age
Breakroom Bw
Labor Gigs On Craigslist
Boston Gang Map
How Much You Should Be Tipping For Beauty Services - American Beauty Institute
Farmer's Almanac 2 Month Free Forecast
Craigslist List Albuquerque: Your Ultimate Guide to Buying, Selling, and Finding Everything - First Republic Craigslist
Gopher Hockey Forum
Viha Email Login
Blue Rain Lubbock
Tips on How to Make Dutch Friends & Cultural Norms
Wemod Vampire Survivors
Rs3 Ushabti
Yugen Manga Jinx Cap 19
6892697335
11526 Lake Ave Cleveland Oh 44102
Culver's.comsummerofsmiles
Gopher Hockey Forum
Ups Drop Off Newton Ks
FSA Award Package
25Cc To Tbsp
Basil Martusevich
Haley Gifts :: Stardew Valley
Polk County Released Inmates
2024 Ford Bronco Sport for sale - McDonough, GA - craigslist
Build-A-Team: Putting together the best Cathedral basketball team
Robeson County Mugshots 2022
Academic important dates - University of Victoria
Craigslist Ludington Michigan
Ramsey County Recordease
Worcester County Circuit Court
✨ Flysheet for Alpha Wall Tent, Guy Ropes, D-Ring, Metal Runner & Stakes Included for Hunting, Family Camping & Outdoor Activities (12'x14', PE) — 🛍️ The Retail Market
Quaally.shop
Unblocked Games - Gun Mayhem
Marion City Wide Garage Sale 2023
Tamilblasters.wu
Basic requirements | UC Admissions
Island Vibes Cafe Exeter Nh
Affidea ExpressCare - Affidea Ireland
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.