|
| 1 | +# Copyright (c) 2024 Cloudflare, Inc. All rights reserved. |
| 2 | +# SPDX-License-Identifier: BSD-3-Clause |
| 3 | + |
| 4 | +main = "build/worker/shim.mjs" |
| 5 | +compatibility_date = "2023-12-21" |
| 6 | + |
| 7 | +# Don't ask to send metrics to Cloudflare. The worker may be run from a container. |
| 8 | +send_metrics = false |
| 9 | + |
| 10 | +# Before starting the worker, run `worker-build`. |
| 11 | +[build] |
| 12 | +command = "worker-build --dev" |
| 13 | + |
| 14 | +[[rules]] |
| 15 | +globs = ["**/*.wasm"] |
| 16 | +type = "CompiledWasm" |
| 17 | +fallthrough = false |
| 18 | + |
| 19 | +# NOTE: Variables marked as SECRET need to be provisioned securely in |
| 20 | +# production. In particular, they will not be passed as environment variables |
| 21 | +# as they are here. See |
| 22 | +# https://developers.cloudflare.com/workers/wrangler/commands/#secret. |
| 23 | + |
| 24 | +[env.helper] |
| 25 | +name = "daphne-helper-aggregator" |
| 26 | + |
| 27 | +[env.helper.vars] |
| 28 | +DAP_DEPLOYMENT = "dev" |
| 29 | +DAP_WORKER_MODE = "aggregator" |
| 30 | +DAP_DURABLE_HELPER_STATE_STORE_GC_AFTER_SECS = "30" |
| 31 | +DAP_DURABLE_AGGREGATE_STORE_GC_AFTER_SECS = "30" |
| 32 | + |
| 33 | +# SECRET |
| 34 | +TASKPROV_SECRETS_ENABLED = "true" |
| 35 | +TASKPROV_SECRETS_VDAF_VERIFY_KEY_INIT = "b029a72fa327931a5cb643dcadcaafa098fcbfac07d990cb9e7c9a8675fafb18" |
| 36 | +TASKPROV_SECRETS_PEER_AUTH_EXPECT_LEADER_TOKEN = "I-am-the-leader" |
| 37 | + |
| 38 | +[env.helper.vars.SERVICE_CONFIG] |
| 39 | +env = "oxy" |
| 40 | +role = "helper" |
| 41 | +max_batch_duration = 360000 |
| 42 | +min_batch_interval_start = 259200 |
| 43 | +max_batch_interval_end = 259200 |
| 44 | +supported_hpke_kems = ["x25519_hkdf_sha256"] |
| 45 | +default_version = "v09" |
| 46 | +report_storage_epoch_duration = 300000 |
| 47 | +base_url = "http://127.0.0.1:8788" |
| 48 | +default_num_agg_span_shards = 4 |
| 49 | + |
| 50 | +[env.helper.vars.TASKPROV_HPKE_COLLECTOR_CONFIG] |
| 51 | +id = 23 |
| 52 | +kem_id = "p256_hkdf_sha256" |
| 53 | +kdf_id = "hkdf_sha256" |
| 54 | +aead_id = "aes128_gcm" |
| 55 | +public_key = "047dab625e0d269abcc28c611bebf5a60987ddf7e23df0e0aa343e5774ad81a1d0160d9252b82b4b5c52354205f5ec945645cb79facff8d85c9c31b490cdf35466" |
| 56 | + |
| 57 | +[dev] |
| 58 | +ip = "0.0.0.0" |
| 59 | + |
| 60 | +[env.helper.durable_objects] |
| 61 | +bindings = [ |
| 62 | + { name = "DAP_AGGREGATE_STORE", class_name = "AggregateStore" }, |
| 63 | + { name = "DAP_TEST_STATE_CLEANER", class_name = "TestStateCleaner" }, |
| 64 | +] |
| 65 | + |
| 66 | + |
| 67 | +[[env.helper.kv_namespaces]] |
| 68 | +binding = "DAP_CONFIG" |
| 69 | +# KV bindings are in a looked up in a namespace identified by a 16-byte id number. |
| 70 | +# This number is assigned by calling |
| 71 | +# |
| 72 | +# wrangler kv:namespace create <NAME> |
| 73 | +# |
| 74 | +# for some unique name you specify, and it returns a unique id number to use. |
| 75 | +# Here we should use something like "leader" for the <NAME>. |
| 76 | +id = "<assign-one-for-the-leader>" |
| 77 | +# A "preview id" is an id used when running in "wrangler dev" mode locally, and |
| 78 | +# can just be made up. We generated the number below with the following python |
| 79 | +# code: |
| 80 | +# |
| 81 | +# import secrets |
| 82 | +# print(secrets.token_hex(16)) |
| 83 | +# |
| 84 | +preview_id = "24c4dc92d5cf4680e508fe18eb8f0281" |
| 85 | + |
| 86 | +[env.leader] |
| 87 | +name = "daphne-leader-aggregator" |
| 88 | + |
| 89 | +[env.leader.vars] |
| 90 | +DAP_DEPLOYMENT = "dev" |
| 91 | +DAP_WORKER_MODE = "aggregator" |
| 92 | +DAP_DURABLE_HELPER_STATE_STORE_GC_AFTER_SECS = "30" |
| 93 | +DAP_DURABLE_AGGREGATE_STORE_GC_AFTER_SECS = "30" |
| 94 | + |
| 95 | +# SECRET |
| 96 | +TASKPROV_SECRETS_ENABLED = "true" |
| 97 | +TASKPROV_SECRETS_VDAF_VERIFY_KEY_INIT = "b029a72fa327931a5cb643dcadcaafa098fcbfac07d990cb9e7c9a8675fafb18" |
| 98 | +TASKPROV_SECRETS_PEER_AUTH_EXPECT_COLLECTOR_TOKEN = "I-am-the-collector" |
| 99 | +TASKPROV_SECRETS_SELF_BEARER_TOKEN = "I-am-the-leader" |
| 100 | + |
| 101 | +[env.leader.vars.SERVICE_CONFIG] |
| 102 | +env = "oxy" |
| 103 | +role = "leader" |
| 104 | +max_batch_duration = 360000 |
| 105 | +min_batch_interval_start = 259200 |
| 106 | +max_batch_interval_end = 259200 |
| 107 | +supported_hpke_kems = ["x25519_hkdf_sha256"] |
| 108 | +default_version = "v09" |
| 109 | +report_storage_epoch_duration = 300000 |
| 110 | +base_url = "http://127.0.0.1:8787" |
| 111 | +default_num_agg_span_shards = 4 |
| 112 | + |
| 113 | +[env.leader.vars.TASKPROV_HPKE_COLLECTOR_CONFIG] |
| 114 | +id = 23 |
| 115 | +kem_id = "p256_hkdf_sha256" |
| 116 | +kdf_id = "hkdf_sha256" |
| 117 | +aead_id = "aes128_gcm" |
| 118 | +public_key = "047dab625e0d269abcc28c611bebf5a60987ddf7e23df0e0aa343e5774ad81a1d0160d9252b82b4b5c52354205f5ec945645cb79facff8d85c9c31b490cdf35466" |
| 119 | + |
| 120 | +[env.leader.durable_objects] |
| 121 | +bindings = [ |
| 122 | + { name = "DAP_AGGREGATE_STORE", class_name = "AggregateStore" }, |
| 123 | + { name = "DAP_TEST_STATE_CLEANER", class_name = "TestStateCleaner" }, |
| 124 | +] |
| 125 | + |
| 126 | +[[env.leader.kv_namespaces]] |
| 127 | +binding = "DAP_CONFIG" |
| 128 | +# KV bindings are in a looked up in a namespace identified by a 16-byte id number. |
| 129 | +# This number is assigned by calling |
| 130 | +# |
| 131 | +# wrangler kv:namespace create <NAME> |
| 132 | +# |
| 133 | +# for some unique name you specify, and it returns a unique id number to use. |
| 134 | +# Here we should use something like "leader" for the <NAME>. |
| 135 | +id = "<assign-one-for-the-leader>" |
| 136 | +# A "preview id" is an id used when running in "wrangler dev" mode locally, and |
| 137 | +# can just be made up. We generated the number below with the following python |
| 138 | +# code: |
| 139 | +# |
| 140 | +# import secrets |
| 141 | +# print(secrets.token_hex(16)) |
| 142 | +# |
| 143 | +preview_id = "24c4dc92d5cf4680e508fe18eb8f0281" |
| 144 | + |
| 145 | +[[migrations]] |
| 146 | +tag = "v1" |
| 147 | +new_classes = [ |
| 148 | + "AggregateStore", |
| 149 | + "GarbageCollector", |
| 150 | + "HelperStateStore", |
| 151 | +] |
| 152 | + |
| 153 | +[[migrations]] |
| 154 | +tag = "v2" |
| 155 | +renamed_classes = [ |
| 156 | + { from = "GarbageCollector", to = "TestStateCleaner" }, |
| 157 | +] |
0 commit comments