deploy: Galena trusts the event senders by their prefixed role names
init.sh wrote the hub's emitter list with --role-prefix but left Galena's *_EVENT_ROLES at their plain defaults, so on a prefixed deployment Galena refused every workflow, signing, negotiation and analysis event. The template now names the four keys and init.sh fills them with the prefix. Found in the Atrium#53 review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -168,6 +168,11 @@ class TestAFreshInitIsOneAccount:
|
||||
hub = _values(tmp_path / "env" / "atrium.env")
|
||||
assert hub["IDENTITY_READER_ROLES"] == "t1_galena_app,t1_sygna_app,t1_counsel_app"
|
||||
assert hub["IDENTITY_MIGRATOR_ROLES"] == "t1_galena_migrator,t1_sygna_migrator,t1_counsel_migrator"
|
||||
# Galena trusts the event senders by their REAL role names too, or it refuses every event.
|
||||
galena = _values(tmp_path / "env" / "galena.env")
|
||||
assert (galena["WORKFLOW_EVENT_ROLES"], galena["SIGNING_EVENT_ROLES"],
|
||||
galena["NEGOTIATION_EVENT_ROLES"], galena["ANALYSIS_EVENT_ROLES"]) == (
|
||||
"t1_workflow_app", "t1_parafa_app", "t1_agora_app", "t1_arbiter_app")
|
||||
|
||||
def test_standalone_is_the_whole_opt_out_at_once(self, tmp_path):
|
||||
"""Never half: the push refuses every half-done combination, so the opt-out writes all of it.
|
||||
|
||||
Vendored
+9
@@ -119,3 +119,12 @@ BACKUP_S3_ENDPOINT=
|
||||
|
||||
OTEL_ENABLED=false
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
|
||||
|
||||
# Who Galena trusts in the shared event log, per kind of event that moves or fills a contract card:
|
||||
# the senders' DATABASE roles (the log's row-level security proves the role). init.sh writes them with
|
||||
# the role prefix; without it the defaults are the plain names, and a prefixed deployment would see
|
||||
# every such event refused.
|
||||
WORKFLOW_EVENT_ROLES=workflow_app
|
||||
SIGNING_EVENT_ROLES=parafa_app
|
||||
NEGOTIATION_EVENT_ROLES=agora_app
|
||||
ANALYSIS_EVENT_ROLES=arbiter_app
|
||||
|
||||
@@ -442,6 +442,12 @@ write_app_files() {
|
||||
# Galena renders its own link-preview tags from this address, so it must carry
|
||||
# the module's path, or every shared link would unfurl as the platform root.
|
||||
set_key "$runtime" GALENA_PUBLIC_URL "$PUBLIC/galena"
|
||||
# The senders it trusts in the event log, with the role prefix (the plain defaults would refuse
|
||||
# every event on a prefixed deployment).
|
||||
set_key "$runtime" WORKFLOW_EVENT_ROLES "$ROLE_PREFIX"workflow_app
|
||||
set_key "$runtime" SIGNING_EVENT_ROLES "$ROLE_PREFIX"parafa_app
|
||||
set_key "$runtime" NEGOTIATION_EVENT_ROLES "$ROLE_PREFIX"agora_app
|
||||
set_key "$runtime" ANALYSIS_EVENT_ROLES "$ROLE_PREFIX"arbiter_app
|
||||
set_key "$runtime" ENCRYPTION_MASTER_KEY "$ENCRYPTION_MASTER_KEY" ;;
|
||||
sygna)
|
||||
set_key "$runtime" APP_BASE_URL "$PUBLIC/sygna"
|
||||
|
||||
Reference in New Issue
Block a user