Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secret endpoints only show/update/delete secret_text #217

Open
afrieirham opened this issue Jul 20, 2023 · 0 comments
Open

Secret endpoints only show/update/delete secret_text #217

afrieirham opened this issue Jul 20, 2023 · 0 comments

Comments

@afrieirham
Copy link

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": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant