Repository navigation
feat(spaces): add Spaces access key List, Get, Create and Delete tasks - #25
Conversation
Part of kestra-io#10 (Spaces keys slice).
jymaire
left a comment
There was a problem hiding this comment.
Kestra Plugin Code Review
Business Requirements — met
The PR delivers the spaces.key List, Get, Create and Delete tasks described in #24 on /v2/spaces/keys, with grant validation in Create and the secret key returned only by Create.
Kestra Guidelines — 2 findings
- 🟢
Create.java:122[Guidelines] Multi-line javadoc - 🟢
Create.java:154[Guidelines] Output duplicates KeyOutput
Checked and fine: Lombok annotations, apiToken secret and @ToString.Exclude (inherited), Property<T> everywhere, @Schema on all properties and outputs, full runnable @Examples with secret(), VoidOutput with return null, package-info.java (CLOUD), spaces.key.yaml, index.yaml, the doc .md, the icon (same as the other subgroups), and AGENTS.md / README.md (they describe only what this diff adds).
Security (OWASP Top 10:2025 + KPS) — 0 blocking findings
- Create outputs the secret key as
EncryptedString(KPS-01). This is the accepted pattern and is documented in the task, the doc.md, and the metadata. The secret is not logged (KPS-02): the log lines carry only the key name, the access key and the grant count. Get and List never return it. - Residual point for the maintainers: without
kestra.encryption.secret-keyKestra stores the output in cleartext (the PR description says so; the task text only says it "requires" the key).
Performance — 0 findings
✅ No issues found. List uses the shared paginated fetchAllPages with a reused client and a page cap.
Other checks
- API: endpoints,
keys/keywrappers, lowercase permission values, emptybucketfor FULLACCESS and the filters (name,bucket,permission) match DigitalOcean's Spaces keys API as I know it. Pagination usesper_pageandlinks.pages.next; I checked the code, not the live API. - Kestra 1.3 / 2.0:
kestraVersion=1.3.39. The diff usesEncryptedString,Property,HttpRequestandVoidOutputonly, and no core API changed in 2.0. The author reports running the jar on 2.0.5. - Tests: I ran the 4
spaces.keytest classes locally (1 worker, no daemon): 16/16 pass. Every task has an unconditional WireMock happy-path test. - Overlap: the diff touches no
.github/,build.gradleorgradle.propertiesfile. #29 (bearer fix inAbstractDigitalOceanTask) is independent of these files, but all four tasks go through the same HTTP layer, so they benefit from it once merged. #23 also editsAGENTS.mdandio.kestra.plugin.digitalocean.md, so the second of the two to merge will probably need a rebase.
Verdict: recommend APPROVE (non-blocking nits only; final call and approval stay with the maintainers)
Also trims the grant validation comment to one line.
|
Thanks for the review. 2 of 2 addressed in e47ef90:
|
fdelbrayelle
left a comment
There was a problem hiding this comment.
Kestra Plugin Code Review
Business Requirements — met
spaces.key List, Get, Create and Delete on /v2/spaces/keys as asked in #24, with grant validation in Create and the secret key returned only by Create, as an EncryptedString.
Previous Review Follow-up — 2 of 2 addressed
Baseline: 2262df71c5 (review by kestra-io member jymaire). Head: e47ef90724.
- ✅
Create.java:122multi-line javadoc: now a single-line comment abovevalidateGrants. - ✅
Create.java:154Output duplicates KeyOutput:KeyOutputis now@SuperBuilder,Create.Output extends KeyOutputand only addssecretKey;run()fills shared fields throughKeyOutput.withKeyFields(...).
Those threads belong to another reviewer, so I left them unresolved.
Kestra Guidelines — 0 findings
✅ No violations in the new commit (unused imports removed, no leftover @Builder).
Security (OWASP Top 10:2025 + KPS) — 0 findings
✅ No issues found. The secret stays encrypted in outputs (KPS-01) and is not logged (KPS-02). The PR touches no .github/, build.gradle* or gradle.properties file. The only test resource change is a dummy encryption key in src/test/resources/application.yml, used for the encryption test.
Performance — 0 findings
✅ No issues found.
Static review only: I did not build or run tests locally. The fork CI run on this head was pending approval and has been approved.
Verdict: APPROVE
QA report: Spaces access keys (head
|
| Check | 1.3.42 key set | 2.0.5 key set | 1.3.42 key unset | 2.0.5 key unset |
|---|---|---|---|---|
secretKey stored as {value, type: io.kestra.datatype:aes_encrypted} |
✅ AES ciphertext | ✅ AES ciphertext | plaintext value + WARN Unable to encrypt the output as encryption is not configured |
same as 1.3.42 |
| Issued secret found in clear in stored outputs (scanned against what the mock issued) | ✅ no | ✅ no | yes (expected without a key) | yes (expected without a key) |
| Issued secret found in any log line | ✅ no | ✅ no | ✅ no | ✅ no |
{{ outputs.create_key.secretKey }} gives the plain secret to a later task (checked on the mock's /echo) |
✅ | ✅ | ✅ | ✅ |
Get / List outputs contain no secret |
✅ | ✅ | ✅ | ✅ |
Without the key, Kestra's own fallback stores the value as is and logs the warning, as the PR description says (already raised in the first review as a residual point for maintainers; not a new finding).
Output shape in the UI (Create.Output extends KeyOutput)
- Plugin docs page, both versions:
Createoutputs list exactlyaccessKey,createdAt,grants,name,secretKey(1.3.42, 2.0.5). The newSpaces Keys (4)subgroup shows Create, Delete, Get, List. - Execution outputs: same five keys at runtime on both versions;
Gethas the fourKeyOutputkeys only. On 1.3.42 the UI renders thetypestring of the encrypted value as an "External link" label (Kestra UI display, same for anyEncryptedString). - Flows validate in the editor on both versions (1.3.42, 2.0.5).
Summary
| # | Flow | Scenario | 1.3.42 | 2.0.5 |
|---|---|---|---|---|
| 1 | digitalocean_create_spaces_key |
Create @example (new) |
✅ SUCCESS | ✅ SUCCESS |
| 2 | digitalocean_get_spaces_key |
Get @example (new) |
✅ SUCCESS | ✅ SUCCESS |
| 3 | digitalocean_list_spaces_keys |
List @example (new) |
✅ SUCCESS | ✅ SUCCESS |
| 4 | digitalocean_delete_spaces_key |
Delete @example (new) |
✅ SUCCESS | ✅ SUCCESS |
| 5 | qa_rotate_key |
Create, Get, List, use the secret downstream, revoke (new) | ✅ SUCCESS | ✅ SUCCESS |
| 6 | qa_create_fullaccess |
single FULLACCESS grant, no bucket (new) | ✅ SUCCESS | ✅ SUCCESS |
| 7 | qa_create_no_grants |
no grants (new) | ✅ SUCCESS | ✅ SUCCESS |
| 8 | qa_create_mixed_grants |
FULLACCESS + READ (negative) (new) | ✅ FAILED as expected | ✅ FAILED as expected |
| 9 | qa_create_scoped_no_bucket |
READWRITE without bucket (negative) (new) | ✅ FAILED as expected | ✅ FAILED as expected |
| 10 | qa_create_pebble |
name and grants from inputs (STRING + JSON), List by name with FETCH_ONE (new) | ✅ SUCCESS | ✅ SUCCESS |
| 11 | qa_list_paged_store |
pagination (perPage: 2), fetchType: STORE and NONE (new) |
✅ SUCCESS | ✅ SUCCESS |
| 12 | qa_get_not_found |
Get on an unknown key (negative) (new) | ✅ FAILED as expected | ✅ FAILED as expected |
| 13 | qa_delete_not_found |
Delete on an unknown key (negative) (new) | ✅ FAILED as expected | ✅ FAILED as expected |
| 14 | qa_create_rate_limited |
Create answered with HTTP 429 (negative) (new) | ✅ FAILED as expected | ✅ FAILED as expected |
| 15 | qa_billing_nonregression |
non-regression: billing.GetBalance |
✅ SUCCESS | ✅ SUCCESS |
Flow 1: digitalocean_create_spaces_key (✅ SUCCESS)
Flow YAML
id: digitalocean_create_spaces_key
namespace: company.team
tasks:
- id: create_key
type: io.kestra.plugin.digitalocean.spaces.key.Create
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
name: reports-reader
grants:
- bucket: reports
permission: READ
- id: log_key
type: io.kestra.plugin.core.log.Log
message: "Created access key {{ outputs.create_key.accessKey }}"Gantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
create_key |
SUCCESS 0.07s | SUCCESS 0.06s |
log_key |
SUCCESS 0.04s | SUCCESS 0.03s |
Logs synthesis: Creating DigitalOcean Spaces access key 'reports-reader' with 1 grant(s), then Created access key DO00…. No warning when the key is set.
Outputs synthesis: name, accessKey, grants: [{bucket: reports, permission: read}], createdAt, and secretKey: {value: <AES ciphertext>, type: io.kestra.datatype:aes_encrypted}. Request body: {"name":"reports-reader","grants":[{"bucket":"reports","permission":"read"}]}.
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 logs · v2.0.5 logs · v1.3.42 outputs · v2.0.5 outputs
Flow 2: digitalocean_get_spaces_key (✅ SUCCESS)
Flow YAML
id: digitalocean_get_spaces_key
namespace: company.team
tasks:
- id: get_key
type: io.kestra.plugin.digitalocean.spaces.key.Get
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
accessKey: DO00EXAMPLEACCESSKEY
- id: log_grants
type: io.kestra.plugin.core.log.Log
message: "Key {{ outputs.get_key.name }} has grants {{ outputs.get_key.grants }}"Gantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
get_key |
SUCCESS 0.87s | SUCCESS 0.65s |
log_grants |
SUCCESS 0.03s | SUCCESS 0.08s |
Logs synthesis: Fetching DigitalOcean Spaces access key DO00EXAMPLEACCESSKEY.
Outputs synthesis: name: reports-writer, accessKey, grants: [{bucket: reports, permission: readwrite}], createdAt. No secretKey key.
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 outputs · v2.0.5 outputs
Flow 3: digitalocean_list_spaces_keys (✅ SUCCESS)
Flow YAML
id: digitalocean_list_spaces_keys
namespace: company.team
tasks:
- id: list_keys
type: io.kestra.plugin.digitalocean.spaces.key.List
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
bucket: reports
permission: READWRITE
- id: log_total
type: io.kestra.plugin.core.log.Log
message: "{{ outputs.list_keys.total }} key(s) can write to the reports bucket"Gantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
list_keys |
SUCCESS 0.06s | SUCCESS 0.61s |
log_total |
SUCCESS 0.05s | SUCCESS 0.08s |
Logs synthesis: 1 key(s) can write to the reports bucket.
Outputs synthesis: rows (1 key), size: 1, total: 1. Query sent: ?bucket=reports&permission=readwrite&per_page=200 (permission lowercased).
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 logs · v2.0.5 logs · v1.3.42 outputs · v2.0.5 outputs
Flow 4: digitalocean_delete_spaces_key (✅ SUCCESS)
Flow YAML
id: digitalocean_delete_spaces_key
namespace: company.team
tasks:
- id: delete_key
type: io.kestra.plugin.digitalocean.spaces.key.Delete
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
accessKey: DO00EXAMPLEACCESSKEYGantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
delete_key |
SUCCESS 0.05s | SUCCESS 0.03s |
Logs synthesis: Deleting DigitalOcean Spaces access key DO00EXAMPLEACCESSKEY; the mock received DELETE /v2/spaces/keys/DO00EXAMPLEACCESSKEY and answered 204.
Outputs synthesis: No outputs (VoidOutput).
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 logs · v2.0.5 logs
Flow 5: qa_rotate_key (✅ SUCCESS)
Flow YAML
id: qa_rotate_key
namespace: qa.digitalocean
tasks:
- id: create_key
type: io.kestra.plugin.digitalocean.spaces.key.Create
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
name: job-reports-reader
grants:
- bucket: reports
permission: READ
- bucket: logs
permission: READWRITE
- id: get_key
type: io.kestra.plugin.digitalocean.spaces.key.Get
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
accessKey: "{{ outputs.create_key.accessKey }}"
- id: list_bucket_keys
type: io.kestra.plugin.digitalocean.spaces.key.List
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
bucket: reports
- id: use_secret
type: io.kestra.plugin.core.http.Request
uri: http://qa-digitalocean25-mock:8080/echo
method: POST
contentType: application/json
body: '{"accessKey": "{{ outputs.create_key.accessKey }}", "secretKey": "{{ outputs.create_key.secretKey }}"}'
- id: revoke_key
type: io.kestra.plugin.digitalocean.spaces.key.Delete
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
accessKey: "{{ outputs.create_key.accessKey }}"
- id: summary
type: io.kestra.plugin.core.log.Log
message: "Created {{ outputs.get_key.name }} ({{ outputs.create_key.accessKey }}) with {{ outputs.get_key.grants | length }} grant(s); {{ outputs.list_bucket_keys.total }} key(s) on reports; secretKey output type: {{ outputs.create_key.secretKey.type ?? 'n/a' }}"Gantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
create_key |
SUCCESS 0.07s | SUCCESS 0.04s |
get_key |
SUCCESS 0.04s | SUCCESS 0.05s |
list_bucket_keys |
SUCCESS 0.03s | SUCCESS 0.04s |
use_secret |
SUCCESS 0.08s | SUCCESS 0.06s |
revoke_key |
SUCCESS 0.05s | SUCCESS 0.04s |
summary |
SUCCESS 0.03s | SUCCESS 0.04s |
Logs synthesis: Created job-reports-reader (DO00…) with 2 grant(s); 5 key(s) on reports; secretKey output type: n/a. The n/a shows that {{ outputs.create_key.secretKey }} renders as a plain string downstream.
Outputs synthesis: The /echo endpoint of the mock received exactly the secret it had issued for this key, through {{ outputs.create_key.secretKey }} in an HTTP Request body. Get returns the same two grants; Delete revoked the created key.
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 logs · v2.0.5 logs · v1.3.42 outputs · v2.0.5 outputs
Flow 6: qa_create_fullaccess (✅ SUCCESS)
Flow YAML
id: qa_create_fullaccess
namespace: qa.digitalocean
tasks:
- id: create_key
type: io.kestra.plugin.digitalocean.spaces.key.Create
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
name: qa-admin
grants:
- permission: FULLACCESSGantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
create_key |
SUCCESS 0.07s | SUCCESS 0.04s |
Logs synthesis: One INFO line, no warning.
Outputs synthesis: Request body grant: {"bucket":"","permission":"fullaccess"} (empty bucket, as the API expects). Output grants: [{bucket: "", permission: fullaccess}], secretKey encrypted.
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 outputs · v2.0.5 outputs
Flow 7: qa_create_no_grants (✅ SUCCESS)
Flow YAML
id: qa_create_no_grants
namespace: qa.digitalocean
tasks:
- id: create_key
type: io.kestra.plugin.digitalocean.spaces.key.Create
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
name: qa-no-accessGantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
create_key |
SUCCESS 0.04s | SUCCESS 0.04s |
Logs synthesis: One INFO line.
Outputs synthesis: Request body {"name":"qa-no-access","grants":[]}; output grants: [], secretKey encrypted.
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 outputs · v2.0.5 outputs
Flow 8: qa_create_mixed_grants (✅ FAILED as expected)
Flow YAML
id: qa_create_mixed_grants
namespace: qa.digitalocean
tasks:
- id: create_key
type: io.kestra.plugin.digitalocean.spaces.key.Create
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
name: qa-mixed
grants:
- permission: FULLACCESS
- bucket: reports
permission: READGantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
create_key |
FAILED 0.06s | FAILED 0.05s |
Logs synthesis: ERROR FULLACCESS cannot be combined with bucket-scoped grants: use a single FULLACCESS grant, or only READ/READWRITE grants.
Outputs synthesis: No request reached the mock.
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 logs · v2.0.5 logs
Flow 9: qa_create_scoped_no_bucket (✅ FAILED as expected)
Flow YAML
id: qa_create_scoped_no_bucket
namespace: qa.digitalocean
tasks:
- id: create_key
type: io.kestra.plugin.digitalocean.spaces.key.Create
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
name: qa-no-bucket
grants:
- permission: READWRITEGantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
create_key |
FAILED 0.03s | FAILED 0.04s |
Logs synthesis: ERROR A READWRITE grant needs a bucket name.
Outputs synthesis: No request reached the mock.
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 logs · v2.0.5 logs
Flow 10: qa_create_pebble (✅ SUCCESS)
Flow YAML
id: qa_create_pebble
namespace: qa.digitalocean
inputs:
- id: key_name
type: STRING
defaults: qa-pebble-key
- id: grants
type: JSON
defaults: '[{"bucket": "reports", "permission": "READ"}, {"bucket": "archive", "permission": "READWRITE"}]'
tasks:
- id: create_key
type: io.kestra.plugin.digitalocean.spaces.key.Create
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
name: "{{ inputs.key_name }}"
grants: "{{ inputs.grants }}"
- id: list_by_name
type: io.kestra.plugin.digitalocean.spaces.key.List
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
name: "{{ inputs.key_name }}"
fetchType: FETCH_ONEGantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
create_key |
SUCCESS 0.04s | SUCCESS 0.05s |
list_by_name |
SUCCESS 0.03s | SUCCESS 0.04s |
Logs synthesis: INFO lines only.
Outputs synthesis: Grants rendered from the JSON input and sent as [{reports, read}, {archive, readwrite}]. list_by_name sent ?name=qa-pebble-key and returned row with the new key, size: 1, total: 1.
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 outputs · v2.0.5 outputs
Flow 11: qa_list_paged_store (✅ SUCCESS)
Flow YAML
id: qa_list_paged_store
namespace: qa.digitalocean
tasks:
- id: list_store
type: io.kestra.plugin.digitalocean.spaces.key.List
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
perPage: 2
fetchType: STORE
- id: list_none
type: io.kestra.plugin.digitalocean.spaces.key.List
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
permission: READ
fetchType: NONE
- id: read_store
type: io.kestra.plugin.core.log.Log
message: "STORE total={{ outputs.list_store.total }} NONE(permission=read) total={{ outputs.list_none.total }} uri={{ outputs.list_store.uri }}"Gantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
list_store |
SUCCESS 0.09s | SUCCESS 0.09s |
list_none |
SUCCESS 0.06s | SUCCESS 0.04s |
read_store |
SUCCESS 0.04s | SUCCESS 0.03s |
Logs synthesis: STORE total=8 NONE(permission=read) total=4 uri=kestra:///…ion.
Outputs synthesis: 4 pages followed through links.pages.next (?per_page=2, then page=2..4). The STORE file (1.1 KiB Ion) is listed on both versions, and on 2.0.5 its preview renders all 8 rows from the binary Ion. list_none returned only the count.
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 logs · v2.0.5 logs · v1.3.42 outputs · v2.0.5 outputs
Flow 12: qa_get_not_found (✅ FAILED as expected)
Flow YAML
id: qa_get_not_found
namespace: qa.digitalocean
tasks:
- id: get_key
type: io.kestra.plugin.digitalocean.spaces.key.Get
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
accessKey: DO00DOESNOTEXISTGantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
get_key |
FAILED 0.05s | FAILED 0.06s |
Logs synthesis: ERROR DigitalOcean API returned HTTP 404: resource not found. Verify baseUrl … The resource you were accessing could not be found.
Outputs synthesis: None.
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 logs · v2.0.5 logs
Flow 13: qa_delete_not_found (✅ FAILED as expected)
Flow YAML
id: qa_delete_not_found
namespace: qa.digitalocean
tasks:
- id: delete_key
type: io.kestra.plugin.digitalocean.spaces.key.Delete
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
accessKey: DO00DOESNOTEXISTGantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
delete_key |
FAILED 0.04s | FAILED 0.05s |
Logs synthesis: Same 404 message as above.
Outputs synthesis: None.
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 logs · v2.0.5 logs
Flow 14: qa_create_rate_limited (✅ FAILED as expected)
Flow YAML
id: qa_create_rate_limited
namespace: qa.digitalocean
tasks:
- id: create_key
type: io.kestra.plugin.digitalocean.spaces.key.Create
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
name: rate-limited
grants:
- bucket: reports
permission: READGantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
create_key |
FAILED 1.05s | FAILED 1.04s |
Logs synthesis: ERROR DigitalOcean API rate limit hit (HTTP 429). Honor the retry-after response header before retrying. API Rate limit exceeded.
Outputs synthesis: None. The mock saw the POST twice (one retry about 1 s apart) before the task failed; harmless on a 429 since no key is created.
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 logs · v2.0.5 logs
Flow 15: qa_billing_nonregression (✅ SUCCESS)
Flow YAML
id: qa_billing_nonregression
namespace: qa.digitalocean
tasks:
- id: balance
type: io.kestra.plugin.digitalocean.billing.GetBalance
apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
baseUrl: http://qa-digitalocean25-mock:8080
- id: log_status
type: io.kestra.plugin.core.log.Log
message: "Balance {{ outputs.balance }}"Gantt (key set)
| Task | 1.3.42 | 2.0.5 |
|---|---|---|
balance |
SUCCESS 0.03s | SUCCESS 0.05s |
log_status |
SUCCESS 0.03s | SUCCESS 0.03s |
Logs synthesis: Balance {…monthToDateBalance:23.44, accountBalance:12.23…}.
Outputs synthesis: monthToDateBalance: 23.44, accountBalance: 12.23, monthToDateUsage: 11.21, generatedAt.
Screenshots: v1.3.42 gantt · v2.0.5 gantt · v1.3.42 outputs · v2.0.5 outputs
Key unset runs
Flows 1, 5 and 6 were run again on both versions without the encryption key: all SUCCESS, with the WARN lines above (1.3.42 logs, 2.0.5 logs). Downstream tasks then log Unable to decrypt the output as encryption is not configured and still get the plain value.
Observations (not caused by this PR)
- 🟢 With
fetchType: STORE,sizeis0while 8 rows are stored (total: 8). This comes from the sharedtoPageOutputinAbstractDigitalOceanTask, unchanged here, so every List task in the plugin behaves the same. - 🟢
Listrows keep the API's snake_case keys (access_key,created_at) whileGet/Createexpose camelCase (accessKey,createdAt). This matches the other List tasks of the plugin.
Timeouts
None. Every execution finished within 2 s. The first execution right after a 2.0.5 boot answered 504 to the API call that created it, but the execution itself ran and succeeded.
# Conflicts: # AGENTS.md # README.md # src/main/resources/doc/io.kestra.plugin.digitalocean.md # src/main/resources/metadata/index.yaml
What changes are being made and why?
Closes #24 (part of #10). This is the Spaces keys slice, after Snapshots (#17), Billing (#18) and Block Storage Actions (#23).
There was no way to manage Spaces access keys from a flow, e.g. to create a key scoped to one bucket for a job and revoke it afterwards. This adds a
spaces.keysubgroup on/v2/spaces/keys:spaces.key.List: lists the keys, optionally filtered by name, bucket or permissionspaces.key.Get: reads one key's name and bucket grantsspaces.key.Create: creates a key with bucket grants (READ or READWRITE), or a single FULLACCESS grantspaces.key.Delete: revokes a keyDigitalOcean returns the secret key only once, in the create response.
Createoutputs it as anEncryptedString, the same wayplugin-aws'GetAuthTokenandplugin-ceph'sCreateUserexpose credentials, so it is not stored in cleartext in the execution outputs, and a later task still gets the plain value through{{ outputs.create_key.secretKey }}.GetandListnever include it.Createalso rejects FULLACCESS mixed with bucket-scoped grants and a scoped grant without a bucket before calling the API: the API docs say FULLACCESS takes priority when both are sent, which would silently widen the key.I left out the update endpoint: the docs say only the name can be changed, so it didn't seem worth a task.
Endpoints and fields taken from DigitalOcean's OpenAPI spec, plus the metadata, icon and docs entries for the new subgroup.
How the changes have been QAed?
mainafter feat(snapshot): add snapshot tasks and volume CreateSnapshot #17 and feat(billing): add balance, billing history and invoice tasks #18). Dropping the encryption, sending a null bucket for FULLACCESS, removing the mixed-grants check or sending the permission in uppercase each makes a test fail. I added an encryption key tosrc/test/resources/application.ymlfor the encryption test.baseUrlpoints to the mock; drop it to hit the real API):The secret's plain value appears nowhere in the execution or its logs. A second flow passed
{{ outputs.create_key.secretKey }}to an HTTP request, and the mock received the exact secret it had issued.Before / after
Plugin list: the new Spaces Keys group shows up. The screenshots were taken before #17 and #18 landed, so the Snapshots and Billing groups are not in them.
Editor: the released plugin rejects
spaces.key.Create, this branch validates it.The demo flow running end to end, and the stored
create_keyoutput with the secret encrypted.Setup Instructions
A DigitalOcean API token in a
DIGITALOCEAN_TOKENsecret, with thespaces_keyscopes the tasks need (spaces_key:read,spaces_key:create_credentials,spaces_key:delete). To get the secret key encrypted in the outputs, Kestra needskestra.encryption.secret-keyconfigured; without it Kestra stores the output as is and logs a warning.Contributor Checklist ✅