-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[hma] Cleanup /m/lookup Hash + Match API #1703
Comments
@Dcallies I can start working on this now |
Gopher it! |
Hey @Dcallies just want to a clarify a few things, maybe I'm missing some context What type of refactoring did you have in mind? It's easy enough to check for the In the ui endpoint
|
Lookup should not allow lookup by URL or lookup by POST with content (which triggers hashing) unless the hashing role is enabled. When you say you looked at the lookup API and it looked fine, did you check to see if you can trigger hashing without the hash role? |
so there's I already implemented the hashing role checks and tested them yup, can't do a GET with a URL or a POST with files unless the hashing role is enabled ✅ |
Some users have asked for an API that will allow them to combine the hash+match API into one call. It turns out this already exists as /m/lookup, but this triggers hashing (high CPU cost) even if the hashing role is not enabled, which defeats the point of roles!
There's also a development/UI version of this already here: https://github.com/facebook/ThreatExchange/blob/main/hasher-matcher-actioner/src/OpenMediaMatch/blueprints/ui.py#L170 - this probably should be replaced with the new and improved method.
Your mission, should you choose to accept it:
The text was updated successfully, but these errors were encountered: