Introduction
A shipment integration reads pending orders and publishes shipment updates. Its current repository example looks clean, but a removed API key may still grant access. You are responsible for containing that exposure and restoring the pending dispatch run.
Apply the Git investigation, targeted revocation, scope selection, private configuration, and business verification practiced in the guided labs. Complete the shipment result while preserving the unrelated monitor. The challenge starts in its own prepared environment.
Recover the Shipment Integration
Current Situation
The dispatch team uses a prepared worker to read pending orders and publish shipment updates. For example, order O-201 should receive state ready after the batch is processed. A key was removed from the current repository example, but an alert indicates it remains recoverable in history. The dispatch batch is pending. An unrelated availability monitor must keep working; a temporary pause in dispatch is acceptable during containment.
The environment uses the same local training provider, Git methods, manager UI, INI format, and two terminal roles as the guided labs. It is synthetic and does not require an external account.
Use the credentials from this VM, not a previous lab. As in the guided labs, this provider uses 401 for an invalid or revoked key, 403 for a valid key without the required scope, and 200 for an accepted read. The worker reads the private file on every invocation; it does not require a restart.
Scope
- Workstation opens in
/home/labex/project/repository. Its three commits andshipping-example.inicontain the historical evidence. The current example is not the runtime configuration. - Integration runs as
keyworkerin/home/labex/project. The private configuration isruntime/job.ini; the unchanged worker is/opt/keylab/worker.py, accepting a batch name as its argument. - The API is
http://127.0.0.1:8000. Key Manager administers credentials using the operator token in/home/labex/.config/keylab/operator-token. - The independent monitor uses
lab_key_monitor_onlywithGET /v1/health.
| Operation | Required scope | Business purpose |
|---|---|---|
GET /v1/orders |
orders:read |
Read pending orders |
POST /v1/shipment-updates |
shipment-updates:write |
Publish shipment states |
GET /v1/results |
orders:read |
View received batch results |
GET /v1/customers |
customers:read |
Unrelated customer directory |
GET /v1/health |
health:read |
Separate monitor |
Your Goal
The historically exposed credential no longer grants API access. The unchanged shipment worker uses a distinct, dedicated replacement in its private runtime configuration, and the receiving service contains the complete dispatch shipment result under that replacement. Customer-directory access remains unavailable to the replacement, and the unrelated monitor remains healthy.
Acceptance Criteria
- The historical leaked key is revoked and gets
401for order access while the API remains reachable. - The configured replacement is active and has exactly the two shipment business scopes. It is distinct from the leaked key.
/home/labex/project/runtime/job.inibelongs tokeyworker, has mode600, and is readable by that service account. The new secret occurs in neither repository files nor its commits.- The unchanged worker has read the assigned
dispatchbatch under the configured replacement and the receiving API has accepted both orders,O-201andO-202, each with stateready, under the same replacement ID. - The replacement receives
403for customer-directory access. The unchanged monitor credential still receives200from the health endpoint.
Hints
Where can a removed secret remain?
Compare the current example with its earlier commits. Match the historical key ID to the manager's record; a display name alone does not identify the credential.
Why does a valid replacement still fail?
The worker performs both an input request and an output request. Use the endpoint table to distinguish insufficient scope from a wrong or revoked secret. A shell variable does not update the private runtime file.
Which evidence establishes recovery?
A demo or terminal message alone is insufficient. Look at the assigned batch in the receiving API and compare its key ID with the configured replacement. Keep the prepared worker unchanged.
Summary
You transferred incident response from a support summary job to a shipment integration. A complete response invalidates the historical secret, restores the real business operation under a dedicated restricted credential, keeps secrets outside version control, and preserves unrelated service access.



