Obtain your app key

This section describes how you can add the app key for executing sample applications and smart contracts on TBSP on Google Cloud Platform.

TBSP on Google Cloud Platform uses route validation to ensure that only authorized users are able to interact with the blockchain environment. 

After setting up your Docker SDK container or local machine described in the previous step, you can choose to run sample applications with or without route validation. By default, route validation is enabled.

You can obtain your app key via the UI or via the command line.

Video

The video below shows you how to obtain your app key via the user interface and the command line.

AppKey_GCP

UI

Ensure that you have logged in with the sysadmin user before logging in with the admin user. More information can be found here.

Log into the UI with the admin user.

Screen Shot 2020-05-25 at 3.15.19 PM

Navigate to the top right corner and click on App keys:

Screen Shot 2020-05-25 at 3.17.28 PM

Click Add key to create a key. Select ng-rt-digitalAsset and select the desired domain. Click Create.

Screen Shot 2020-05-25 at 3.10.22 PM

Now, select ng-rt-smartContracts and select the desired domain. Click Create.

Screen Shot 2020-05-25 at 3.13.49 PM

Now, select ng-rt-admin and select the desired domain. Click Create.

Screen Shot 2020-06-08 at 12.49.57 PM

Command Line

Log in with admin user 

First, the admin user then logs in with the generated password for the admin user. 

Set your credentials:

tymlez-dev config setCredentials --username=admin --password=<GENERATED_PASSWORD> --role=admin --context=cloud

As an added security measure, the admin must acquire a JWT token for first-time login:

tymlez-dev auth getJWTToken --username=admin --password=<GENERATED PASSWORD FROM OUTPUT>

The admin should also change the password after logging in for the first time:

tymlez-dev utils changePassword --username=admin --oldPassword=<GENERATED_PASSWORD> --newPassword=<NEW_PASSWORD>

Create app keys

After logging in as admin, the admin user creates an app key for the application ng-rt-digitalAsset.
To execute the sample applications and smart contracts on TBSP on GCP with route validation,  the app key for the specific plugin is required.
Create an app key for the ng-rt-digitalAsset plugin; this enables you to execute sample applications.
tymlez-dev utils addAppKey --username=admin --plugin=ng-rt-digitalAsset --domain=D01

Create an app key for the ng-rt-smartContracts plugin; this enables you to execute the smart contracts.

tymlez-dev utils addAppKey --username=admin --plugin=ng-rt-smartContracts --domain=D01
Create an app key for the ng-rt-admin plugin; this enables you to upload plugins to your running TBSP instance on Google Cloud Platform:
tymlez-dev utils addAppKey --username=admin --plugin=ng-rt-admin --domain=D01
After adding your app keys, you can execute a number of sample applications and smart contracts.
You can also upload plugins to your running TBSP instance on Google Cloud Platform.

Navigation

Now, you can run some sample applications.