Skip to content

Commit c782722

Browse files
authored
fix: contract transactor key is now an externally provisioned secret (#23)
Needs storacha/storoku#31 to land first. Use the support for externally provisioned secrets in storoku v0.5.2 to make the `CONTRACT_TRANSACTOR_KEY` secret external. It's value will be removed from the repo and we will be able to manage it directly in AWS Secrets Manager. I confirmed this is working as expected in a test on `forge-prod`.
1 parent bb81668 commit c782722

7 files changed

Lines changed: 10 additions & 17 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ jobs:
4141
private-key: ${{ secrets.WARM_STAGING_PRIVATE_KEY }}
4242
indexing-service-proof: ${{ secrets.WARM_STAGING_INDEXING_SERVICE_PROOF }}
4343
egress-tracking-service-proof: ${{ secrets.WARM_STAGING_EGRESS_TRACKING_SERVICE_PROOF }}
44-
contract-transactor-key: ${{ secrets.WARM_STAGING_CONTRACT_TRANSACTOR_KEY }}
4544
cloudflare-zone-id: ${{ secrets.WARM_STAGING_CLOUDFLARE_ZONE_ID }}
4645
cloudflare-api-token: ${{ secrets.WARM_STAGING_CLOUDFLARE_API_TOKEN }}
4746

@@ -61,6 +60,5 @@ jobs:
6160
private-key: ${{ secrets.FORGE_PROD_PRIVATE_KEY }}
6261
indexing-service-proof: ${{ secrets.FORGE_PROD_INDEXING_SERVICE_PROOF }}
6362
egress-tracking-service-proof: ${{ secrets.FORGE_PROD_EGRESS_TRACKING_SERVICE_PROOF }}
64-
contract-transactor-key: ${{ secrets.FORGE_PROD_CONTRACT_TRANSACTOR_KEY }}
6563
cloudflare-zone-id: ${{ secrets.FORGE_PROD_CLOUDFLARE_ZONE_ID }}
6664
cloudflare-api-token: ${{ secrets.FORGE_PROD_CLOUDFLARE_API_TOKEN }}

.github/workflows/terraform.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ on:
3434
required: true
3535
egress-tracking-service-proof:
3636
required: true
37-
contract-transactor-key:
38-
required: true
3937
cloudflare-zone-id:
4038
required: true
4139
cloudflare-api-token:
@@ -59,7 +57,6 @@ env:
5957
TF_VAR_region: ${{ secrets.region }}
6058
TF_VAR_indexing_service_proof: ${{ secrets.indexing-service-proof }}
6159
TF_VAR_egress_tracking_service_proof: ${{ secrets.egress-tracking-service-proof }}
62-
TF_VAR_contract_transactor_key: ${{ secrets.contract-transactor-key }}
6360
TF_VAR_cloudflare_zone_id: ${{ secrets.cloudflare-zone-id }}
6461
CLOUDFLARE_API_TOKEN: ${{ secrets.cloudflare-api-token }}
6562
DEPLOY_ENV: ci

.storoku.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@
1414
"secrets": [
1515
{
1616
"name": "REGISTRAR_DELEGATOR_INDEXING_SERVICE_PROOF",
17-
"variable": true
17+
"variable": true,
18+
"external": false
1819
},
1920
{
2021
"name": "REGISTRAR_DELEGATOR_EGRESS_TRACKING_SERVICE_PROOF",
21-
"variable": true
22+
"variable": true,
23+
"external": false
2224
},
2325
{
2426
"name": "REGISTRAR_CONTRACT_TRANSACTOR_KEY",
25-
"variable": true
27+
"variable": false,
28+
"external": true
2629
}
2730
],
2831
"tables": [

deploy/.env.terraform.tpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ TF_VAR_allowed_account_id=505595374361
77
TF_VAR_region=us-east-2
88
TF_VAR_indexing_service_proof= # enter a value for REGISTRAR_DELEGATOR_INDEXING_SERVICE_PROOF secret
99
TF_VAR_egress_tracking_service_proof= # enter a value for REGISTRAR_DELEGATOR_EGRESS_TRACKING_SERVICE_PROOF secret
10-
TF_VAR_contract_transactor_key= # enter a value for REGISTRAR_CONTRACT_TRANSACTOR_KEY secret
1110
TF_VAR_cloudflare_zone_id= # enter the cloudflare zone id
1211
CLOUDFLARE_API_TOKEN= # enter a cloudflare api token

deploy/app/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ provider "aws" {
4040

4141

4242
module "app" {
43-
source = "github.com/storacha/storoku//app?ref=v0.5.0"
43+
source = "github.com/storacha/storoku//app?ref=v0.5.2"
4444
private_key = var.private_key
4545
private_key_env_var = "REGISTRAR_DELEGATOR_KEY"
4646
principal_mapping = var.principal_mapping
@@ -62,8 +62,9 @@ module "app" {
6262
secrets = {
6363
"REGISTRAR_DELEGATOR_INDEXING_SERVICE_PROOF" = var.indexing_service_proof
6464
"REGISTRAR_DELEGATOR_EGRESS_TRACKING_SERVICE_PROOF" = var.egress_tracking_service_proof
65-
"REGISTRAR_CONTRACT_TRANSACTOR_KEY" = var.contract_transactor_key
6665
}
66+
# enter external secrets (provisioned out-of-band) here
67+
external_secrets = ["REGISTRAR_CONTRACT_TRANSACTOR_KEY",]
6768
# enter any sqs queues you want to create here
6869
queues = []
6970
caches = []

deploy/app/variables.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,3 @@ variable "egress_tracking_service_proof" {
6060
description = "value for registrar_delegator_egress_tracking_service_proof secret"
6161
type = string
6262
}
63-
64-
variable "contract_transactor_key" {
65-
description = "value for registrar_contract_transactor_key secret"
66-
type = string
67-
}

deploy/shared/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ provider "aws" {
4949
}
5050

5151
module "shared" {
52-
source = "github.com/storacha/storoku//shared?ref=v0.5.0"
52+
source = "github.com/storacha/storoku//shared?ref=v0.5.2"
5353
providers = {
5454
aws = aws
5555
aws.dev = aws.dev

0 commit comments

Comments
 (0)