Firebase and MBED TLSV1.2 - firebase

I am having an issue where I can connect to any HTTPS server other than Firebase Cloud Functions.
I found that the error is occurring during the handshake between the client(me) and the server (Firebase) but i have never experienced this during connection to any other servers.
I am using a STM32F105 with a Wiznet W5500 using the mbed TLSV1.2 encryption libraries. Has anyone had experience in a similar situation? Is there any restrictions when connecting to the Firebase Server?

Do you have the right root CA added? I don't have any Firebase Cloud Functions, but I could successfully connect and download files from https://firebase.google.com using the GeoTrustGlobalCA and mbed-http.
Example code here: https://gist.github.com/janjongboom/3db8a6dd00ee23b7ab73f3c0435de853

Related

What certificate is needed to connect to firebaseio.com?

I have written my own code to connect to Firebase via the REST interface. Recently I have been unable to connect to firebaseio.com because the secure connection cannot be established with the CA certificate I am using.
I am still able to create a secure connection to googleapis.com to handle the login authentication and get the tokens I need for communication.
How do you determine what certificate is needed to validate the connection? I have tried a few of the root CA certs available at https://pki.goog/repository/ but they do not seem to work for firebaseio.com.
WireShark to the rescue! I was able to see the name of the certificates being passed to my device. Firebaseio.com is using one of the certs in this list that I had not tried yet.
After adding that one I was able to connect. How often does Firebase change these certificates? What is the proper method to keep my device up to date with the latest certificates?

Firebase Cloud Functions for devices with old SSL/TLS

I have an IoT device that makes http requests to a Cloud Function. This works ok until I setup a custom domain in Firebase. From the error I get, it looks like the device only supports SSL2, SSL3 and TLS 1.0. Now I'm trying to figure out a solution.
What are the possible solutions for this? Can I "enforce" a SSL/TLS version in a Cloud Function? Maybe I have to put a load balancer in front of the cloud function that supports these old cryptographic protocols?
Thank for your help.
It's not possible to enforce the SSL/TLS version directly from the Cloud Functions.
Your best bet is to use the GCP Cloud Load Balancing where you can set the SSL version to older cyphers.
This can be done by creating a new Policy and set TLS 1.0 for Minimum TLS Version

Firebase deploy error. Server Error. Client network socket disconnected before secure TLS connection was established

I'm trying to deploy a firebase function from my terminal using this comment firebase deploy
But getting this error. Cant understand why its happening.
deploying functions
functions: ensuring required API cloudfunctions.googleapis.com is enabled...
functions: required API cloudfunctions.googleapis.com is enabled
functions: preparing functions directory for uploading...
functions: packaged functions (27.96 KB) for uploading
functions: Upload Error: Server Error. Client network socket disconnected before secure TLS connection was established
Error: Server Error. Client network socket disconnected before secure TLS connection was established
After spending lots of time and investigation I have found that this is a network issue. I am guessing you are trying it from Bangladesh Network.
For some reason Govt has blocked the Google Cloud Storage Upload API, so it is failing to upload.
You should try with VPN. Use Free VPN like Hotspot Shield and try to upload the cloud function. I have finally able to upload my function through VPN. Please try.
I had the same error for quite a while and still happened sometimes.
For a rescue, I use a VPN. It is a network issue. Could be happened because of the ISP or may be a country wise block of Google Cloud Storage AP
From firebase debug log I have found a bit more about this error. I am not sure what could have done for this.
Request causing trouble or error
REQUEST PUT https://storage.googleapis.com/gcf-upload-us-central1-1.zip?
[warn] ! functions: Upload Error: Server Error. Client network socket disconnected before secure TLS connection was established

make my secure server work with firebase cloud messaging (open ports on firewall)

I am Building an Andriod mobile application and I am deploying it on my client server. My client is a telecommunication company with a very secure server. Once We deployed the app, we found out the the firebase cloud messaging is not working. I am sure that the problem is with the client firewall. Could you please advice me how to solve this problem. Looking forward to here your comments and suggestions. Thanks
You need yo open poet 5228-5230. FCM documentation has this info,

Firebase HTTP hosting

This might look like a strange requirement, but I'm working on an IoT system and the "thing"s cannot send "https" request, but I still wish to use Firebase.
So, I was wondering if there is a way to serve my Firebase website over HTTP? Any alternative solution?
just follow the code of robertcedwards on Github
I've been working on this too
the only problem is the simultaneous connection that I am facing right now
I hope it can help you connect your IoT device to firebase through web server (http)

Resources