cloudflare / cloudflare/cloudflare-rs

Secret endpoints only show/update/delete `secret_text`

Open
#217 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
316
Forks
111
PR merge metrics
No merged PRs in 30d

Description

### 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:
```json
{
"result": [
{
"name": "hello",
"type": "plain_text"
}
],
"success": true,
"errors": [],
"messages": []
}
```

### Actual result:
```json
{
"result": [],
"success": true,
"errors": [],
"messages": []
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.