Add a body-based PUT /api/v1/secrets route so the secret name stays out of the URL
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- api, backend-api-design
Research direction
Start with the existing route at server/orcaster_server/api/v1.py:1171-1204, its request model at server/orcaster_server/schemas/api_v1.py:415-421, and the CLI calls at orcaster/internal/api/client.go:417-422 and 458-465. Read the 422 handler at server/orcaster_server/main.py:699 and its tests, then trace the current route's validation and errors. Done means the new body route, CLI 405 fallback, tests, docs, and Unreleased changelog entry meet the listed acceptance criteria.
Written by the indexing model from the issue text.
Description
Problem
PUT /api/v1/secrets/{name} is the only way to create or replace a secret through the API (server/orcaster_server/api/v1.py:1171-1204). The name travels in the URL path, and the worker scope in ?worker=. A proxy or CDN that logs paths stores the name before the server validates it. If a user pastes a token where the name goes, the token ends up in that log. The docs warn about this (orcaster/README.md:192-198, docs/user-manual.md:3896-3902), and the CLI only guards against known token prefixes.
The CLI builds the path route for orcaster secret set (orcaster/internal/api/client.go:417-422, orcaster/internal/api/client.go:458-465).
Proposed change
- Add
PUT /api/v1/secretswith a JSON body{"name": "...", "value": "...", "worker": "..."}.workeris optional (UUID or name), as?worker=is today. Use a new request model withextra="forbid"and the same validation as the path route:_validated_secret_name, owner check, keyring check and the same errors (worker_deleted,worker_not_found,task_secrets_unconfigured). The response is the sameSecretItem. - Keep
PUT /api/v1/secrets/{name}andDELETE /api/v1/secrets/{name}unchanged. - The 422 handler already hides the received input for every path under
/api/v1/secrets(server/orcaster_server/main.py:699,server/orcaster_server/main.py:708-714). Add a test that confirms it for the new route. - Move
orcaster secret setto the body route. If the server answers 405 (an older server, wherePUT /api/v1/secretsdoes not exist), fall back to the path route once. - Update
orcaster/README.md,docs/user-manual.md(the API section atdocs/user-manual.md:3886-3902and the route table atdocs/user-manual.md:5580) and the docstring ofSecretPutRequest(server/orcaster_server/schemas/api_v1.py:415-421).
Compatibility
- The new route is additive. The path route keeps working, so existing scripts and older CLI binaries are not affected.
- A new CLI against an older server falls back to the path route, so mixed versions keep working during an upgrade.
DELETEstill takes the name in the path. That stays documented.
Acceptance criteria
-
PUT /api/v1/secretswith name, value and optional worker creates or replaces the secret and returns the same metadata as the path route (test). - The new route returns the same errors as the path route for a bad name, a non-owner PAT, missing keys, and an unknown or deleted worker (tests).
- A 422 on the new route does not echo the value or the name (test).
-
orcaster secret setuses the body route, and falls back to the path route when the server answers 405 (Go test with a fake server). -
PUT /api/v1/secrets/{name}keeps working unchanged (existing tests pass). - Existing clients keep working without changes.
-
orcaster/README.mdanddocs/user-manual.mddescribe both routes and recommend the body route. - CHANGELOG entry under Unreleased.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 10
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AInvirion/orcaster
-
enhancement P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
enhancement good first issue P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug P2 server
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
bug P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
enhancement P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
All issues in AInvirion/orcaster
Similar issues
-
[Resource]: SpaicelyOpenresource-submission validation-passed
Difficulty 1/5 Under an hour Newbie friendliness 68/100
hesreallyhim/awesome-claude-code#3875 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
bvis/aegis-hass#725 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
datasektionen/cashflow#468 ·
-
dont call alembic upgrade until we check whether or not the cache DB has an alembic version stampOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Bug: AttributeError: 'GptOssConfig' object has no attribute 'rope_scaling_factor' with transformers >= 5.xPossibly taken @NimaVaziri claimed this today. OpenPytorch
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA/TensorRT-LLM#23406 ·
Maintainers usually reply within 1 day