Skip to content

Commit 449fe96

Browse files
authored
updated roles/permission doc (#115)
1 parent 785ce90 commit 449fe96

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

.github/aws_kms_how_to.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ Web3-API supports AWS KMS for signing & sending transactions over any EVM chain.
44

55
1. Create IAM user with programmatic access, see [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_console) for more details.
66
2. Add create, get, read permission to KMS, see [here](https://docs.aws.amazon.com/kms/latest/developerguide/control-access.html) for more details.
7+
8+
```
9+
Minimum Permissions Required:
10+
---------------------------
11+
kms:CreateKey
12+
kms:GetPublicKey
13+
kms:Sign
14+
kms:CreateAlias
15+
kms:Verify
16+
```
17+
718
3. Create a AWS KMS key, see [here](https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html) for more details. or, you can use the `/wallet/create` to create a key.
819

920
NOTE:
@@ -27,7 +38,4 @@ Create a `.env` file in the root directory of the project and add the below deta
2738
AWS_ACCESS_KEY_ID=<aws_access_key_id>
2839
AWS_SECRET_ACCESS_KEY=<aws_secret_access_key>
2940
AWS_REGION=<aws_region>
30-
31-
# Required for AWS KMS Admin Wallet
32-
AWS_KMS_KEY_ID=<kms_key_id>
3341
```

.github/google_kms_how_to.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@ Web3-API supports Google KMS for signing & sending transactions over any EVM cha
33
### Steps to set up Google KMS
44

55
1. Enable Google KMS API for your Google project, see [here](https://cloud.google.com/kms/docs/create-encryption-keys#before-you-begin) for more details.
6-
2. Create a Service Account (here)[https://cloud.google.com/iam/docs/service-accounts-create] and create a key under this service account and download the JSON file. This JSON file details will be used to authenticate with Google KMS.
7-
3. Add the below permissions to the service account created in step 2.
6+
2. Create a Service Account (here)[https://cloud.google.com/iam/docs/service-accounts-create]
7+
3. Go to IAM & Admin -> IAM. Select the service account created in step 2 and click `Edit Principal` to add the below roles.
88

99
```
10+
Minimum Roles:
11+
1012
Cloud KMS Admin
1113
Cloud KMS CryptoKey Signer/Verifier
1214
```
1315

14-
4. Create a keyring in Google KMS, see [here](https://cloud.google.com/kms/docs/create-key-ring) for more details.
16+
4. Click on the created Service-Account and go to `Keys` tab.
17+
5. Click `Add Key` -> Create new Key -> select `JSON` & download the JSON file. This JSON file details will be used to authenticate google auth while using Google Cloud KMS.
18+
6. Create a keyring in Google KMS, see [here](https://cloud.google.com/kms/docs/create-key-ring) for more details.
1519

1620
Optional: Create a key in the keyring, see [here](https://cloud.google.com/kms/docs/create-key) for more details. or, you can use the `/wallet/create` to create a key in the keyring.
1721

@@ -24,9 +28,8 @@ Create a `.env` file in the root directory of the project and add the below deta
2428
GOOGLE_APPLICATION_CREDENTIAL_EMAIL=<client_email_from_download_service_account_json>
2529
GOOGLE_APPLICATION_CREDENTIAL_PRIVATE_KEY=<private_key_from_download_service_account_json>
2630
27-
# Required for Google KMS
31+
# Required for Google Cloud KMS
2832
GOOGLE_APPLICATION_PROJECT_ID=<google_project_id>
2933
GOOGLE_KMS_KEY_RING_ID=<key_ring_id>
3034
GOOGLE_KMS_LOCATION_ID=<location_of_key_ring>
31-
GOOGLE_KMS_CRYPTO_KEY_ID=<kms_key_id> # If created on Google Console
3235
```

0 commit comments

Comments
 (0)