Skip to content

Commit cea2758

Browse files
committed
Adding private/public key for JWT signing and verification
1 parent 11711a8 commit cea2758

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

worker-configuration.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ declare namespace Cloudflare {
99
LZ_ERROR_SAMPLE_RATE: number;
1010
LZ_PROD_API_BASE_URL: string;
1111
LZ_PROD_API_SECRET_KEY: string;
12+
LZ_PRIVATE_KEY: string;
13+
LZ_PUBLIC_KEY: string;
1214
LZ_R2_BUCKET: R2Bucket;
1315
DB: Hyperdrive;
1416
}

wrangler.jsonc

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@
4646
"localConnectionString": "mysql://lz_hyperdrive:[email protected]:3306/lz_spring"
4747
}
4848
],
49+
"secrets_store_secrets": [
50+
{
51+
"binding": "LZ_PRIVATE_KEY",
52+
"store_id": "389643fca29849239d4465af799a0b28",
53+
"secret_name": "LZ_PRIVATE_KEY"
54+
},
55+
{
56+
"binding": "LZ_PUBLIC_KEY",
57+
"store_id": "389643fca29849239d4465af799a0b28",
58+
"secret_name": "LZ_PUBLIC_KEY"
59+
},
60+
],
4961

5062
/**
5163
* Environment Variables
@@ -92,6 +104,18 @@
92104
"id": "b8cf9f962a3f4aafa13d36e325661d6f",
93105
}
94106
],
107+
"secrets_store_secrets": [
108+
{
109+
"binding": "LZ_PRIVATE_KEY",
110+
"store_id": "389643fca29849239d4465af799a0b28",
111+
"secret_name": "LZ_PRIVATE_KEY"
112+
},
113+
{
114+
"binding": "LZ_PUBLIC_KEY",
115+
"store_id": "389643fca29849239d4465af799a0b28",
116+
"secret_name": "LZ_PUBLIC_KEY"
117+
},
118+
],
95119
},
96120
"public": {
97121
"vars": {
@@ -122,6 +146,18 @@
122146
"localConnectionString": "mysql://lz_hyperdrive:[email protected]:3306/lz_spring"
123147
}
124148
],
149+
"secrets_store_secrets": [
150+
{
151+
"binding": "LZ_PRIVATE_KEY",
152+
"store_id": "389643fca29849239d4465af799a0b28",
153+
"secret_name": "LZ_PRIVATE_KEY"
154+
},
155+
{
156+
"binding": "LZ_PUBLIC_KEY",
157+
"store_id": "389643fca29849239d4465af799a0b28",
158+
"secret_name": "LZ_PUBLIC_KEY"
159+
},
160+
],
125161
},
126162
"eus1": {
127163
"vars": {
@@ -152,6 +188,18 @@
152188
"localConnectionString": "mysql://lz_hyperdrive:[email protected]:3306/lz_spring"
153189
}
154190
],
191+
"secrets_store_secrets": [
192+
{
193+
"binding": "LZ_PRIVATE_KEY",
194+
"store_id": "389643fca29849239d4465af799a0b28",
195+
"secret_name": "LZ_PRIVATE_KEY"
196+
},
197+
{
198+
"binding": "LZ_PUBLIC_KEY",
199+
"store_id": "389643fca29849239d4465af799a0b28",
200+
"secret_name": "LZ_PUBLIC_KEY"
201+
},
202+
],
155203
},
156204
"eus2": {
157205
"vars": {
@@ -182,6 +230,18 @@
182230
"localConnectionString": "mysql://lz_hyperdrive:[email protected]:3306/lz_spring"
183231
}
184232
],
233+
"secrets_store_secrets": [
234+
{
235+
"binding": "LZ_PRIVATE_KEY",
236+
"store_id": "389643fca29849239d4465af799a0b28",
237+
"secret_name": "LZ_PRIVATE_KEY"
238+
},
239+
{
240+
"binding": "LZ_PUBLIC_KEY",
241+
"store_id": "389643fca29849239d4465af799a0b28",
242+
"secret_name": "LZ_PUBLIC_KEY"
243+
},
244+
],
185245
}
186246
},
187247
/**

0 commit comments

Comments
 (0)