# Creating App ID in IBM Cloud

## 1. Create IBM Cloud App ID instance

Create one with a name of **appid-example-bank** using the IBM Cloud dashboard [https://cloud.ibm.com/catalog/services/appid](https://cloud.ibm.com/catalog/services/appid)

**NOTE: Make sure you are using your personal account.**

![IBM Cloud App ID Creation](https://3928126737-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHI9hQsrkpOgN4dX6Cj%2Fsync%2F04a4cf7b4be50c4b800afd18b333e124e22cd7d8.png?generation=1609789232418439\&alt=media)

## 2. Configure App ID

* Allow Sign-up and Sign-in using username and password by going to the tab `Cloud Directory` > `Settings`

![allow-sign-in](https://github.com/IBM/example-bank/raw/main/images/allow-sign-in.png)

* Disable Email Verification by going to the tab `Cloud Directory` > `Email Templates` > `Email verification`

![disable-email](https://github.com/IBM/example-bank/raw/main/images/disable-email.png)

* Add an application called **mobile-simulator** in the `Applications` tab. Select "Regular web application". Make sure you also add an `admin` scope.

![application](https://github.com/IBM/example-bank/raw/main/images/new-app.png)

* Create the `admin` role. The scope would be `mobile-simulator/admin`.

![admin](https://github.com/IBM/example-bank/raw/main/images/create-role.png)

* Create Service credentials with the **Writer** Role so that the simulator can create simulated users with the App ID instance. Name it **appid-example-bank-credentials**

![service-scredentials](https://3928126737-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHI9hQsrkpOgN4dX6Cj%2Fsync%2F11c0b39d8fbbbf0d51155a856ca95886c247e2f3.png?generation=1600426878091634\&alt=media)

## 3. Create secrets

* Create secrets of App ID credentials for OpenShift cluster

You can use this script to create the secrets in your OpenShift cluster. This grabs your App ID instance named `appid-example-bank` and service credentials named `appid-example-bank-credentials`

```
$ ./scripts/mapAppIDtoSecrets.sh

secret/bank-oidc-secret created
secret/bank-appid-secret created
secret/bank-iam-secret created
secret/mobile-simulator-secrets created
```
