question

Trevor Godley avatar image
Trevor Godley asked

How do you generate Playfab Server SSL Certificate for WebGL client?

My WebGL client build needs the playfab server to be SSL certified. When I make a new server build on Playfab, there is a section titled "Upload Certificates". Is this the right thing to use to make my WebGL client happy? If so, how do I generate a valid certificate? The only article I could find on generating SSL certificates for Azure servers is this article, but I'm not sure it applies to this case:

https://azure.microsoft.com/en-gb/blog/obtaining-a-certificate-for-use-with-windows-azure-web-sites-waws/

Any guidance or insight would be much appreciated!

unity3d
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

Could you please clarify that why you say “My WebGL client build needs the playfab server to be SSL certified.”? What does it mean? Do you host your web server on the PlayFab Multiplayer Server? Or do you mean when you test the Https request between the web page and the game server, you are noticed that there is no valid certificate?

We noticed you also posted a question in this thread -- SSL/WSS for multiplayer servers - Playfab Community. As this thread said, the “Upload Certificates” option applies for the Windows container. So, the answer of your first question is you can upload the certificates for your server using this option if you use the Windows container.

Besides, do you want to host the front-end web pages on the PlayFab Multiplayer Server persistently, and access them externally? If so, we would not suggest you host the WebGL web pages on the PlayFab Multiplayer Servers. For clarification, our multiplayer server hosting service is not designed to be used as a web server. Since the server hosts and IP addresses are constantly changing, it means you're unable to properly set up your own domain for the certificate. As this case said, our server hosting service is designed for hosting session-based games. It is not designed to run the persistent web service. If you want to host a web server, you can consider using the Azure App Service and refer to this documentation -- https://docs.microsoft.com/en-us/azure/app-service/configure-ssl-certificat to add the SSL certificates for your web app.

6 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Trevor Godley avatar image Trevor Godley commented ·

Thanks for the reply. I am hosting my WebGL client build on my WordPress website that I have hosted on Bluehost. When I try to call the Playfab MultiplayerAPI from the WebGL client I get a websocket error.

I am using Windows container. Is the solution to upload the certificate of my Bluehost Server to my Playfab server build?

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Trevor Godley commented ·

>>"try to call the Playfab MultiplayerAPI from the WebGL client"

Does it mean the PlayFab API? Which API you are calling? And if it is the case, certificate won' be related, as it is used when the client establishes the connection to server instance.

0 Likes 0 ·
Thomas Mallow avatar image Thomas Mallow Seth Du ♦ commented ·

We're having this same issue. When you have a WebGL client running on a https website, the server it is connected to needs to have an SSL certificate. This is because it uses the Mirror SimpleWebTransport protocol which requires secure websockets. The server needs to have a domain url in order for it to work. It won't work with an IP address and port number.

1 Like 1 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.