durable objects for secret storage

Is durable object secured enough to store secrets (such as, api keys and tokens)?
6 Replies
Tin Cap
Tin Cap•16mo ago
Is there a reason you don't want to use worker secrets?
Baya
BayaOP•16mo ago
The number of my secret variables exceeds the limit.
Tin Cap
Tin Cap•16mo ago
You have more than 64/128? That's a lot. What are you doing?
The maximum number of environment variables (secret and text combined) for a Worker is 128 variables on the Paid plan, and 64 variables on the Free plan. There is no limit to the number of environment variables per account.

Each environment variable has a size limitation of 5 KB.
The maximum number of environment variables (secret and text combined) for a Worker is 128 variables on the Paid plan, and 64 variables on the Free plan. There is no limit to the number of environment variables per account.

Each environment variable has a size limitation of 5 KB.
Baya
BayaOP•16mo ago
I am building a web app that stores third-party access tokens per a user account. I am using "Pages" to render the user's frontend - I use the access tokens to pull some user specific data from the third-party server (for the frontend). I am using KV, DO and R2 to store other non-sensitiev user data. In another topic, does number of page functions count as workers? 🙂
Tin Cap
Tin Cap•16mo ago
Gotcha. Storing those access tokens sounds like a database thing. Can you store them in KV encrypted and then have the decryption key as a secret for your worker?
Baya
BayaOP•16mo ago
Thanks. That is a better approach from what I planned. 🙂
Want results from more Discord servers?
Add your server