question

Greggory Addison avatar image
Greggory Addison asked

Trying To Get A Better Understanding Of Client/Server Security

Currently I'm questioning myself and whether I am using the code apis correctly. According to a tutorial I was watching executing cloudscripts aresupposed to be secure from hacking, however I'm concerned that letting a client call ExecuteCloudScript on a cloud script that has impact on things like progression is wrong. For example I'm working on a quest system and once a match is finished I update the quest progress with data from the match. Initially I was doing this with a client execute cloudscript but then though to myself cant the client just call this whenever they want? Or am I over thinking that.

On the other hand switching it to server confuses me as well since I though cloudscripts already ran on some form of server. Then my brain thinks how can I test this without connecting to a server. Should I leave the client calls in the development builds that way I can make sure everything functions before trying to cook a server.

What about calling the client api from the authority?

Will that work, is that a way to secure that client call?

Does the server know about the client api?

What is the best practice on how to go about securing things in the game? This is coming from someone who is used to the Client/Server model in unreal but trying to understand what is actually the secure route on the PlayFab side.

One game that ran into alot of issues is Cycle The Frontier where clients were able to add items and other game changing things by themselves and I want to try to avoid that since my game is progression based.

apisCloudScriptunrealCustom Game Servers
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

·
Gosen Gao avatar image
Gosen Gao answered

Initially I was doing this with a client execute cloudscript but then though to myself cant the client just call this whenever they want?

Yes, client can call your Cloud Script whenever they want, as long as they get enough info to call this API. The reason why using Cloud Script to modify key data is better than doing it on client side is that clients cannot know the logic of your Cloud Script, and you can do some data check before actually updating the data.

What about calling the client api from the authority? Will that work, is that a way to secure that client call?

What do you mean by “calling the client api from the authority”? I don’t know what a hacker can do, but they should be able to hack the client if the client is using HTTP request on the local machine.

Does the server know about the client api?

PlayFab core service knows the Client APIs, we recommend that you can disable the Client APIs you are not using. Refer to API Access Policy - PlayFab | Microsoft Learn.

What is the best practice on how to go about securing things in the game?

It is better to let dedicated server handle all clients’ requests, but as a game without dedicated server, it is a good way to use server less service like Cloud Script or Azure Function to work like a server to secure the data update.

10 |1200

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

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.