Setting up the AIO Container: Admin Accounts

By default, the system is configured with an admin account called admin@thrilltech.io. This account has the ability to control all resources for the thrilltech oorganisation. You will have noticed that in all of the setup steps above, the owner_id or brand_id values were either thrilltech or thrilltech:brand1.

The ThrillPots system implements a "resource ownership" model which ensures that jackpot objects are not modifiable by unauthorized accounts.

Have a look at thrilltech:brand1. The first part before the : is the "organisation" or "operator id". The second part after the : is the "organisational unit" or "brand".

Creating a new ThrillPots admin account for a different organisation

If you want to create and manage ThrillPots resources for a different organisation/operator, you will first need to create a new orgnisation and admin account for that organisation. All of these actions are done through Thrill-ID.

The next steps assume that you are authenticated as admin@thrilltech.io (as per Step 0 in the setup steps)

1. Create a new organisation

We first need to register a new organisation in Thrill-ID. For the purposes of this example, lets create a new organisation called "new-operator" which has 2 casino brands: new-mega-casino and new-mega-sportsbook.

To do this, make the following call to Thrill-ID:

POST http://localhost:9000/admin/organisations

Header: Authorization Value: Bearer AUTH_TOKEN_FOR_ADMIN@THRILLTECH.IO

Body:

{
    "id": "new-operator",
    "units": [
        "new-mega-casino",
        "new-mega-sportsbook"
    ],
    "enabled": true,
}

You should receive a 200 OK.

Now we can create the new admin account for the new organisation

2. Create a new admin account

To create a new administrator account for the new-operator organisation we just created, we need to make another call to Thrill-ID, this time to create the actual account:

POST http://localhost:9000/admin/accounts

  • Header: Authorization
  • Value: Bearer AUTH_TOKEN_FOR_ADMIN@THRILLTECH.IO

Body:

{
    "account_type": "User",
    "username": "admin@new-operator.com",
    "password": "password",
    "org_unit": {
        "org_id": "new-operator"
    },
    "permissions": [
        {
            "system_id": "thrillpots",
            "permissions": [{
                "resource_id": "*",
                "permission": "Admin"
            }]
        }

    ]
}

You should receive a 200 OK along with a response body showing you the newly created account.

3. Test the new admin account

Go back to Step 0 in the setup instructions and change the username and password to the new accounts username and password and try to authenticate. If everything went right, you should receive a new token for the account and can now proceed with managing ThrillPots resources for the new-operator organisation.

Once you are authenticated with the admin account for the new-operator organisation, you will be able to create Jackpot templates, instances, sources etc for the new-operator organisation.

4. Create the Operator and Brands in ThrillPots

We now need to create the operator and associated brands in ThrillPots. To do this we make the following calls:

Add Operator

POST http://localhost:8084/config/operators

  • Header: Authorization
  • Value: Bearer AUTH_TOKEN_FOR_ADMIN@THRILLTECH.IO

Body:

[
    {
        "id": "new-operator",
        "name": "New Operator"
    }
]

Add Brands to Operator

POST http://localhost:8084/config/operators/new-operator/brands

  • Header: Authorization
  • Value: Bearer AUTH_TOKEN_FOR_ADMIN@THRILLTECH.IO

Body:

[
    [
        "new-mega-casino",
        "new-mega-sportsbook@"
    ]
    {
        "id": "new-mega-casino",
        "name": "Mega Casino"
    },
    {
        "id": "new-mega-sportsbook",
        "name": "Mega Sportsbook"
    }
]