how can I use firebase hosting as the websocket proxy - firebase

My WebSocket runs in cloud run. I use firebase hosting as a proxy by hosting a rewrite. So I can request the cloud run API through firebase hosting. but WebSocket did not work. what should I do about that?

Related

How to access AWS SNS from an application served by internal classic load balancer?

I have an application running in an AWS EKS cluster, the application is previously serving with a public-facing load balancer thus it can easily AWS SNS service, but due to some security reasons we are asked to move that to serve via the internal load balancer, now after moving to the internal load balancer, the application is working but was not able to access SNS service.
How can we configure the application from the internal network to access the AWS SNS service?
You might be after these documents
https://aws.plainenglish.io/publishing-private-amazon-sns-messages-348d38ffc351
https://docs.aws.amazon.com/sns/latest/dg/sns-vpc-tutorial.html
In Short, as you are within a private network, you need to create VPC Endpoints in order to access the AWS services that are outside of a VPC.

secure https with wordpress on google compute engine , cloud sql proxy and cloud SQL

I am setting up a ecommerce site with following configuration.
1. wordpress on ubuntu on google compute engine VM
2. Database on Cloud SQL in the same google cloud project.
Wordpress connects to localhost and is routed to cloud SQL through cloud proxy. It is setup with service account.
I am using letsencrypt SSL certificate on the VM. With this, I am getting secure http:// on browser only for wp-admin session. I get info https level only, for the user sessions.
I tried SSL, using wordpress "secure db connection" plugin on top of the cloud proxy. It does not connect. Without this SSL, it gives me only info https level.
Please let me know the following:
Is the above configuration (cloud sql proxy for connecting to DB instance. And wordpress on VM with SSL) sufficient ? Is the problem in something else?
anyone successfully did cloud sql proxy with SSL ? or any other way to resolve info https problem?

Host Docker application on Firebase Static Hosting

How can I host an Docker container based app to Firebase static hosting ?
Is it even doable/allowed ?
Or should I host Docker based apps on services like Digital Ocean / Vultr / Linode / AWS instead ?
I'm using Firebase as my main database and since it comes with hosting in the same pricing model I would like to make good use of it and have everything on Google based servers rather than hosting elsewhere (such as Digital Ocean) and connecting to my database which would then be on Google.
Thank you
Firebase Hosting is a static file host: it serves files without executing their content. While it was recently expanded to support hosting of Express.js apps through Cloud Functions, Firebase Hosting is not a generic docker host.

Google Cloud Endpoints: Websockets and JWT

I've been developing a mobile app (iOS) with gRPC via Firebase auth(z). My server is using GKE with the NGinx proxy - so now I'm developing the Web UI for the deeper configuration of a user account. I prefer not to fall back to REST API's, so I was wondering if Google Cloud Endpoints supports websockets, and would it also prevent non-authorised app users from trying to make a request? With websockets I know it's possible, but as I'm tied in with gRPC with Cloud Endpoints, I'm just checking before I fall back to REST API calls (I prefer not to!).
Summary: Does Google Cloud Endpoints support Websockets with JWT auth tokens from Firebase?
Thanks
It looks like ESP supports websockets now, using the "--enable_websocket" flag in the esp config.
Currently, Cloud Endpoints doesn't support WebSockets at all.
Btw, what is your use case for WebSockets? WebSocket won't work with gRPC either. If you just want to talk to your gRPC service from Web UI, transcoding should work. It works with JWT from Firebase auth.
The Google Cloud Endpoints ESP doesn't support websockets.
However, Google Cloud Endpoints have open sourced their Extensible Service Proxy implementation. Internally it's implemented as a custom nginx module. Since Nginx supports websockets, it should be feasible to add support to their nginx:esp module.
But it's definitely out of scope for me. :-)

Firebase Hosting - Compute Engine Server HTTPS & Certificates

I have:
a website hosted on Firebase, implemented around the ReactJS Framework
a server with a REST API deployed on Google Compute Engine
Because Firebase Hosting is served through https it is required that Compute Engine also serves the API through https. Of course if the certificate is self-signed, I would get a silent error in the browser that the connection to the external server is not allowed (certificate warning). I could manually go that url and accept the certificate but that is not an option for production.
It seems like my options are limited to buying a domain, buy a ssl certificate, create a load balancer resource in Google Cloud to which I assign the domain and the certificate. I could install the certificate directly to the server, but I would rather have the load balancer in front and switch to http.
The problem is buying a certificate instead of using the https certificate in Firebase. Do I have other options for making this connection work?
Thanks

Resources