cloudflare-rs icon indicating copy to clipboard operation
cloudflare-rs copied to clipboard

Secret endpoints only show/update/delete `secret_text`

Open afrieirham opened this issue 1 year ago • 0 comments

Description

Not sure what's going on here but all of these endpoints only seem to affect encrypted secrets. It works as expected when the secrets are encrypted but nothing happens when it's in plain text.

  1. List secrets – GET /accounts/{account_id}/workers/scripts/{script_name}/secrets
  2. Create secrets – PUT /accounts/{account_id}/workers/scripts/{script_name}/secrets
  3. Delete secrets – DELETE /accounts/{account_id}/workers/scripts/{script_name}/secrets/{secret_name}

Steps to reproduce:

  1. Create a cloudflare worker in the dashboard
  2. Add new environment variables to the project but don't encrypt it
  3. Make a GET request to the list secrets endpoint.

Expected result:

{
    "result": [
        {
            "name": "hello",
            "type": "plain_text"
        }
    ],
    "success": true,
    "errors": [],
    "messages": []
}

Actual result:

{
    "result": [],
    "success": true,
    "errors": [],
    "messages": []
}

afrieirham avatar Jul 20 '23 10:07 afrieirham