Authenicate Webservice for push notifications - web-services

I am working on WP7 app that require Push notifications. As per Microsoft requirement, Web-service should be authenticated over TLS. How to setup certificate on my shared hosting so that my webservice will be authenticated for push service.

This document might help you http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff941099%28v=vs.92%29.aspx. Also, I wanted to clarify that it is not mandatory as you are suggesting above. Paraphrasing: Microsoft recommends that one should send notifications over HTTPS instead of HTTP. Also, this would ok if the service can do with 500 push notifications per subscription per day. Ref:
We recommend setting up an authenticated web service to send your
notifications to the Microsoft Push Notification Service, because
communication occurs over an HTTPS interface for better security.
Authenticated web services do not have a daily limit on the number of
push notifications they can send. Unauthenticated web services, on the
other hand, are throttled at a rate of 500 push notifications per
subscription per day.
Hopefully this helps you out.

Related

System design : AWS chat application with API Gateway / SQS - how does server send message to recipient?

This is a system design question about creating a messaging application (like WhatsApp or FB messenger).
I saw a video that had the users connected via websocket to the API Gateway , then API GW pushed the message onto SQS - which was then polled by the EC2 compute layer to process the message (store it in the db) and hopefully send the message back to recipient.
How can the backend ec2 / compute layer send the message to the recipient (Bob) ? Can it just call a route on the API Gateway and it would know the connection details of the recipient and where to send? Would there need to be an additional caching layer to store info about the connection details of every user? I'm newer to AWS so not sure how this is accomplished and whether you can call API GW to send back to a user.
Also if you know how group chat would work please share.
As mentioned in the documentation, your backend EC2 servers can send messages to the connected clients directly via the #connections API. This documentation page walks you through how to do that.
For this, you'll need to add the connectionId to the header. See this answer on how to do so.

GCP Monitoring Alert Notification Channel (Web Hook) with Slack Webhook

I'm trying to use Slack Incoming web hook in a GCP monitoring notification channel of type Web hook. The Slack web hook URL is working good and works without any authentication.
But there seems to be no action when testing this. Can't I use the GCP Monitoring notification Webhook to link it with Incoming Web hook of Slack? Did web hook in google cloud notification channels need to be protected with authentication or it can be without it?

How to send notifications to a specific user with AWS SNS?

I am developing an app like Dominoes. In which, I would like to send a Push notification to the Customer, when his/her Order is prepared.
I had been using OneSignal to do so (through sending notification to a particular player id), and now we would like to do it with AWS SNS Service, as we are using bunch of different AWS Services too.
We don't want any marketing/bulk push notifications, the SNS Service would do only one thing - send a particular message from the Restaurants' Mobile (using REST API), and it would reach the Customer's mobile.
With OneSignal, we used to give the PlayerID/UserID of the receiver. Does this method apply to AWS SNS too? Also, we could only work with HTTPS POST requests in our platform.
Any help is appreciated :)
Thanks!

Is it necessary to use Amazon SNS when using Firebase Cloud Messaging (FCM) on AWS to send notifications?

I have an existing mobile app that can receive push notifications and I have an existing backend application that exposes an API for sending notifications to the app. The backend application uses Firebase Cloud Messaging (FCM), so it could be considered a wrapper around FCM. My backend application uses the Firebase Admin SDK to create messages and send them to Firebase. My customers hit an API exposed by my backend application (so, if we assume that the customer is using Postman, then the flow for sending a message is: Postman->My backend application->Firebase->Mobile app).
Until now I have been running my backend application on a local server, and it works fine. But now I need to deploy this on AWS. My question is: is it necessary to use Amazon SNS or not? I don't really need any additional functionality from AWS, I just want AWS to permit the required communication.
For example, I dont need to go to an AWS interface to enter the token to send messages to my phone. I already have an API exposed through my backend for sending messages. So, should I even bother to set up SNS?
I know that at a minimum I will have to make my firebase project google credentials available to my instance on AWS (in a file located at the path specified using GOOGLE_APPLICATION_CREDENTIALS). What other configuration steps would be needed? Thanks a lot.
After some investigation I found that it is not necessary to use Amazon SNS to achieve what I wanted to achieve.
I was able to deploy my server application (which uses Firebase Cloud Message) to AWS, and the messages arrive on the mobile phones without any problem.
I initialized my backend application using the steps described on the Google Firebase site: https://firebase.google.com/docs/admin/setup

Google Cloud Api Authorization

I want to use google cloud pub sub to implement Facebook kind of notifications in blog application which has following architecture
I have a both web and android device as a client for rest services exposed.
Those rest services has been secured using OAuth2 (spring security).
When user create a blog then if someone comment on that post, the concern owner can get the notifications. Only authorized user can create a post or comment and the concern person can see the notifications
I don't want user to authorize again with Google so how I can incorporate the api's in my architecture using pull notification
You typically wouldn't use Google Cloud Pub/Sub in the client in the type of setup you describe. Cloud Pub/Sub isn't designed to scale to a number of subscriptions that are on the order of number of phones. Instead, you'd want to use Firebase Cloud Messaging. Firebase has a model that handles registration of devices to receive messages that is more in line with what you are thinking of, e.g., Set Up a Firebase Cloud Messaging Client App on Android and
Implementing a Firebase Cloud Messaging Client on Chrome
What you may use Cloud Pub/Sub for is communication between different services. For example, perhaps the service that handles blog posts publishes messages on a Cloud Pub/Sub topic that your notification service subscribes to. The notification service would process the message and send out Firebase Cloud Messaging messages to end users as appropriate.