From 91af7fbedb4b6d2a3bbfc59039ab6c3907aa1795 Mon Sep 17 00:00:00 2001 From: Ian Costanzo Date: Wed, 11 Mar 2020 07:02:30 -0700 Subject: [PATCH] Track public admin url for tails file Signed-off-by: Ian Costanzo --- demo/runners/support/agent.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/demo/runners/support/agent.py b/demo/runners/support/agent.py index 09c0cc832d..c99de60e8c 100644 --- a/demo/runners/support/agent.py +++ b/demo/runners/support/agent.py @@ -125,13 +125,17 @@ def __init__( self.postgres = DEFAULT_POSTGRES if postgres is None else postgres self.extra_args = extra_args + self.admin_url = f"http://{self.internal_host}:{admin_port}" if RUN_MODE == "pwd": self.endpoint = f"http://{self.external_host}".replace( "{PORT}", str(http_port) ) + self.public_admin_url = f"http://{self.external_host}".replace( + "{PORT}", str(admin_port) + ) else: self.endpoint = f"http://{self.external_host}:{http_port}" - self.admin_url = f"http://{self.internal_host}:{admin_port}" + self.public_admin_url = self.admin_url self.webhook_port = None self.webhook_url = None self.webhook_site = None @@ -202,7 +206,7 @@ async def create_and_publish_revocation_registry(self, credential_def_id, max_cr # Real app should publish tails file somewhere and update the revocation registry with the URI. # But for the demo, assume the agent's admin end-points are accessible to the other agents # Update the revocation registry with the public URL to the tails file - tails_file_url = f"{self.admin_url}/revocation/registry/{revocation_registry_id}/tails-file" + tails_file_url = f"{self.public_admin_url}/revocation/registry/{revocation_registry_id}/tails-file" revoc_updated_response = await self.admin_PATCH( f"/revocation/registry/{revocation_registry_id}", {