Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track public admin url for tails file #411

Merged
merged 1 commit into from
Mar 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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