Repository navigation
Authenticate a Cloud Request Engine on a license key alone, and send the property list - #64
Merged
Merged
Conversation
…tion of credentials
…the property list The engine builds on a license key with requestedProperties, and sends the list as values whenever one is given, beside a resource key too. It refuses at build only what the cloud service refuses on every request, being no key at all and a license key with no resource key or list. The keys now travel in the body of the data request, as resource and license, and a license key is never put in a URL. The accessible properties request posts the keys when there is a license key, and a resource key on its own fetches them as before. The resource key still names the data route. When a list was sent, the first answer is compared with it, and the names the answer left out are logged once as not covered by the keys.
…ey text - A resource key with a property list and no license key reports a name the answer leaves out as not a Property, as specifications#133 says. - Under a license key alone the missing element and null element messages name the key in use and requestedProperties, and no resource key. - Every pipeline builder that adds a Cloud Request Engine passes the license key and the requested properties. - The failure test's stub names the license key, as the cloud's refusal does, and the test expects only the masked form. - A key that is not blank is kept as given rather than trimmed.
… builders - With a resource key, requested properties and no license key, a name the answer leaves out is not a property, as specifications#133 says, so it is reported as one the cloud service does not know rather than as one the keys do not cover. - The missing element and null element messages say the key in use does not include the product, and give the accessibleproperties hint only where a resource key is in use. Under a license key alone they say the answer holds only the properties requestedProperties names that the license key includes, as the Python package words it for either key. - The Device Detection, IP Intelligence and location pipeline builders pass requestedProperties to the Cloud Request Engine, and the location builder passes licenceKeys too, so a license key alone can be used through each of them. - A key that is not blank is sent as it is given, as .NET and Java send it, where it was trimmed. A blank key still counts as absent. - Two comments no longer say "as it always has".
Under a license key alone a product is also left out when requestedProperties names none of its properties, so the message says the cloud service left the product out of the answer, and the hint that follows gives the causes.
…mple The missing product message said the key in use does not include the product, and the comment beside it said the resource key does not. Under a license key alone the product is also left out when requestedProperties names none of its properties, so the message now says the cloud service left the product out of the answer, and the hint that follows it gives the causes for the keys in use. The IP Intelligence builders' requestedProperties documentation gave a device property as its example, and now gives ip.registeredcountry.
jwrosewell
marked this pull request as ready for review
November 10, 2026 20:27
This was referenced Nov 12, 2026
Draft
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.
Problem
On
rc,CloudRequestEnginecannot be built on a license key alone and cannot be told which properties to ask for. It also puts a license key in the URL of both requests it makes.cloudRequestEngine.jslines 70 to 75 throwCloud engine needs a resourceKey.accessibleproperties?resource=<key>&license=<key>.<resource key>.json?license=<key>.valuesfield.The specification on
rcat d729b7d, which holds specifications#128, #131 and #133, gives every combination in Accepted combinations.The sections this change follows are listed here, all at d729b7d.
licenseand "MUST NOT appear in full in a log entry or an error message".values, and that with a Resource Key and no License Key "each requested Property is added to the Properties the Resource Key carries", a Property the licence does not grant is answered as null with anullreason, "and a name that is not a Property is not returned".accessiblepropertiesrequest with the License Key, sent aslicensein the body of a POST request rather than in the URL".resource, the License Key aslicenseand the list asvalues.#58 is merged. The license key masking draft #58 is on
rcas efbea08, andrcis merged into this branch (8f9fa57). The cloud refuses a license key with an error that names it, and #58 masks the engine's own key in that text.Change
In
fiftyone.pipeline.cloudrequestengineand the pipeline builders.requestedProperties, as a list or one comma separated string, with each name trimmed. A key that is empty or only whitespace counts as absent, and any other key is sent as it is given, as .NET (CloudRequestEngineBuilder.cs) and Java (CloudRequestEngineBuilder.java) send it.errorMessages.noCredential) and a license key with no resource key or list (errorMessages.licenseKeyNeedsProperties). Each message says why the cloud service would refuse every request. A resource key with a list builds, with or without a license key.json, the route that takes none. The body carriesresource,licenseandvalueswhere each is set, after the evidence so evidence cannot replace them.accessiblepropertiesis a POST with the keys in the body. A resource key alone fetches it with a GET as before.evidencekeysis unchanged and needs no key.errorMessages.propertiesNotCovered, which says the properties are not covered by the keys in use. With a resource key and no license key it iserrorMessages.propertiesNotProperties, which says they are not properties the cloud service knows, as specifications#133 asks.errorMessages.elementMissing, logged by the cloud aspect engines, now says the cloud service left the product out of the answer, without naming one cause, andelementNullNoReasonsays the cloud service gave no reason. Each is followed by a hint for the keys in use. Where a resource key is in use the hint points ataccessibleproperties?resource=<key>. Under a license key alone it says the answer holds only the propertiesrequestedPropertiesnames that the license key includes, because a product is also left out whenrequestedPropertiesnames none of its properties.requestedPropertiesto the engine, and the location pipeline builder passeslicenceKeysandrequestedProperties, so a license key alone can be used through each of them. Before, none passedrequestedPropertiesand the location builder passed no license key, so a builder caller with a license key and no resource key was refused with a message naming an option the builder could not pass.readme.mdgains a Credentials section, and the declarations intypes/cover the new messages and builder options.Effect on existing callers
resource, as the Processing section says, so the answer is the same.Errorwhose message names the fix, rather than the stringCloud engine needs a resourceKey.Tests
In
pipeline/fiftyone.pipeline.cloudrequestengine/tests, with a recording request client and no live key.cloudRequestEngineCredentials.test.jscovers every row, the URLs and bodies, the report, and failed requests. The failure stub now answers as the cloud does,Invalid license key(s) supplied: '<key>', and the test expects only****************7890in what is logged and thrown. New since the last review are a resource key with a list whose answer leaves out a name that is not a property, and a key with spaces around it kept as given.cloudEngineMissingElement.test.jschecks the missing and null element messages under a license key alone, and that the resource key message still gives theaccessiblepropertieshint.builderCredentials.test.jsbuilds a pipeline with a license key and a list through each of the five builders.Runs
rc, edb6601tscdeclarations identicalrcat f88193dSetting 'PullRequestSha'lines are ddc33b9macOS was left out of this draft's full build under the 9 November decision. The rc head is built with macOS before it merges into main.
Against the issue
The issue's list of what a change has to cover, written before the specification was corrected, is answered below.
resource,licenseandvaluessent on the data request. Done.values,resourceorlicenseleft out. Left to the reserved Evidence draft, Never send resource, license, licence or values from Evidence to the cloud #61, whose lines this draft keeps away from.accessiblepropertiesunder a license key alone. Superseded by specifications#128, which measured a 200 answer to a POST carrying the key, so discovery now posts it.What remains
liveCloudKeys.js), so one needs a license key entitled to cloud properties in CI, and I could not confirm that the key CI holds is one.For #7