You have to generate secret key and initialization vector:
curl -H "Content-Type: application/json" 'https://api.ennote.dev/generate/onetime/secrets'
Outputs example:
{
"secretKey": "eHts9g5AASdkd63pNtSK0ERcg6nwoQEXcR99pLnYBn4=",
"initializationVector": "BaT8jIP+PZ5m95eH"
}
Create secret file which will be imported to Kubernetes secret
SECRET_KEY=
INITIALIZATION_VECTOR=
Parameters
Variable |
Description |
SECRET_KEY |
A key, in the context of symmetric cryptography, is something you keep secret. Anyone who knows your key (or can guess it) can decrypt any data you've encrypted with it (or forge any authentication codes you've calculated with it, etc.). |
INITIALIZATION_VECTOR |
An IV or initialization vector is, in its broadest sense, just the initial value used to start some iterated process. The term is used in a couple of different contexts and implies different security requirements in each of them. |
Create Kubernetes secret from secret file above in custom namespace ennote-onetime
kubectl create secret generic ennote-onetime --from-env-file=secret -n ennote-onetime