Skip to content

Commit

Permalink
Merge pull request #411 from ianco/master
Browse files Browse the repository at this point in the history
Track public admin url for tails file
  • Loading branch information
andrewwhitehead authored Mar 11, 2020
2 parents 47d6be5 + 91af7fb commit ef9b823
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions demo/runners/support/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}",
{
Expand Down

0 comments on commit ef9b823

Please sign in to comment.