mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
126 stars 41 forks source link

Investigate socketlabs data and api to determine how we will interface with the suppresion list. #9390

Closed KevinMind closed 10 months ago

KevinMind commented 10 months ago

Describe the problem and steps to reproduce it:

Investigation of the socketlabs API:

What happened?

Socketlabs API

BulkRemoval list of emails from suppression list:

url: https://api.socketlabs.com/v2/subaccount/:subaccountId/suppressions/bulk-remove

max 1000 emails

BulkDownload current suppression list:

url: https://api.socketlabs.com/v2/subaccount/:subaccountId/suppressions/download?sortField=suppressionLastUpdate&sortDirection=dsc

Notes:

-- the API supports page size up to 100 and includes total count in response.

-- downloading via csv seems to be quite performant taking <10 seconds.

-- API supports crud for api keys, so we can rotate keys automatically if we want. (here)


< HTTP/1.1 401 Unauthorized
< Content-Type: application/json; charset=utf-8
< Server: Microsoft-IIS/8.0
< Request-Context: appId=cid-v1:298a8cc8-6cfb-4a75-badb-ef6184316de8
< X-Powered-By: ARR/2.5
< Date: Wed, 29 Nov 2023 10:26:36 GMT
< Content-Length: 159
<
* Connection #0 to host api.socketlabs.com left intact
{"error":[{"errorType":"InsufficientPermission","message":"The API key you provided does not have sufficient permission to perform the requested operation."}]}%

I was able to get some requests working, but it seems we do not have permissions for all endpoints.

After a few hours pinging the server, I started getting rejected by the server

kmeinhardt@kevins-mbp addons-server % curl --location 'https://api.socketlabs.com/v2/servers/2301/suppressions/search?pageSize=5&pageNumber=1&sortField=emailAddress&sortDirection=dsc' \
--header 'Authorization: Bearer <token>' --verbose
*   Trying 142.0.183.131:443...
* connect to 142.0.183.131 port 443 failed: Operation timed out
* Failed to connect to api.socketlabs.com port 443 after 75008 ms: Couldn't connect to server
* Closing connection 0
curl: (28) Failed to connect to api.socketlabs.com port 443 after 75008 ms: Couldn't connect to server
kmeinhardt@kevins-mbp addons-server %

Questions:

┆Issue is synchronized with this Jira Task

wagnerand commented 10 months ago

we have very old entries on the suppression list? Should we clear the list and let it refill? Many of the emails will probably never get processed.

I am not sure we are able/allowed clear the list entirely. However, we can certainly remove a large portion, for example accounts we have banned, or based on further criteria.

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-596

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-596

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-596

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-596

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-596

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-596

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-596

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-596

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-596

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-596

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-596

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-596

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-596