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 ·
Rohan Mayya avatar image Rohan Mayya Seth Du ♦ commented ·

I think he means the Multiplayer API, which allows me to get an IP + port from PlayFab to connect to.

It doesn't work because you can't connect to an IP + port from your WebGL client, you need a WSS url. Any solution will be much appreciated :)

0 Likes 0 ·
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.