Unreal Engine Module - Running DS on Armada - Setting up a dedicated server IAM client
About
Identity and Access Management (IAM) clients are used to give permissions to certain resources in AGS. In order for your game's dedicated server (DS) to be able to communicate with Armada, you need to set up the correct IAM clients permissions.
Create server IAM client
The server IAM client is an IAM client that gives permissions for your game's DS. Sufficient permissions are needed for your game DS to communicate with Armada.
Open AccelByte's Demo Admin Portal dashboard and select your game namespace. On the side menu panel, select Authorizations > IAM Clients.
You will be directed to a new menu. Select the Create New button to create a new IAM client.
Then, fill out the server IAM configurations. Click Create once you're done. Here are the configurations needed to be set, leave the rest as is:
Set the Client Type as confidential to prevent unwanted access.
Fill in the client's secret or alternatively generate one. Please save this client's secret somewhere safe as you won't be able to access it later.
Client Name can be whatever you want it to be, but for the purpose of this tutorial, we will be using
ByteWars-GameServer
as the name.Set Redirect URI to
http://127.0.0.1
. We don't want the DS to be redirected to anywhere upon successfully logging in, hence we use a localhost address.
Your newly created server IAM client information will be displayed like the following.
Next, you need to add permissions to the server IAM Client. Go to the Permissions tab and then click the Add button.
Then, add the following permissions. These permissions are needed for your game DS to manage matchmaking-related services.
Resource Permission NAMESPACE:{namespace}:DSM:SERVER Update NAMESPACE:{namespace}:SESSION:GAME Create, Read, Update, Delete NAMESPACE:{namespace}:SESSION:GAME:PLAYER Create NAMESPACE:{namespace}:SESSION:PARTY Read ADMIN:NAMESPACE:{namespace}:SESSION:GAME Update ADMIN:NAMESPACE:{namespace}:SESSION:PARTY Read NAMESPACE:{namespace}:MATCHMAKING:BACKFILL Create, Update, Delete Your final server IAM client's permissions should look like this.
Congratulations! You have successfully created a new server IAM client.
Create DS-Uploader IAM client
The DS-Uploader IAM client is an IAM client that gives permission for you to upload your DS to Armada. You will learn more about how to upload your DS on the next section.
Open AccelByte's Demo Admin Portal dashboard and select your game namespace. On the side menu panel, select Authorizations > IAM Clients.
You will be directed to a new menu. Next, select the Create New button to create a new IAM client.
Then, fill out the DS-Uploader IAM configurations. Once completed, click the Create button. Here are the configurations that needed to be set, leave the rest as is:
Set the Client Type as public.
Client Name can be whatever you want it to be, but for the purpose of this tutorial, we will be using
ByteWars-DSUploader
as the name.As we don't need to redirect the DS-Uploader upon logging in, set Redirect URI to
http://127.0.0.1
.
Your newly created DS-Uploader IAM client information will be displayed like the following.
Next, you need to add permissions to the DS-Uploader IAM client. Go to the Permissions tab and then click the Add button.
Then, add the following permissions. These permissions will allow you to upload your DS to Armada.
Resource Permission NAMESPACE:{namespace}:DSUS:CONFIG Create, Update NAMESPACE:{namespace}:DSM:SERVER Create, Update NAMESPACE:{namespace}:DSUS:IMAGE Create, Read, Update ADMIN:NAMESPACE:{namespace}:DSM:CONFIG Create, Read, Update NAMESPACE:{namespace}:DSM:CONFIG Read Your final DS-Uploader IAM client's permissions should look like this.
Congratulations! You have successfully created a new DS-Uploader IAM client.
Setup server SDK configuration
Once your server IAM client is configured in the Admin Portal, you then need to configure the server SDK in your game project. This section will guide you on how to do so.
Open the
DefaultEngine.ini
file located in/Config/DefaultEngine.ini
of your Byte Wars project in your favorite code editor.Find the
[/Script/AccelByteUe4Sdk.AccelByteServerSettings]
section inside theDefaultEngine.ini
and add the data as shown below. Replace theXXXXXXXX
with the Client ID and Client's Secret you just created in the Create Server IAM Client section.- AGS
- AGS Starter
[/Script/AccelByteUe4Sdk.AccelByteServerSettings]
ClientId=XXXXXXXX
ClientSecret=XXXXXXXX
Namespace=bytewars
PublisherNamespace=accelbyte
RedirectURI="http://127.0.0.1"
BaseUrl="https://demo.accelbyte.io"[/Script/AccelByteUe4Sdk.AccelByteServerSettings]
ClientId=XXXXXXXX
ClientSecret=XXXXXXXX
Namespace=bytewars
PublisherNamespace=accelbyte
RedirectURI="http://127.0.0.1"
BaseUrl="https://<Game TitleID>.gamingservices.accelbyte.io"Tip- ClientId is randomly generated and used to uniquely identify your server IAM client.
- ClientSecret is the secret (password) for your server IAM client.
- Namespace is the namespace ID of your game namespace that you have created in Module 1: Initial Setup
- PublisherNamespace is the publisher ID of your publisher namespace. The default value is
accelbyte
. - RedirectURI is the URI that will redirect your game server after the server authorization completed. The default value is
http://127.0.0.1
. - BaseUrl is the base URL of your Admin Portal environment.
Save the
DefaultEngine.ini
file and rebuild your Byte Wars project.