Repository navigation
Keep the licence keys out of the data update errors - #175
Merged
Merged
Conversation
reqwest names the URL it requested in its errors, and that URL is the formatted one, whose query carries the licence keys. The service put the error into its own message, so each key reached the error a caller gets and the warning the scheduler logs. The message now takes the error without its URL, with its causes, and names the configured URL.
… cloud request engine does
This was referenced Oct 27, 2026
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #159.
Problem
FiftyOneUrlFormatterwrites the licence keys into the query of the URL each data update poll requests (pipeline-engines/src/data_file.rsline 72). reqwest names the URL it requested in every error, and the service wrote that error into its own message (pipeline-engines/src/data_update_service.rslines 597 to 602 and 645 to 650). So each key reached the error a caller gets, the warning the scheduler logs (line 737) and the error an engine builder returns when update on start-up fails. #159 has the messages.Change
request_error_messagegives a request error's message and each of its causes, from an error with its URL removed by reqwest'sError::without_url. Both messages that report a request error use it, and go on naming the configured URL, which carries no key.check_for_update_from_url, which takes the data file's licence keys out of the message by value withfiftyone_pipeline_core::redact::redact_with, as the cloud request engine does for its credentials. That covers a key that reaches a message some other way. The poll itself moves topoll_update_url.How it was verified
New tests in
pipeline-engines/tests/remote_refresh.rspoll through the Distributor formatter with a known licence key:a_failed_connection_keeps_the_licence_key_out_of_the_errorpolls a port nothing listens on, and checks the error names the configured URL and the cause, and not the key.a_failed_download_keeps_the_licence_key_out_of_the_errorpolls a server that promises 1,000 bytes and sends five, and checks the same.Before the change, on a branch holding only the new tests, both fail, each message carrying the key:
After it, both pass.
Locally on Windows, with all seven fixes of this sweep merged together (#175, #178, #182, #184, #194, #195 and #196),
cargo test --no-fail-fast -p fiftyone-pipeline-engines -p fiftyone-device-detection-onpremise -p fiftyone-ip-intelligence-onpremise -p fiftyone-device-detection -p fiftyone-ip-intelligence -- --nocapture, with51DEGREES_DD_PATHnaming the Lite Hash file,Enterprise-HashV41.hashbeside it, and51DEGREES_IPI_PATHnaming the ASN file,51Degrees-LiteV41.ipibeside it, gives 130 passed, 0 failed and 2 ignored across 24 test binaries. With the fixes merged,cargo doc --workspace --no-depswithRUSTDOCFLAGS="-D warnings"passes, andrustfmt --checkpasses on every file the seven fixes change.cargo clippy --workspace --all-targets -- -D warningson the merged fixes has not run yet. ThePull Requestworkflow, which builds and tests each pull request on every platform, is waiting for approval to run.Behaviour that changes
A failed poll's error, and the warning logged with it, no longer carry the licence keys. They now carry what went wrong, for example
error sending request: client error (Connect): tcp connect error: ..., where before they said onlyerror sending request for url (...)with the formatted URL.What remains