Skip to content

Commit

Permalink
feat: update to use tails server image with backwards compatible put,…
Browse files Browse the repository at this point in the history
… get file methods

Signed-off-by: Char Howland <char@indicio.tech>
  • Loading branch information
cjhowland committed May 30, 2023
1 parent aa87a45 commit ff62b91
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion aries_cloudagent/anoncreds/revocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def generate_public_tails_uri(self, rev_reg_def: RevRegDef):
raise AnonCredsRevocationError("tails_server_base_url not configured")

public_tails_uri = (
tails_base_url.rstrip("/") + f"/{rev_reg_def.value.tails_hash}"
tails_base_url.rstrip("/") + f"/hash/{rev_reg_def.value.tails_hash}"
)

self._check_url(public_tails_uri)
Expand Down
4 changes: 3 additions & 1 deletion aries_cloudagent/revocation/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,9 @@ async def on_revocation_registry_init_event(profile: Profile, event: Event):
# Generate the registry and upload the tails file
async def generate(rr_record: IssuerRevRegRecord) -> dict:
await rr_record.generate_registry(profile)
public_uri = tails_base_url.rstrip("/") + f"/{registry_record.revoc_reg_id}"
public_uri = (
tails_base_url.rstrip("/") + f"/{registry_record.revoc_reg_id}"
) # TODO: update to include /hash
await rr_record.set_tails_file_public_uri(profile, public_uri)
rev_reg_resp = await rr_record.send_def(
profile,
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/tails/anoncreds_tails_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async def upload_tails_file(
"tails_server_upload_url setting is not set"
)

upload_url = tails_server_upload_url.rstrip("/") + f"/{filename}"
upload_url = tails_server_upload_url.rstrip("/") + f"/hash/{filename}"

try:
await put_file(
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ services:

tails:
platform: linux/amd64
image: ghcr.io/indicio-tech/tails-server:sha-d45f581
image: ghcr.io/indicio-tech/tails-server:sha-3d2feb2
ports:
- 6543:6543
environment:
Expand Down

0 comments on commit ff62b91

Please sign in to comment.