Skip to content
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

[autoendpoint] Validate the user and subscription when handling incoming notifications #156

Closed
AzureMarker opened this issue Jun 16, 2020 · 0 comments · Fixed by #160 or #231
Closed
Assignees
Labels
3 Estimate - Small...ish

Comments

@AzureMarker
Copy link
Contributor

See WebPushSubscriptionSchema::validate_uaid_month_and_chid in the Python autopush server.

This validation makes sure that the user and subscription/channel exist and are well formed (not missing required data). There is also some logic for updating users and dropping inactive users. Lastly, the user data is made available in the subscription object.

This functionality may need some refactoring; there's a lot of different actions being done in this "validation". This will also be one of the first autoendpoint features which uses the database, so that may increase the estimate of this issue.

@AzureMarker AzureMarker added the 3 Estimate - Small...ish label Jun 16, 2020
@AzureMarker AzureMarker added this to the Autoendpoint Rust Server milestone Jun 16, 2020
@AzureMarker AzureMarker self-assigned this Jun 16, 2020
@AzureMarker AzureMarker added this to Scheduled in Services Engineering Jun 16, 2020
@AzureMarker AzureMarker moved this from Scheduled to In Progress in Services Engineering Jun 18, 2020
@AzureMarker AzureMarker moved this from In Progress to In Review in Services Engineering Jun 22, 2020
@AzureMarker AzureMarker linked a pull request Jun 22, 2020 that will close this issue
Services Engineering automation moved this from In Review to Done Jun 25, 2020
AzureMarker added a commit that referenced this issue Jun 25, 2020
* Update autoendpoint so only one cadence version is used

* Remove unnecessary Rc and Box in DynamoStorage and support Send + Sync

DynamoDbClient and StatsdClient both are internally Arc, so clones are
already cheap and refer to the same data. This change also makes
DynamoStorage Send + Sync.

* Autoendpoint: Connect to DynamoDB

* Add DynamoStorage::get_user_channels

* Read and validate user data in the Subscription extractor

* Remove router_data from DynamoDbUser

The associated validation is not included, so it is unused.

Closes #156
@tublitzed tublitzed moved this from Done to Archived in Services Engineering Jun 29, 2020
This was referenced Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment