Repository navigation
Open
Description
dpd-api currently marks both these with "TODO-security: This endpoint should probably not exist."
Lines 1544 to 1573 in 2475028
| /// Clear all settings associated with a specific tag. | |
| /// | |
| /// This removes: | |
| /// | |
| /// - All ARP or NDP table entries. | |
| /// - All routes | |
| /// - All links on all switch ports | |
| // Note: This endpoint does not clear multicast groups. | |
| // TODO-security: This endpoint should probably not exist. | |
| #[endpoint { | |
| method = DELETE, | |
| path = "/all-settings/{tag}", | |
| }] | |
| async fn reset_all_tagged( | |
| rqctx: RequestContext<Self::Context>, | |
| path: Path<latest::misc::TagPath>, | |
| ) -> Result<HttpResponseUpdatedNoContent, HttpError>; | |
| /// Clear all settings. | |
| /// | |
| /// This removes all data entirely. | |
| // Note: Unlike `reset_all_tagged`, this endpoint does clear multicast groups. | |
| // TODO-security: This endpoint should probably not exist. | |
| #[endpoint { | |
| method = DELETE, | |
| path = "/all-settings" | |
| }] | |
| async fn reset_all( | |
| rqctx: RequestContext<Self::Context>, | |
| ) -> Result<HttpResponseUpdatedNoContent, HttpError>; |
I'm making adjacent changes to resource tagging, and I'd like to know whether to version-migrate the tagged endpoints or sunset them both. If the former, I'd like to replace the TODO comments. If the latter, I'll open a PR for removal.
tfportd is the only user I've found so far. Not clear to me how to migrate this if we decide to delete the endpoints. Open to suggestions.
Lines 296 to 302 in 2475028
| // If the reset fails, we'll just log the error and continue, as we will | |
| // try to clean-up the any stale settings during the normal reconciliation | |
| // process. If those fail, we log an error and try again on a subsequent | |
| // iterations. | |
| if let Err(e) = client.reset_all_tagged(CLIENT_NAME).await { | |
| error!(log, "Error while flushing old state: {e:?}"); | |
| } |
Metadata
Metadata
Assignees
Labels
No labels
Activity
cfzimmerman commentedon Sep 30, 2026
We probably want to either remove or re-scope these. But since tfportd uses
reset_all_taggedand dpd-client's integration tests usereset_all, swapping them out with something less dramatic will require some care.