Skip to content

Service JSON Keys

Manages JSON web keys and tokens.


Local development

Pre-requisites

Setup environment

Create a .envrc file from the template:

bash
cp .envrc.template .envrc

Then fill the missing secret variables. Once your file is ready:

bash
source .envrc

You may use tools such as direnv, otherwise you'll need to source the env file on each new terminal session.

Install the external dependencies:

bash
make install

Run infrastructure

bash
make run-infra
# To turn down:
# make run-infra-down

You may skip this step if you already have the global infrastructure running.

Generate keys

You need to do this at least once, to have a set of keys ready to use for json-keys.

It is recommended to run this regularly, otherwise keys will expire and json-keys will fail.

bash
make run-rotate-keys

# [Sentry] 2025/06/26 14:00:59 generated new key for usage auth: e70eaf3f-1861-4be7-80c2-85c34e9b8371
# [Sentry] 2025/06/26 14:00:59 generated new key for usage refresh: cd4be805-6fed-4b50-8d6a-3e1fcd65e3c8

Et Voilà!

bash
make run-api