メインコンテンツまでスキップ

Unreal Engine Module - Running DS on Armada - Setting up a dedicated server IAM client

Last updated on January 13, 2024

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.

  1. Open AccelByte's Demo Admin Portal dashboard and select your game namespace. On the side menu panel, select Authorizations > IAM Clients.

    IAM client in Admin Portal side menu panel

  2. You will be directed to a new menu. Select the Create New button to create a new IAM client.

    IAM client page

  3. 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.

      Creating a new IAM client

  4. Your newly created server IAM client information will be displayed like the following.

    Newly created server IAM client

  5. Next, you need to add permissions to the server IAM Client. Go to the Permissions tab and then click the Add button.

    Adding permission to the server IAM client

  6. Then, add the following permissions. These permissions are needed for your game DS to manage matchmaking-related services.

    ResourcePermission
    NAMESPACE:{namespace}:DSM:SERVERUpdate
    NAMESPACE:{namespace}:SESSION:GAMECreate, Read, Update, Delete
    NAMESPACE:{namespace}:SESSION:GAME:PLAYERCreate
    NAMESPACE:{namespace}:SESSION:PARTYRead
    ADMIN:NAMESPACE:{namespace}:SESSION:GAMEUpdate
    ADMIN:NAMESPACE:{namespace}:SESSION:PARTYRead
    NAMESPACE:{namespace}:MATCHMAKING:BACKFILLCreate, Update, Delete
  7. Your final server IAM client's permissions should look like this.

    Configured server IAM client permissions

  8. 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.

  1. Open AccelByte's Demo Admin Portal dashboard and select your game namespace. On the side menu panel, select Authorizations > IAM Clients.

    IAM client in Admin Portal side menu panel

  2. You will be directed to a new menu. Next, select the Create New button to create a new IAM client.

    IAM client page

  3. 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.

      Creating a new IAM client

  4. Your newly created DS-Uploader IAM client information will be displayed like the following.

    Newly created DS-Uploader IAM client

  5. Next, you need to add permissions to the DS-Uploader IAM client. Go to the Permissions tab and then click the Add button.

    Adding permission to the DS-Uploader IAM client

  6. Then, add the following permissions. These permissions will allow you to upload your DS to Armada.

    ResourcePermission
    NAMESPACE:{namespace}:DSUS:CONFIGCreate, Update
    NAMESPACE:{namespace}:DSM:SERVERCreate, Update
    NAMESPACE:{namespace}:DSUS:IMAGECreate, Read, Update
    ADMIN:NAMESPACE:{namespace}:DSM:CONFIGCreate, Read, Update
    NAMESPACE:{namespace}:DSM:CONFIGRead
  7. Your final DS-Uploader IAM client's permissions should look like this.

    Configured DS-Uploader IAM client

  8. 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.

  1. Open the DefaultEngine.ini file located in /Config/DefaultEngine.ini of your Byte Wars project in your favorite code editor.

  2. Find the [/Script/AccelByteUe4Sdk.AccelByteServerSettings] section inside the DefaultEngine.ini and add the data as shown below. Replace the XXXXXXXX with the Client ID and Client's Secret you just created in the Create Server IAM Client section.

    [/Script/AccelByteUe4Sdk.AccelByteServerSettings]
    ClientId=XXXXXXXX
    ClientSecret=XXXXXXXX
    Namespace=bytewars
    PublisherNamespace=accelbyte
    RedirectURI="http://127.0.0.1"
    BaseUrl="https://demo.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.
  3. Save the DefaultEngine.ini file and rebuild your Byte Wars project.

References