Skip to content

Secret store secrets longer than 1024 appear to work but don't #14018

Description

@nzakas

What versions & operating system are you using?

System:
OS: Linux 5.15 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
Memory: 3.19 GB / 7.63 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
Binaries:
Node: 22.21.1 - /home/nzakas/.nvm/versions/node/v22.21.1/bin/node
npm: 10.9.4 - /home/nzakas/.nvm/versions/node/v22.21.1/bin/npm
npmPackages:
wrangler: ^4.83.0 => 4.90.1

Please provide a link to a minimal reproduction

https://gist.github.com/nzakas/99c7c51edf3aa6500b8d3bd3d9d5c402

Describe the Bug

The CLI allows you to set secret store values longer than 1024, but these don't work in any reliable way.

First, add a secret store secret longer than 1024 characters.

npx wrangler secrets-store secret create <store_id> --name TEST_SECRET --scopes workers

This will appear to succeed. You can later list out the secrets and see that it exists:

npx wrangler secrets-store secret list <store_id>

However, if you then try to deploy a worker that has a secret store binding to TEST_SECRET, it will fail as say that TEST_SECRET doesn't exist.

Note that the web dashboard explicitly disallows secret values longer than 1024 characters and does not show TEST_SECRET even when wrangler lists it out.

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions