google / webrisk

Apache License 2.0
67 stars 34 forks source link

Make cloud request configurable #6

Closed heipei closed 5 years ago

heipei commented 5 years ago

Hello Team,

could you make the request that is sent to the Cloud API configurable? What I mean is: If a URL lookup via hash is unsure via the local database and a request to the cloud has to be made (via sb.api.HashLookup), this request could also be made by passing the full URL instead, right? This should obviously not be the default behaviour, but hidden behind a feature flag.

Let me know what you think.

thatjiaozi commented 5 years ago

Hi!

In other words, what you are suggesting is to enable sending a full url to HashLookup instead of just the partial hash, correct?

heipei commented 5 years ago

No, what I mean is: When wrserver has a local match for a hash-prefix, the verification should be done by using the full Lookup API (urls.search) against the Google server. My use-case is that I don't care about the privacy of the URLs I'm requesting against Google's server.

bsurmanski commented 5 years ago

What would be gained by using the Lookup API? Wouldn't it give the same result?

heipei commented 5 years ago

Yes, it would be the same results but the urls.search endpoint has 100k free lookups per month.

thatjiaozi commented 5 years ago

I am sorry, but what you are suggesting is not an approved use of the APIs. Please feel free to reach out to web-risk-support@google.com if you have any other questions.