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

Bluesky => AP: Expire and refresh DID docs #1201

Closed
ShreyanJain9 opened this issue Jul 22, 2024 · 8 comments
Closed

Bluesky => AP: Expire and refresh DID docs #1201

ShreyanJain9 opened this issue Jul 22, 2024 · 8 comments
Labels
bug User-facing breakage and reliability issues within Bridgy Fed.

Comments

@ShreyanJain9
Copy link

When bridging a Bluesky post including an image to AP, Bridgy uses the blob url from my old PDS, which doesn't have it and can't serve it.

Bridgy is probably just not aware that my PDS migration ever happened, since there's not really an obvious sign of it to a service just consuming the Relay firehose and bridging the content to AP. Maybe this is something Bridgy should keep track of for bridged accounts, or it could use links to the AppView CDN instead of linking directly to the PDS blobs. I prefer the PDS approach, but using the CDN might be a much easier fix.

@snarfed
Copy link
Owner

snarfed commented Jul 23, 2024

Yup, your instincts are spot on, we just need to refresh our locally stored DID docs regularly. Should be straightforward!

@snarfed snarfed added the now label Jul 23, 2024
@snarfed
Copy link
Owner

snarfed commented Jul 23, 2024

OK @ShreyanJain9 I've manually refreshed your DID doc. Mind trying again? If blobs work now, that confirms this hypothesis.

@ShreyanJain9
Copy link
Author

They work exactly as expected now! Thank you 🫡

@ShreyanJain9 ShreyanJain9 reopened this Jul 23, 2024
@snarfed snarfed changed the title Bluesky => AP: Bridged blobs reference old PDS after migration Bluesky => AP: Expire and refresh DID docs Jul 23, 2024
@snarfed snarfed removed the now label Jul 25, 2024
@Tamschi
Copy link
Collaborator

Tamschi commented Oct 31, 2024

@snarfed This should be solved already, right? As long as Bridgy Fed also reacts to DID doc updates it sees for users who are bridged at the time, I mean.

@Tamschi Tamschi added the bug User-facing breakage and reliability issues within Bridgy Fed. label Oct 31, 2024
@snarfed
Copy link
Owner

snarfed commented Oct 31, 2024

Sadly it's not really solved afaik. Bridgy Fed would need to subscribe to the PLC directory's audit log, https://github.com/did-method-plc/did-method-plc#audit-logs , which it doesn't yet do. Afaik there isn't a websocket stream there yet, so we'd need to poll. (Confirmed.)

Alternatively, the PDS might emit #account events for DID doc changes - see #1119 - but I suspect not. Those aren't officially documented yet anyway. 😕

@snarfed
Copy link
Owner

snarfed commented Jan 4, 2025

#account etc events are now documented, https://atproto.com/specs/account#pds-account-migration , but I can't tell if PDS migrations or other DID doc updates generate #account events on the relay firehose. Hrm.

@snarfed
Copy link
Owner

snarfed commented Jan 4, 2025

Aha, bluesky-social/atproto#3175 has the answer:

Overall, this means that account migration should result in three events coming from the relay: an #identity (from new PDS), an #account (from new PDS), and a #commit (from new PDS). The #account from the old PDS is usually ignored.

OK! So the conclusion here is probably that I should refresh DID docs on all #account and #identity events.

@snarfed
Copy link
Owner

snarfed commented Jan 6, 2025

Done! At least going forward. Existing accounts with stale DID docs can be refreshed by clicking the 🔁 button on their Bridgy Fed user page.

@snarfed snarfed closed this as completed Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug User-facing breakage and reliability issues within Bridgy Fed.
Projects
None yet
Development

No branches or pull requests

3 participants