Component
Configuration portal
Problem to solve
The Device registry displays unregistered Device IDs under:
INBOUND REQUESTS → Awaiting registration
An inbound request may appear even when the administrator did not initiate provisioning and does not recognize the Device ID.
For example, an unknown request for Device ID AB12C3 appeared in the portal. The current interface provides only a Register action. There is no way to dismiss, reject, or remove an unknown request.
The administrator should not be forced to register an unknown device or wait up to 24 hours for the pending entry to expire automatically.
Current behavior
The pending-registration interface currently provides only:
- Device ID
- Request count
- Last request time
Register button
The storage layer already provides:
deletePendingDeviceRequest(deviceId)
However, the pending-device API currently implements only GET, and the Admin Portal does not expose a dismiss action.
Deleting a registered device is supported elsewhere in the portal, but that operation must remain completely separate from dismissing a pending registration request.
Desired outcome
Add a Dismiss or Ignore action to each entry under Awaiting registration.
When an administrator dismisses a pending request:
- Display a confirmation dialog containing the Device ID.
- Clearly explain that only the pending request will be removed.
- Do not create or register a Device Profile.
- Do not delete or modify any registered device.
- Remove the pending request from Cloudflare KV.
- Remove the row from the interface after the API confirms success.
- Display a success notification.
- Prevent the same unknown Device ID from immediately reappearing if it continues sending requests.
Example confirmation text:
Dismiss registration request from AB12C3?
This removes only the pending request. It will not register the device or modify any existing Device Profile.
Proposed API
Add an authenticated mutation endpoint such as:
DELETE /api/devices/pending/AB12C3
The endpoint should:
- Require an authenticated administrator session.
- Use the existing admin-mutation security checks.
- Enforce same-origin validation.
- Enforce browser/human verification where required.
- Validate the Device ID using the existing
validDeviceId() function.
- Delete only the corresponding
pending-device:<deviceId> entry.
- Never delete a
device:<deviceId> record.
- Return an idempotent successful response if the pending entry has already disappeared.
- Return a safe error message when the request store is unavailable.
- Never disclose Cloudflare credentials, KV metadata, or private configuration.
Example successful response:
{
"ok": true,
"deviceId": "AB12C3"
}
Reappearance and suppression behavior
Deleting only the current KV entry may not be sufficient because an unknown client can immediately send another configuration request and recreate the pending entry.
Dismissed Device IDs should therefore be temporarily suppressed.
Suggested behavior:
- Store a dismissal marker separately from the pending request.
- Suppress the dismissed Device ID for at least the existing 24-hour inbound-request window.
- Do not increase the request count or recreate the visible pending entry during that period.
- Do not return any registered-device configuration to a dismissed Device ID.
- Continue returning the normal generic
404 Not found response.
- Avoid exposing whether the Device ID was dismissed, unknown, or registered.
- Allow the request to become visible again after the suppression period expires.
- Registering the Device ID intentionally should clear any dismissal marker.
Suggested KV structure:
pending-device:AB12C3
dismissed-pending-device:AB12C3
The dismissal marker should have a TTL and must not contain credentials, tokens, configuration, IP addresses, or unnecessary client information.
User interface
Each pending request row should include two clearly separated actions:
The Dismiss action should:
- Use a secondary or danger visual style.
- Include an accessible label containing the Device ID.
- Require confirmation before sending the request.
- Disable repeated clicks while the request is in progress.
- Remove the row only after the server confirms success.
- Preserve the row and display an error notice if the operation fails.
- Update the
Awaiting registration count immediately after success.
- Hide the complete inbound-request section when no pending requests remain.
The action must remain visually distinct from deleting a registered Device Profile.
Acceptance criteria
Test cases
Dismiss an unknown request
- Request configuration for an unregistered Device ID.
- Confirm that it appears under Awaiting registration.
- Select
Dismiss.
- Confirm the action.
- Verify that the row and its pending KV record are removed.
- Verify that no Device Profile was created.
Cancel dismissal
- Select
Dismiss for a pending request.
- Cancel the confirmation.
- Verify that the row and KV record remain unchanged.
Protect registered devices
- Create a registered Device Profile.
- Create or simulate a pending entry with the same Device ID.
- Dismiss the pending entry.
- Verify that the registered Device Profile and configuration remain intact.
Prevent immediate reappearance
- Dismiss an unknown Device ID.
- Continue requesting its configuration endpoint.
- Verify that the API continues returning the generic
404 response.
- Verify that the Device ID does not immediately return to the pending list.
- Verify that it can appear again only after the dismissal TTL expires.
Register after dismissal
- Dismiss a pending Device ID.
- Intentionally create a Device Profile for the same Device ID.
- Verify that the dismissal marker is removed.
- Verify that the device can retrieve its configuration normally.
Constraints and safety considerations
- Dismissing a request must never be equivalent to deleting a registered device.
- Do not automatically register unknown Device IDs.
- Do not reveal configuration or registration state through different public error responses.
- Do not store source IP addresses, device tokens, credentials, or private request data in dismissal records.
- Do not provide an unauthenticated bulk-delete endpoint.
- A future bulk-clear action, if added, should require separate confirmation and should not be part of this initial change.
Component
Configuration portal
Problem to solve
The Device registry displays unregistered Device IDs under:
INBOUND REQUESTS → Awaiting registration
An inbound request may appear even when the administrator did not initiate provisioning and does not recognize the Device ID.
For example, an unknown request for Device ID
AB12C3appeared in the portal. The current interface provides only a Register action. There is no way to dismiss, reject, or remove an unknown request.The administrator should not be forced to register an unknown device or wait up to 24 hours for the pending entry to expire automatically.
Current behavior
The pending-registration interface currently provides only:
RegisterbuttonThe storage layer already provides:
However, the pending-device API currently implements only
GET, and the Admin Portal does not expose a dismiss action.Deleting a registered device is supported elsewhere in the portal, but that operation must remain completely separate from dismissing a pending registration request.
Desired outcome
Add a Dismiss or Ignore action to each entry under Awaiting registration.
When an administrator dismisses a pending request:
Example confirmation text:
Proposed API
Add an authenticated mutation endpoint such as:
The endpoint should:
validDeviceId()function.pending-device:<deviceId>entry.device:<deviceId>record.Example successful response:
{ "ok": true, "deviceId": "AB12C3" }Reappearance and suppression behavior
Deleting only the current KV entry may not be sufficient because an unknown client can immediately send another configuration request and recreate the pending entry.
Dismissed Device IDs should therefore be temporarily suppressed.
Suggested behavior:
404 Not foundresponse.Suggested KV structure:
The dismissal marker should have a TTL and must not contain credentials, tokens, configuration, IP addresses, or unnecessary client information.
User interface
Each pending request row should include two clearly separated actions:
RegisterDismissThe
Dismissaction should:Awaiting registrationcount immediately after success.The action must remain visually distinct from deleting a registered Device Profile.
Acceptance criteria
DismissorIgnoreaction.404response.Registerbehavior continues to work.Test cases
Dismiss an unknown request
Dismiss.Cancel dismissal
Dismissfor a pending request.Protect registered devices
Prevent immediate reappearance
404response.Register after dismissal
Constraints and safety considerations