Support account migration #177

Open
hach-que opened this Issue Nov 22, 2016 · 178 comments

Comments

Projects
None yet
@hach-que

A lot of people seem to be jumping on https://mastodon.social right now, even though the end goal is to have users separated out across multiple federated instances. However, if people start putting up a lot of content and getting followers on the primary instance, this will be a disincentive to move providers.

I think this largely means that Mastodon needs to support two things:

  • Account import across providers, which should be authenticated on both ends to prevent people bulk copying another person's account, and
  • A "redirected account" field against user accounts, which indicates the full URL of the new user account

When users configure a redirect location against their account (whether explicitly on an account page, or implicitly set during a cross-provider account import), the instance on which the account is should implicitly and automatically redirect followers.

That is, if I have the account @hq on the primary instance (which I do), and I set up the account @hach-que on another Mastodon service, the @hq should:

  • Remain on the primary instance, and not be disabled in any way
  • Show posts from @hach-que after the redirection is set up
  • Disallow posting from the @hq account while ever the redirection is in place
  • Existing followers of @hq should start seeing posts from @hach-que instead
  • New followers of @hq should be allowed to follow the account (and internally, they are following @hq, but see posts from @hach-que)
  • Followers should not actually have their lists updated to follow @hach-que - in the event of a mistaken redirect, removing the redirect should act exactly as if there never was a redirect in the first place

This is just my 2c on how I think this should work, but I'm interested to hear other people's thoughts.

@nex3

This comment has been minimized.

Show comment
Hide comment
@nex3

nex3 Nov 22, 2016

A "redirected account" field would also be very useful for renaming accounts within a single server.

nex3 commented Nov 22, 2016

A "redirected account" field would also be very useful for renaming accounts within a single server.

@Gargron

This comment has been minimized.

Show comment
Hide comment
@Gargron

Gargron Nov 22, 2016

Member

Sadly there's nothing in the OStatus protocol currently that's like "go follow my new account instead of this one". Best I can offer is migrating content (but reblogs/favs would not come along) and who you were following.

Member

Gargron commented Nov 22, 2016

Sadly there's nothing in the OStatus protocol currently that's like "go follow my new account instead of this one". Best I can offer is migrating content (but reblogs/favs would not come along) and who you were following.

@hach-que

This comment has been minimized.

Show comment
Hide comment
@hach-que

hach-que Nov 22, 2016

I had a bit of a look at the OSocial spec, and it's not 100% clear on what extensions the protocol permits in the <author /> section. All the documentation and links on Portable Contacts (poco) from Wikipedia seem to be dead. Is it possible we can add a new poco tag that contains a redirect or forwarding URL?

edit: or I guess a <link> tag with a different rel attribute?

hach-que commented Nov 22, 2016

I had a bit of a look at the OSocial spec, and it's not 100% clear on what extensions the protocol permits in the <author /> section. All the documentation and links on Portable Contacts (poco) from Wikipedia seem to be dead. Is it possible we can add a new poco tag that contains a redirect or forwarding URL?

edit: or I guess a <link> tag with a different rel attribute?

@nex3

This comment has been minimized.

Show comment
Hide comment
@nex3

nex3 Nov 22, 2016

Unless I'm missing something, shouldn't this be protocol-independent? As @hach-que describes it, as far as followers of the original account are concerned, they're still following that account. So as long as the node that that account lives on is able to proxy posts from the new account, this could be managed in a way that's totally transparent to the protocol.

It gets more complicated if you want new followers to automatically follow the new account instead, but that doesn't match the user-visible behavior described above.

nex3 commented Nov 22, 2016

Unless I'm missing something, shouldn't this be protocol-independent? As @hach-que describes it, as far as followers of the original account are concerned, they're still following that account. So as long as the node that that account lives on is able to proxy posts from the new account, this could be managed in a way that's totally transparent to the protocol.

It gets more complicated if you want new followers to automatically follow the new account instead, but that doesn't match the user-visible behavior described above.

@nex3

This comment has been minimized.

Show comment
Hide comment
@nex3

nex3 Nov 23, 2016

I've been thinking about this more. It's an important prerequisite for making federation practical, which I know is something @Gargron cares about a lot. We're already seeing a lot of users making accounts and on mastodon.social in particular, and their investment in the community will (hopefully) only grow in the future.

Existing users are the most likely to understand the value of federation, but they're also the most likely to have a lot to lose by abandoning an existing account. At the same time, most people will only move to other servers if the barrier to entry is very low. Allowing accounts to be migrated without losing their investment in the community will remove the biggest part of that barrier.

nex3 commented Nov 23, 2016

I've been thinking about this more. It's an important prerequisite for making federation practical, which I know is something @Gargron cares about a lot. We're already seeing a lot of users making accounts and on mastodon.social in particular, and their investment in the community will (hopefully) only grow in the future.

Existing users are the most likely to understand the value of federation, but they're also the most likely to have a lot to lose by abandoning an existing account. At the same time, most people will only move to other servers if the barrier to entry is very low. Allowing accounts to be migrated without losing their investment in the community will remove the biggest part of that barrier.

@hikari-no-yume

This comment has been minimized.

Show comment
Hide comment
@hikari-no-yume

hikari-no-yume Dec 6, 2016

Contributor

I wonder if this is something other OStatus implementations would be interested in.

Contributor

hikari-no-yume commented Dec 6, 2016

I wonder if this is something other OStatus implementations would be interested in.

@marrus-sh

This comment has been minimized.

Show comment
Hide comment
@marrus-sh

marrus-sh Dec 7, 2016

Contributor

As an in-the-meantime stepping-stone for this, it would be nice if there was a simple import/export of who you're currently following, so that one could easily migrate that over to a new account. It's easy enough to post a “Changing accounts! Follow me at @█████” toot to let followers know you're changing accounts, but significantly harder to ensure you're following the same people on the new one.

Contributor

marrus-sh commented Dec 7, 2016

As an in-the-meantime stepping-stone for this, it would be nice if there was a simple import/export of who you're currently following, so that one could easily migrate that over to a new account. It's easy enough to post a “Changing accounts! Follow me at @█████” toot to let followers know you're changing accounts, but significantly harder to ensure you're following the same people on the new one.

@hoodiek

This comment has been minimized.

Show comment
Hide comment
@hoodiek

hoodiek Dec 15, 2016

i know that this is an old issue but i'm thinking more so about making a link for accounts, rather than a migration, namely allowing backwards-compatibility, making follow either mean the same account. this seems like it vaguely might be easier than migration? and i think both are very strong and important things to add to making the multiple instance setup for mastodon work

hoodiek commented Dec 15, 2016

i know that this is an old issue but i'm thinking more so about making a link for accounts, rather than a migration, namely allowing backwards-compatibility, making follow either mean the same account. this seems like it vaguely might be easier than migration? and i think both are very strong and important things to add to making the multiple instance setup for mastodon work

@hoodiek

This comment has been minimized.

Show comment
Hide comment
@hoodiek

hoodiek Dec 15, 2016

i would also suggest a profile option at the very least to show where a person has moved. it does not have to automatically move accounts, but making it easier for users to understand that a user has migrated is easy: could make whenever the new account posted, it would remind all followers of the original account to migrate from that they are posting elsewhere and link to the new account, as well as making a single button to unfollow the original and follow the new one.

hoodiek commented Dec 15, 2016

i would also suggest a profile option at the very least to show where a person has moved. it does not have to automatically move accounts, but making it easier for users to understand that a user has migrated is easy: could make whenever the new account posted, it would remind all followers of the original account to migrate from that they are posting elsewhere and link to the new account, as well as making a single button to unfollow the original and follow the new one.

@hoodiek

This comment has been minimized.

Show comment
Hide comment
@hoodiek

hoodiek Dec 15, 2016

if we get REALLY fancy and i would heavily suggest this: the old account could delete the first post to move accounts whenever it posts it again to update that the migrated account has updated a post, to remind users to migrate manually, while also retaining the repository of old posts as a result.

hoodiek commented Dec 15, 2016

if we get REALLY fancy and i would heavily suggest this: the old account could delete the first post to move accounts whenever it posts it again to update that the migrated account has updated a post, to remind users to migrate manually, while also retaining the repository of old posts as a result.

@leeeeeny

This comment has been minimized.

Show comment
Hide comment
@leeeeeny

leeeeeny Apr 3, 2017

Exporting/importing following/blocking lists is great but in my opinion it's not enough. As OP said, people who've tooted will probably stick with their first account instead of moving. I do think that too. I'd like to create an instance and move my account to it but i don't want to get a new account (plus we can't use multiple account at the same time like in TweetDeck). I think an account migration/backup tool is the most missing feature of Mastodon. Complicated sync over instances features are not needed, just a tool to export (CSV or whatever) and delete an account and import it back on another instance would allow people to control their account. Since the instances are managed by the instances' owners, they may be unreliable (reports not processed seriously, 50 % uptime). Then you just have to move.

leeeeeny commented Apr 3, 2017

Exporting/importing following/blocking lists is great but in my opinion it's not enough. As OP said, people who've tooted will probably stick with their first account instead of moving. I do think that too. I'd like to create an instance and move my account to it but i don't want to get a new account (plus we can't use multiple account at the same time like in TweetDeck). I think an account migration/backup tool is the most missing feature of Mastodon. Complicated sync over instances features are not needed, just a tool to export (CSV or whatever) and delete an account and import it back on another instance would allow people to control their account. Since the instances are managed by the instances' owners, they may be unreliable (reports not processed seriously, 50 % uptime). Then you just have to move.

@Maverynthia

This comment has been minimized.

Show comment
Hide comment
@Maverynthia

Maverynthia Apr 3, 2017

Why is it hard to migrate followers? Can't the new system just point to the people on the old system.
Such as if I follow @name on the old system, then when I migrate it then points to @name@mastodon.social or something? Or even just an auto follow and then they have to refollow you?

Why is it hard to migrate followers? Can't the new system just point to the people on the old system.
Such as if I follow @name on the old system, then when I migrate it then points to @name@mastodon.social or something? Or even just an auto follow and then they have to refollow you?

@gdurelle

This comment has been minimized.

Show comment
Hide comment
@gdurelle

gdurelle Apr 4, 2017

The idea is great but the example is a bit complicated, don't you think ?

If I want to migrate my account from mastodon.xyz to another instance, i would want to keep the same username.

Supporting username change should be a "second step" after this first step. (baby steps like neagan says ;))

What I see :
1 - I go the new instance says i want to migrate from mastodon.xyz,
2 - My username is temporary reserved on the new instance
3 - I indicate my login, then it redirects me to mastodon.xyz for authentication (OAuth2)
4 - Once authorized, the migration process begins by importing my parameters in the new instance (following, followers, toots, etc)
5 - delete my account from mastodon.xyz
6 - Enable me on the new instance
7 - update my following with my new address.

my 2cts. (gonna have a lot of cents if we all add up)

gdurelle commented Apr 4, 2017

The idea is great but the example is a bit complicated, don't you think ?

If I want to migrate my account from mastodon.xyz to another instance, i would want to keep the same username.

Supporting username change should be a "second step" after this first step. (baby steps like neagan says ;))

What I see :
1 - I go the new instance says i want to migrate from mastodon.xyz,
2 - My username is temporary reserved on the new instance
3 - I indicate my login, then it redirects me to mastodon.xyz for authentication (OAuth2)
4 - Once authorized, the migration process begins by importing my parameters in the new instance (following, followers, toots, etc)
5 - delete my account from mastodon.xyz
6 - Enable me on the new instance
7 - update my following with my new address.

my 2cts. (gonna have a lot of cents if we all add up)

@leeeeeny

This comment has been minimized.

Show comment
Hide comment
@leeeeeny

leeeeeny Apr 4, 2017

Yes that's a bit complicated but imo this is a very important feature to permit existing users balancing between the instances and avoid account loss in case of instance shutdown.

leeeeeny commented Apr 4, 2017

Yes that's a bit complicated but imo this is a very important feature to permit existing users balancing between the instances and avoid account loss in case of instance shutdown.

@Sadzeih

This comment has been minimized.

Show comment
Hide comment
@Sadzeih

Sadzeih Apr 4, 2017

I agree with everyone here. Account migration is necessary. The most important is toots and followers for me. Followings too but they can already be exported. Username would be a good thing too.

Sadzeih commented Apr 4, 2017

I agree with everyone here. Account migration is necessary. The most important is toots and followers for me. Followings too but they can already be exported. Username would be a good thing too.

@Motoma

This comment has been minimized.

Show comment
Hide comment
@Motoma

Motoma Apr 4, 2017

Contributor

Account migration is a necessity if you want federation to be a first-class citizen. Users need to be insulated from the risks associated with decentralization. If an instance goes away (crashes, is hacked, shut down by an oppressive regime) those users should not be SOL. Lacking that, users will flock to the instance with the highest likelihood of surviving.

Contributor

Motoma commented Apr 4, 2017

Account migration is a necessity if you want federation to be a first-class citizen. Users need to be insulated from the risks associated with decentralization. If an instance goes away (crashes, is hacked, shut down by an oppressive regime) those users should not be SOL. Lacking that, users will flock to the instance with the highest likelihood of surviving.

@cyphar

This comment has been minimized.

Show comment
Hide comment
@cyphar

cyphar Apr 4, 2017

Well, there's two ways (in my mind) of fixing the problem:

  1. You do it the GitHub way, where the old username is now forwarded to the new username. I'm not sure if OStatus has a concept of 301 redirects, but that's how you would do it. The downside is that if the server goes down before a client has got the redirect they're SoL.

  2. You handle it the Matrix way, which is that you have identity servers that decouple the "real" ID (@username@instance) from the person whose ID it belongs to. The downside is that Matrix implemented this in a very centralised way, which just punts the issue. Not to mention OStatus almost certainly doesn't have support for such a concept.

cyphar commented Apr 4, 2017

Well, there's two ways (in my mind) of fixing the problem:

  1. You do it the GitHub way, where the old username is now forwarded to the new username. I'm not sure if OStatus has a concept of 301 redirects, but that's how you would do it. The downside is that if the server goes down before a client has got the redirect they're SoL.

  2. You handle it the Matrix way, which is that you have identity servers that decouple the "real" ID (@username@instance) from the person whose ID it belongs to. The downside is that Matrix implemented this in a very centralised way, which just punts the issue. Not to mention OStatus almost certainly doesn't have support for such a concept.

@cyphar

This comment has been minimized.

Show comment
Hide comment
@cyphar

cyphar Apr 4, 2017

@TehShrike This issue is about moving between Mastodon instances, not from Twitter to Mastodon.

cyphar commented Apr 4, 2017

@TehShrike This issue is about moving between Mastodon instances, not from Twitter to Mastodon.

@TehShrike

This comment has been minimized.

Show comment
Hide comment
@TehShrike

TehShrike Apr 4, 2017

Ah, I googled-and-skimmed too quickly >_< I'll delete that post.

Ah, I googled-and-skimmed too quickly >_< I'll delete that post.

@cdata

This comment has been minimized.

Show comment
Hide comment
@cdata

cdata Apr 4, 2017

My hand-wave-y two cents:

It would be nice if there was a decoupled notion of identity. For example: a keybase.io profile aggregates different accounts for a single person so that they can be easily identified across all networks.

If this were true, you could imagine a system where you follow someone on Mastodon by following an identity and all addresses (that is, instance/profile combinations) that are associated with it.

Of course, it isn't easy to maintain a trusted database of identities that is shareable across all federated nodes. But, it's possible. Perhaps we can discuss the feasibility of such an approach.

👋

cdata commented Apr 4, 2017

My hand-wave-y two cents:

It would be nice if there was a decoupled notion of identity. For example: a keybase.io profile aggregates different accounts for a single person so that they can be easily identified across all networks.

If this were true, you could imagine a system where you follow someone on Mastodon by following an identity and all addresses (that is, instance/profile combinations) that are associated with it.

Of course, it isn't easy to maintain a trusted database of identities that is shareable across all federated nodes. But, it's possible. Perhaps we can discuss the feasibility of such an approach.

👋

@stiell

This comment has been minimized.

Show comment
Hide comment
@stiell

stiell Apr 4, 2017

Blockstack might be a good candidate for providing a decentralised, global identity. With Blockstack you could keep the same ID (and thus your followers) even if the instance you are currently using goes down permanently.

stiell commented Apr 4, 2017

Blockstack might be a good candidate for providing a decentralised, global identity. With Blockstack you could keep the same ID (and thus your followers) even if the instance you are currently using goes down permanently.

@cyphar

This comment has been minimized.

Show comment
Hide comment
@cyphar

cyphar Apr 4, 2017

The problem with having separated identities is that it wouldn't be compatible with other OStatus implementations (Mastodon isn't the only implementation, GNU Social is another and there's quite a few more). Migration should be something that someone following a Mastodon user from GNU Social should be able to support.

cyphar commented Apr 4, 2017

The problem with having separated identities is that it wouldn't be compatible with other OStatus implementations (Mastodon isn't the only implementation, GNU Social is another and there's quite a few more). Migration should be something that someone following a Mastodon user from GNU Social should be able to support.

@cdata

This comment has been minimized.

Show comment
Hide comment
@cdata

cdata Apr 4, 2017

In the fullness of time, I agree that this should be something that is broadly compatible with GNU Social. In the isolation of the moment, I propose that evolution requires experimentation. Compatibility is a matter of adding sufficient layers to make the standardized things cooperate with the experimental thing.

My brain told my hand to stop waving. I'm sure it will stop soon.

cdata commented Apr 4, 2017

In the fullness of time, I agree that this should be something that is broadly compatible with GNU Social. In the isolation of the moment, I propose that evolution requires experimentation. Compatibility is a matter of adding sufficient layers to make the standardized things cooperate with the experimental thing.

My brain told my hand to stop waving. I'm sure it will stop soon.

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Apr 4, 2017

Contributor

I think you guys are making a mountain out of a molehill here. I think this problem is pretty easy to solve. In order of least to most controversial: we should make it possible to import and export toots, we should make an automated migration tool (log into your old account via OAuth from your new instance), and we should toot out a notice of account change.

The migration toot would be a normal toot with a human-readable message ("My account is moving to (link)"), but would include something like this:

<mastodon:migrate participant="origin">https://new-account</mastodon:migrate>

The new account would toot something like this to confirm it ("Moved from my old account (link)"):

<mastodon:migrate participant="destination">https://old-account</mastodon:migrate>

Then, clients can recognize this attribute and perform the migration when they see the toot by unfollowing and following the new account (possibly with an another XML extension that indicates the user is responding to an account migration). Clients would likely want to hide the special toots from the feed as well. Clients that don't support it have the human-readable version as a fallback. Then we just send patches to GNU Social and other projects to recognize this behavior.

Contributor

SirCmpwn commented Apr 4, 2017

I think you guys are making a mountain out of a molehill here. I think this problem is pretty easy to solve. In order of least to most controversial: we should make it possible to import and export toots, we should make an automated migration tool (log into your old account via OAuth from your new instance), and we should toot out a notice of account change.

The migration toot would be a normal toot with a human-readable message ("My account is moving to (link)"), but would include something like this:

<mastodon:migrate participant="origin">https://new-account</mastodon:migrate>

The new account would toot something like this to confirm it ("Moved from my old account (link)"):

<mastodon:migrate participant="destination">https://old-account</mastodon:migrate>

Then, clients can recognize this attribute and perform the migration when they see the toot by unfollowing and following the new account (possibly with an another XML extension that indicates the user is responding to an account migration). Clients would likely want to hide the special toots from the feed as well. Clients that don't support it have the human-readable version as a fallback. Then we just send patches to GNU Social and other projects to recognize this behavior.

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Apr 4, 2017

Contributor

I'll probably start working on a toot export/import tool shortly, in any case.

Contributor

SirCmpwn commented Apr 4, 2017

I'll probably start working on a toot export/import tool shortly, in any case.

@Maverynthia

This comment has been minimized.

Show comment
Hide comment
@Maverynthia

Maverynthia Apr 4, 2017

@TehShrike There IS this tool for what you are looking for: https://mastodon-bridge.herokuapp.com/ but that's only if they signed up on both.

@TehShrike There IS this tool for what you are looking for: https://mastodon-bridge.herokuapp.com/ but that's only if they signed up on both.

@kevinmarks

This comment has been minimized.

Show comment
Hide comment
@kevinmarks

kevinmarks Apr 5, 2017

The way to connect accounts is XFN - rel information on links. You use rel=me to say "this is also me" and if both urls do that to each other it's confirmed.
rel="friend" will do for following (there are others, but that is simple enough to use).

If you want to convey "I moved there" use rel="canonical me"

The added benefit of this is that you can do actual distributed verification tags - confirming people's twitter/github/medium/whatever accounts too.

The way to connect accounts is XFN - rel information on links. You use rel=me to say "this is also me" and if both urls do that to each other it's confirmed.
rel="friend" will do for following (there are others, but that is simple enough to use).

If you want to convey "I moved there" use rel="canonical me"

The added benefit of this is that you can do actual distributed verification tags - confirming people's twitter/github/medium/whatever accounts too.

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Apr 5, 2017

Contributor

I'm not sure those fit ideally into this problem, @kevinmarks. They're for duplicated content, not a one-time notification that the content publisher has moved. Would make more sense if we were mirroring toots between multiple accounts but I think that's unrelated to the matter at hand.

Contributor

SirCmpwn commented Apr 5, 2017

I'm not sure those fit ideally into this problem, @kevinmarks. They're for duplicated content, not a one-time notification that the content publisher has moved. Would make more sense if we were mirroring toots between multiple accounts but I think that's unrelated to the matter at hand.

@kevinmarks

This comment has been minimized.

Show comment
Hide comment
@kevinmarks

kevinmarks Apr 5, 2017

the point about rel's is that they are amenable to setting up bidirectional verification of the move. Then you can use a 301 redirect for moved URLs.

the point about rel's is that they are amenable to setting up bidirectional verification of the move. Then you can use a 301 redirect for moved URLs.

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Apr 5, 2017

Contributor

I think I see what you mean. The one-time "I've moved" toots could use rel="me" (new account) and rel="canonical me" (old account) to indicate the move? I'm still not sure that's entirely in the spirit of these attributes but I don't see why it wouldn't work.

Contributor

SirCmpwn commented Apr 5, 2017

I think I see what you mean. The one-time "I've moved" toots could use rel="me" (new account) and rel="canonical me" (old account) to indicate the move? I'm still not sure that's entirely in the spirit of these attributes but I don't see why it wouldn't work.

@kevinmarks

This comment has been minimized.

Show comment
Hide comment
@kevinmarks

kevinmarks Apr 5, 2017

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Apr 5, 2017

Contributor

Aha, good idea. Makes sense.

Contributor

SirCmpwn commented Apr 5, 2017

Aha, good idea. Makes sense.

@enkiv2

This comment has been minimized.

Show comment
Hide comment
@enkiv2

enkiv2 Apr 5, 2017

Doesn't importing a list of exported toots represent a pretty major potential vulnerability with regard to spamming? For instance, somebody could make a large synthetic export file with faked timestamps and flood the local timeline on a new account, or create new one-off follower accounts on several major nodes first and flood several federated timelines, at a scale larger than manual posting, if my understanding of how federation works is correct.

Don't get me wrong -- I think transferring full toot history is important for account migration, and I think we should have an export function for toots available to all users -- but I think full account transfer should probably be negotiated between federated servers (even if it's a separate protocol or an extension), and that toot history import should either: 1) be heavily limited in scale (say, no more than 100); 2) be omitted from inclusion in the local and federated timelines; or 3) have retroactively-applied rate limits at least as strict as the ones applied to people posting through the existing front end, so that any file with toot timestamps too close together gets rejected.

enkiv2 commented Apr 5, 2017

Doesn't importing a list of exported toots represent a pretty major potential vulnerability with regard to spamming? For instance, somebody could make a large synthetic export file with faked timestamps and flood the local timeline on a new account, or create new one-off follower accounts on several major nodes first and flood several federated timelines, at a scale larger than manual posting, if my understanding of how federation works is correct.

Don't get me wrong -- I think transferring full toot history is important for account migration, and I think we should have an export function for toots available to all users -- but I think full account transfer should probably be negotiated between federated servers (even if it's a separate protocol or an extension), and that toot history import should either: 1) be heavily limited in scale (say, no more than 100); 2) be omitted from inclusion in the local and federated timelines; or 3) have retroactively-applied rate limits at least as strict as the ones applied to people posting through the existing front end, so that any file with toot timestamps too close together gets rejected.

@thomaslule

This comment has been minimized.

Show comment
Hide comment
@thomaslule

thomaslule Apr 5, 2017

A user opinion about the priority when migrating: make followers auto-follow the new account.

I believe that mastodon, as other microblogging platforms, is mainly focused on real-time.

I can deal with going back to a clean toots history but starting again from 0 followers would totally discourage me to migrate to another instance. And I know that a "I moved here re-follow me!" notification won't be enough to bring back half of the people that were in my network.

What is really precious in an account is its followers base.

A user opinion about the priority when migrating: make followers auto-follow the new account.

I believe that mastodon, as other microblogging platforms, is mainly focused on real-time.

I can deal with going back to a clean toots history but starting again from 0 followers would totally discourage me to migrate to another instance. And I know that a "I moved here re-follow me!" notification won't be enough to bring back half of the people that were in my network.

What is really precious in an account is its followers base.

@sandhawke

This comment has been minimized.

Show comment
Hide comment
@sandhawke

sandhawke Apr 19, 2018

Actually, I don't think migration where the original instance has shut down impossible. Maybe not even that hard. I think the key concept that makes it feasible is having a backup account at another instance, set up in advance. Like with computer data backups, this should be a thing that people are encourage to do if they're using the system for anything serious, and hopefully it should be pretty easy to do.

So, my primary account is @sandro@w3c.social, and I'd probably make my backup be my older account, @sandhawke@mastodon.social. There should be a way for me to point the accounts at each other, so every subscribing system has recorded that one is the backup for the other, and the servers should be set up do be replicating my data.

If the primary server goes away, even suddenly, all the followers can automatically use the backup. If the backup goes away suddenly, then I pick a new backup. The only catastrophic failure would be if both went away at about the same time. Maybe the system could even support multiple backup servers at once, for the truly paranoid.

sandhawke commented Apr 19, 2018

Actually, I don't think migration where the original instance has shut down impossible. Maybe not even that hard. I think the key concept that makes it feasible is having a backup account at another instance, set up in advance. Like with computer data backups, this should be a thing that people are encourage to do if they're using the system for anything serious, and hopefully it should be pretty easy to do.

So, my primary account is @sandro@w3c.social, and I'd probably make my backup be my older account, @sandhawke@mastodon.social. There should be a way for me to point the accounts at each other, so every subscribing system has recorded that one is the backup for the other, and the servers should be set up do be replicating my data.

If the primary server goes away, even suddenly, all the followers can automatically use the backup. If the backup goes away suddenly, then I pick a new backup. The only catastrophic failure would be if both went away at about the same time. Maybe the system could even support multiple backup servers at once, for the truly paranoid.

@trwnh

This comment has been minimized.

Show comment
Hide comment
@trwnh

trwnh Apr 19, 2018

Contributor

@pingu8007:

I just had a look at this thread, the issue can split into:
Data transfer - export and import
User discovery - finding moved user

Data transfer is the biggest holdout right now; user discovery is currently handled by redirection notices (better than nothing, but can be improved). To try and lay it all out again as hq did (slightly modified for easier referencing):

That is, if I have the account A on the primary instance (which I do), and I set up the account B on another Mastodon service, then A should:

1) Remain on the primary instance, and not be disabled in any way
2) Show posts from B after the redirection is set up
3) Disallow posting from the A account while ever the redirection is in place
4) Existing followers of A should start seeing posts from @hach-que instead
5) New followers of A should be allowed to follow the account (and internally, they are following A, but see posts from B)
6) Followers should not actually have their lists updated to follow B - in the event of a mistaken redirect, removing the redirect should act exactly as if there never was a redirect in the first place

And right now, we have the following:

  • 1) A remains on the original instance, albeit with a banner indicating the new account
  • 2) A does not show posts from B, but only the old posts from A
  • 3) Redirection doesn't disallow posting from A; people post on A to tell people to follow B
  • 4) Followers of A do not see posts from B -- they must refollow B
  • 5) A is greyed out and idk if following is fully disabled; I haven't really looked at it recently
  • 6) Followers must refollow B instead of automatically being forced to follow B.
Contributor

trwnh commented Apr 19, 2018

@pingu8007:

I just had a look at this thread, the issue can split into:
Data transfer - export and import
User discovery - finding moved user

Data transfer is the biggest holdout right now; user discovery is currently handled by redirection notices (better than nothing, but can be improved). To try and lay it all out again as hq did (slightly modified for easier referencing):

That is, if I have the account A on the primary instance (which I do), and I set up the account B on another Mastodon service, then A should:

1) Remain on the primary instance, and not be disabled in any way
2) Show posts from B after the redirection is set up
3) Disallow posting from the A account while ever the redirection is in place
4) Existing followers of A should start seeing posts from @hach-que instead
5) New followers of A should be allowed to follow the account (and internally, they are following A, but see posts from B)
6) Followers should not actually have their lists updated to follow B - in the event of a mistaken redirect, removing the redirect should act exactly as if there never was a redirect in the first place

And right now, we have the following:

  • 1) A remains on the original instance, albeit with a banner indicating the new account
  • 2) A does not show posts from B, but only the old posts from A
  • 3) Redirection doesn't disallow posting from A; people post on A to tell people to follow B
  • 4) Followers of A do not see posts from B -- they must refollow B
  • 5) A is greyed out and idk if following is fully disabled; I haven't really looked at it recently
  • 6) Followers must refollow B instead of automatically being forced to follow B.
@Gargron

This comment has been minimized.

Show comment
Hide comment
@Gargron

Gargron Apr 19, 2018

Member

@sandhawke You described "nomadic identity" in the zot protocol / hubzilla that @trwnh pointed to a few messages earlier (Jan 1st). However, it's not all clear to me. It seems like you end up in a master-replica situation with two masters...

Member

Gargron commented Apr 19, 2018

@sandhawke You described "nomadic identity" in the zot protocol / hubzilla that @trwnh pointed to a few messages earlier (Jan 1st). However, it's not all clear to me. It seems like you end up in a master-replica situation with two masters...

@sandhawke

This comment has been minimized.

Show comment
Hide comment
@sandhawke

sandhawke Apr 19, 2018

@Gargron It could very confusing, yes. How about this, instead -- some accounts are explicit backup accounts. I'm sandro@w3c.social and backup_for_sandro_w3c_social@mastodon.social (more or less). The backup accounts can't be posted to; they only get content via sync from their master. The only thing the user can do at the backup server is point it to a new master if the old master dies.

@Gargron It could very confusing, yes. How about this, instead -- some accounts are explicit backup accounts. I'm sandro@w3c.social and backup_for_sandro_w3c_social@mastodon.social (more or less). The backup accounts can't be posted to; they only get content via sync from their master. The only thing the user can do at the backup server is point it to a new master if the old master dies.

@trwnh

This comment has been minimized.

Show comment
Hide comment
@trwnh

trwnh Apr 19, 2018

Contributor

@sandhawke You're correct that migration from a shut-down instance isn't impossible, per se... it just requires you to proactively download your exported archive. If the instance goes down suddenly like mastodon.rocks, then you likely didn't make a backup, and now all the data is gone. Under such a system, the onus would be on every single user to make regular backups if they care about migrating off the instance or in the event of catastrophic failure. This is a very awkward solution.

So, my primary account is @sandro@w3c.social, and I'd probably make my backup be my older account, @sandhawke@mastodon.social. There should be a way for me to point the accounts at each other, so every subscriber knows one is the backup for the other, and the servers should be set up do be replicating my data.

What you're describing is the live migration / mirroring, or "nomadic identity" system that Hubzilla uses: #177 (comment)

Under zot, any linked accounts are effectively mirrors of each other, passed back and forth between servers. Any server that is hosting your identity will share basically everything back and forth -- mentions, permissions, post history, etc. And yes, if one goes down, then everything is fine as long as any other clone is up.

@Gargron I'm willing to attempt to do what it takes to clarify the situation or implementation in any way. I suppose "master-replica with two masters" is pretty close, yes -- it's like sending an email message to two addresses, and therefore you end up with two copies in two inboxes. But each copy is still the same message; you just have two copies of it.

Conceptually (http://www.talkplus.org/blog/2017/what-is-a-nomadic-identity/):

Bob has two email accounts. He has a home account at bob@home.server, and he has a work account at bob@work.server [...] when we send an email, we will send to both of Bob’s addresses any time we send an email to Bob. This way he’ll get the message no matter if he’s at home or if he’s at work. [...] as far as your software is concerned, it’s just ‘Bob’. You don’t care what server he uses or what job he has this week. [...] if Bob loses his job and his account gets removed from work.server [...] he’ll just use home.server; and then when he gets a new job, he can send you stuff from bob@newjob.server. [...] if Bob posts a picture while he’s at work, his work server sends a copy to his home server so he’ll have the same picture in his photo albums in both places. If he makes a new friend, the friend will be added on both servers so he has the same friends no matter where he goes.

Technically (https://project.hubzilla.org/help/en/developer/zot_protocol#Technical_Introduction):

In order for an identity to persist across locations, one must be able to provide or recover:

  • the globally unique ID for that identity
  • the private key assigned to that identity
  • (if the original server no longer exists) an address book of contacts for that identity.
    This information will be exportable from the original server via API, and/or downloadable to disk or thumb-drive.

Generating GUID (globally unique ID):

to create a globally unique ID, we will base it on a whirlpool hash of the identity URL of the origination node and a psuedo-random number, which should provide us with a 256 bit ID with an extremely low probability of collision, as a base64url-encoded string. [...] the ID must also be attached to a public key [...] We will refer to the encoded globally unique uid string as*zot_uid

With regards to DNS and a "primary" hub:

As there may be more than one DNS location attached/bound to a given zot_uid identity, delivery processes should deliver to all of them - as we do not know for sure which hub instance may be accessed at any given time. However we will designate one DNS location as "primary" and which will be the preferred location to view web profile information. We must also provide the ability to change the primary to a new location

How the primary hub/node works:

A look-up of information on the current primary location may provide a "forwarding pointer" which will tell us to update our records and move everything to the new location. There is also the possibility that the primary location is defunct and no longer responding. In that case, a location which has already been mapped to this zot_uid can seize control, and declare itself to be primary. In both cases the primary designation is automatically approved and moved. A request can also be made from a primary location which requests that another location be removed.

How to map additional hubs:

In order to map a zot_uid to a second (or tertiary) location, we require a secure exchange which verifies that the new location is in possession of the private key for this zot_uid. Security of the private key is thus essential to avoid hijacking of identities. [...] Key revocation and replacement must take place from the primary hub.

How account discovery occurs:

A well-known url is used to probe a hub for Zot capabilities and identity lookups, including the discovery of public keys, profile locations, profile photos, and primary hub location. The location for this service is /.well-known/zot-info - and must be available at the root of the chosen domain.

I advise looking at the example discovery packet to get a better idea of its structure, but tldr: it contains a signed token, signed guid, public key, some other profile metadata, and importantly, arrays for locations and for the site you're communicating with. Specifically, the locations array contains a hostname, address, whether it is primary, a signed url, a callback, and a site public key, for each location that is hosting the zot_uid.


tl;dr for all that: Hubzilla / zot works by creating guids and signing with some sort of PKI, and if your primary server authorizes any other servers, then those servers get deliveries of the same messages.

The guid is the hard part. Once you have guids (or, in Mastodon's case, once existing accounts are somehow converted to / assigned new guids), you can now address messages to guids instead of to local uid or username@domain. And like I said on #6837: the sooner this is done, the less headaches it will cause in the future. Trying to refactor something that affects a million accounts is easier than trying to refactor something that affects ten million, or a hundred million. As long as there's a dependence on DNS identity, any solution to account migration can't ever be 100% seamless. Perhaps that's a tradeoff willingly made, or perhaps not.

Contributor

trwnh commented Apr 19, 2018

@sandhawke You're correct that migration from a shut-down instance isn't impossible, per se... it just requires you to proactively download your exported archive. If the instance goes down suddenly like mastodon.rocks, then you likely didn't make a backup, and now all the data is gone. Under such a system, the onus would be on every single user to make regular backups if they care about migrating off the instance or in the event of catastrophic failure. This is a very awkward solution.

So, my primary account is @sandro@w3c.social, and I'd probably make my backup be my older account, @sandhawke@mastodon.social. There should be a way for me to point the accounts at each other, so every subscriber knows one is the backup for the other, and the servers should be set up do be replicating my data.

What you're describing is the live migration / mirroring, or "nomadic identity" system that Hubzilla uses: #177 (comment)

Under zot, any linked accounts are effectively mirrors of each other, passed back and forth between servers. Any server that is hosting your identity will share basically everything back and forth -- mentions, permissions, post history, etc. And yes, if one goes down, then everything is fine as long as any other clone is up.

@Gargron I'm willing to attempt to do what it takes to clarify the situation or implementation in any way. I suppose "master-replica with two masters" is pretty close, yes -- it's like sending an email message to two addresses, and therefore you end up with two copies in two inboxes. But each copy is still the same message; you just have two copies of it.

Conceptually (http://www.talkplus.org/blog/2017/what-is-a-nomadic-identity/):

Bob has two email accounts. He has a home account at bob@home.server, and he has a work account at bob@work.server [...] when we send an email, we will send to both of Bob’s addresses any time we send an email to Bob. This way he’ll get the message no matter if he’s at home or if he’s at work. [...] as far as your software is concerned, it’s just ‘Bob’. You don’t care what server he uses or what job he has this week. [...] if Bob loses his job and his account gets removed from work.server [...] he’ll just use home.server; and then when he gets a new job, he can send you stuff from bob@newjob.server. [...] if Bob posts a picture while he’s at work, his work server sends a copy to his home server so he’ll have the same picture in his photo albums in both places. If he makes a new friend, the friend will be added on both servers so he has the same friends no matter where he goes.

Technically (https://project.hubzilla.org/help/en/developer/zot_protocol#Technical_Introduction):

In order for an identity to persist across locations, one must be able to provide or recover:

  • the globally unique ID for that identity
  • the private key assigned to that identity
  • (if the original server no longer exists) an address book of contacts for that identity.
    This information will be exportable from the original server via API, and/or downloadable to disk or thumb-drive.

Generating GUID (globally unique ID):

to create a globally unique ID, we will base it on a whirlpool hash of the identity URL of the origination node and a psuedo-random number, which should provide us with a 256 bit ID with an extremely low probability of collision, as a base64url-encoded string. [...] the ID must also be attached to a public key [...] We will refer to the encoded globally unique uid string as*zot_uid

With regards to DNS and a "primary" hub:

As there may be more than one DNS location attached/bound to a given zot_uid identity, delivery processes should deliver to all of them - as we do not know for sure which hub instance may be accessed at any given time. However we will designate one DNS location as "primary" and which will be the preferred location to view web profile information. We must also provide the ability to change the primary to a new location

How the primary hub/node works:

A look-up of information on the current primary location may provide a "forwarding pointer" which will tell us to update our records and move everything to the new location. There is also the possibility that the primary location is defunct and no longer responding. In that case, a location which has already been mapped to this zot_uid can seize control, and declare itself to be primary. In both cases the primary designation is automatically approved and moved. A request can also be made from a primary location which requests that another location be removed.

How to map additional hubs:

In order to map a zot_uid to a second (or tertiary) location, we require a secure exchange which verifies that the new location is in possession of the private key for this zot_uid. Security of the private key is thus essential to avoid hijacking of identities. [...] Key revocation and replacement must take place from the primary hub.

How account discovery occurs:

A well-known url is used to probe a hub for Zot capabilities and identity lookups, including the discovery of public keys, profile locations, profile photos, and primary hub location. The location for this service is /.well-known/zot-info - and must be available at the root of the chosen domain.

I advise looking at the example discovery packet to get a better idea of its structure, but tldr: it contains a signed token, signed guid, public key, some other profile metadata, and importantly, arrays for locations and for the site you're communicating with. Specifically, the locations array contains a hostname, address, whether it is primary, a signed url, a callback, and a site public key, for each location that is hosting the zot_uid.


tl;dr for all that: Hubzilla / zot works by creating guids and signing with some sort of PKI, and if your primary server authorizes any other servers, then those servers get deliveries of the same messages.

The guid is the hard part. Once you have guids (or, in Mastodon's case, once existing accounts are somehow converted to / assigned new guids), you can now address messages to guids instead of to local uid or username@domain. And like I said on #6837: the sooner this is done, the less headaches it will cause in the future. Trying to refactor something that affects a million accounts is easier than trying to refactor something that affects ten million, or a hundred million. As long as there's a dependence on DNS identity, any solution to account migration can't ever be 100% seamless. Perhaps that's a tradeoff willingly made, or perhaps not.

@deutrino

This comment has been minimized.

Show comment
Hide comment
@deutrino

deutrino Apr 19, 2018

Two observations on the current conversation:

  • If a solution similar to nomadic identity is to be implemented, it would be best for it to be fully automated and for a user to be able to choose to migrate to any instance, preserving at least their follow/following lists, at any time, without doing any work ahead of time. If migration requires planning and work up front, most people aren't going to do it. New users still have trouble with the concept of instances. If they even realize that migration is a concern when signing up, many of them would hit the (inevitably complicated) section of docs about backup accounts and migration and say "wat" (usually) or "k I'll do this later" (if we're lucky). Then most of them won't set it up, and when instances vanish, they're screwed, even though all this dev work was spent on a migration feature. Don't get me wrong, it's great to support the garden path of migrating between running instances, but can we do better? (See below for implementation details.)
  • If a user chooses to migrate, they really should be informed when the destination instance has conflicts with their follow/following lists due to instance blocks - this needs to be addressed from the start and not when somebody inevitably files a bug after they do all the work to migrate to a new instance and only then find out their favorite follows/followers are blocked.

Implementation details for zero-config migration:

You'd need a globally unique identifier held only by the user. Is the tuple (username, password_hash, optional_2fa_seed) sufficient to authenticate the user and pair them with e.g. an immutable uuid used behind the scenes?

Information sufficient to authenticate the user and to reconstitute their follow/following lists would need to be replicated around the network. Storing it all in a blockchain is overkill - not every node should need to retain every user's follow lists, that doesn't scale. However, the tuple used to authenticate users might need to be more widely replicated than follow lists.

To keep network and storage load sane, you could store follow lists on some number of instances n considered sufficient to provide redundancy (say n=3) but then you have the problem of which instances store what, how do you retrieve the info when needed, and how do you distribute updates when follow lists or passwords change.

Focusing on just the follow lists for the moment, one could store them in a DHT with the key being the global uuid of the user, and have some sort of election to pick the n instances to store the data at the time the user account is first created. The election process could be as simple as "build me a hash table of all active instances, deterministically select n based on the value of the user's uuid" or something more equitable (and potentially controllable) for server operators, like a population-weighted selection algorithm, so small instances don't end up hosting tons of data disproportionate to their number of users.

Once you have that infrastructure, you need a couple more things.

When one of the n instances replicating the follow lists goes away for long enough (i.e. availability on the DHT drops below n for too long), some process needs to notice this and elect a new instance to host replication data such that DHT availability is brought back up to n. Likely this should be handled by the user's home instance - that seems fair in terms of load. Eventual consistency is fine here, this process can operate at a slow and steady pace, and only get worried when it notices availability consistently < n for some value sufficient to account for outages likely to be seen on Mastodon (perhaps 3 days).

Perhaps more difficult, when the user's follow/following lists change, updates need to be replicated. Again, eventual consistency is fine here. Allowing it to take a day or so for updates to replicate is probably fine, especially if it balances load. But more importantly: how do you prevent spoofing if the user's uuid and the instances hosting their replicated data are known? And does this change the minimum necessary tuple of (username, password_hash, optional_2fa_seed) necessary to authenticate the user, or processes operating on their behalf?

The way I see it, the major costs of this scheme are development cost - lines of code to write, debug, and maintain - and server load - mostly additional disk space for storing user auth tuples and follow/following lists, and network traffic replicating updates to follow/following lists. It may make sense to consider the idea of supernodes at this point, or some other mechanism to make the scheme opt-in for small instances, perhaps as simple as until you have 100 monthly active users, hosting replication data is opt-in.

The major benefits, however, may be worth all this work. It really depends on how much the feature is likely to be used. If people would tend to use it often enough, doing it this way would make mastodon exceptionally resilient to the loss of instances, even huge ones, without users having to do any work up front at all. A big lesson one can take from natural disasters is that when a city gets devastated, people whose housing is destroyed often move somewhere else and don't return. What happens when a top 10 instance vanishes without warning? I think the answer is a lot different if the users can simply log in at any other instance and choose to migrate their presence there, even with the original instance offline.

Edit: there are security and privacy concerns with parts of my scheme, particularly with replication of user auth data - I suspect somebody more studied than me in CS and/or crypto can come up with something similar but better. With regard to replicating follow lists, this is a privacy concern, but I'd argue that having some number of instances n with a user's follow lists is an acceptable trade-off, given that there is not, and will never be, any guarantee that the data cannot be assembled by other means conceptually far simpler and more likely to work than attempting to maliciously host replicated follow lists - see #6901.

deutrino commented Apr 19, 2018

Two observations on the current conversation:

  • If a solution similar to nomadic identity is to be implemented, it would be best for it to be fully automated and for a user to be able to choose to migrate to any instance, preserving at least their follow/following lists, at any time, without doing any work ahead of time. If migration requires planning and work up front, most people aren't going to do it. New users still have trouble with the concept of instances. If they even realize that migration is a concern when signing up, many of them would hit the (inevitably complicated) section of docs about backup accounts and migration and say "wat" (usually) or "k I'll do this later" (if we're lucky). Then most of them won't set it up, and when instances vanish, they're screwed, even though all this dev work was spent on a migration feature. Don't get me wrong, it's great to support the garden path of migrating between running instances, but can we do better? (See below for implementation details.)
  • If a user chooses to migrate, they really should be informed when the destination instance has conflicts with their follow/following lists due to instance blocks - this needs to be addressed from the start and not when somebody inevitably files a bug after they do all the work to migrate to a new instance and only then find out their favorite follows/followers are blocked.

Implementation details for zero-config migration:

You'd need a globally unique identifier held only by the user. Is the tuple (username, password_hash, optional_2fa_seed) sufficient to authenticate the user and pair them with e.g. an immutable uuid used behind the scenes?

Information sufficient to authenticate the user and to reconstitute their follow/following lists would need to be replicated around the network. Storing it all in a blockchain is overkill - not every node should need to retain every user's follow lists, that doesn't scale. However, the tuple used to authenticate users might need to be more widely replicated than follow lists.

To keep network and storage load sane, you could store follow lists on some number of instances n considered sufficient to provide redundancy (say n=3) but then you have the problem of which instances store what, how do you retrieve the info when needed, and how do you distribute updates when follow lists or passwords change.

Focusing on just the follow lists for the moment, one could store them in a DHT with the key being the global uuid of the user, and have some sort of election to pick the n instances to store the data at the time the user account is first created. The election process could be as simple as "build me a hash table of all active instances, deterministically select n based on the value of the user's uuid" or something more equitable (and potentially controllable) for server operators, like a population-weighted selection algorithm, so small instances don't end up hosting tons of data disproportionate to their number of users.

Once you have that infrastructure, you need a couple more things.

When one of the n instances replicating the follow lists goes away for long enough (i.e. availability on the DHT drops below n for too long), some process needs to notice this and elect a new instance to host replication data such that DHT availability is brought back up to n. Likely this should be handled by the user's home instance - that seems fair in terms of load. Eventual consistency is fine here, this process can operate at a slow and steady pace, and only get worried when it notices availability consistently < n for some value sufficient to account for outages likely to be seen on Mastodon (perhaps 3 days).

Perhaps more difficult, when the user's follow/following lists change, updates need to be replicated. Again, eventual consistency is fine here. Allowing it to take a day or so for updates to replicate is probably fine, especially if it balances load. But more importantly: how do you prevent spoofing if the user's uuid and the instances hosting their replicated data are known? And does this change the minimum necessary tuple of (username, password_hash, optional_2fa_seed) necessary to authenticate the user, or processes operating on their behalf?

The way I see it, the major costs of this scheme are development cost - lines of code to write, debug, and maintain - and server load - mostly additional disk space for storing user auth tuples and follow/following lists, and network traffic replicating updates to follow/following lists. It may make sense to consider the idea of supernodes at this point, or some other mechanism to make the scheme opt-in for small instances, perhaps as simple as until you have 100 monthly active users, hosting replication data is opt-in.

The major benefits, however, may be worth all this work. It really depends on how much the feature is likely to be used. If people would tend to use it often enough, doing it this way would make mastodon exceptionally resilient to the loss of instances, even huge ones, without users having to do any work up front at all. A big lesson one can take from natural disasters is that when a city gets devastated, people whose housing is destroyed often move somewhere else and don't return. What happens when a top 10 instance vanishes without warning? I think the answer is a lot different if the users can simply log in at any other instance and choose to migrate their presence there, even with the original instance offline.

Edit: there are security and privacy concerns with parts of my scheme, particularly with replication of user auth data - I suspect somebody more studied than me in CS and/or crypto can come up with something similar but better. With regard to replicating follow lists, this is a privacy concern, but I'd argue that having some number of instances n with a user's follow lists is an acceptable trade-off, given that there is not, and will never be, any guarantee that the data cannot be assembled by other means conceptually far simpler and more likely to work than attempting to maliciously host replicated follow lists - see #6901.

@trwnh

This comment has been minimized.

Show comment
Hide comment
@trwnh

trwnh Apr 19, 2018

Contributor

@deutrino Hubzilla's method is already "automatic" and only requires you to login to your account on your primary instance, during registration of any secondary accounts. i.e., you start registering for another account and, during that setup process, you have an option to make your new account a "clone" of your primary account. You can also optionally upload an exported account archive, if your former primary server is down. I think the archive contains your post history, cryptographic keys, zot_uid, and address book.

A DHT seems like a cool idea as well, but that might be a bit more complex in deciding how each server should treat it. I can see a DHT being more useful if you were trying to establish agreed-upon usernames across the entire network, but username@domain isn't too bad right now for finding people, and dropping the domain name from handles is probably outside the scope of this issue.

Contributor

trwnh commented Apr 19, 2018

@deutrino Hubzilla's method is already "automatic" and only requires you to login to your account on your primary instance, during registration of any secondary accounts. i.e., you start registering for another account and, during that setup process, you have an option to make your new account a "clone" of your primary account. You can also optionally upload an exported account archive, if your former primary server is down. I think the archive contains your post history, cryptographic keys, zot_uid, and address book.

A DHT seems like a cool idea as well, but that might be a bit more complex in deciding how each server should treat it. I can see a DHT being more useful if you were trying to establish agreed-upon usernames across the entire network, but username@domain isn't too bad right now for finding people, and dropping the domain name from handles is probably outside the scope of this issue.

@sandhawke

This comment has been minimized.

Show comment
Hide comment
@sandhawke

sandhawke Apr 19, 2018

@trwnh I'm not suggesting users manually back up their social data. The analogy is to automated backups, where you get a backup account somewhere and then all your data is always backed up and you don't have to worry about it.

The zot approach seems pretty good, but I fear is too big a leap, which is why I'm sketching out something that seems simpler. No crypto, for one thing. Nomadic identity would be great if it can be deployed across the fediverse.

My sketch of a possible alternative, in a little more detail:

  1. I get my first account, as sandro@m1.example
  2. Some time later, I decide I want a backup, so I make an account at a mastodon-backup service (which is probably mastodon in a different mode, or maybe every mastodon instance also offers this in the future). Let's call this account sandro@backup1.example
  3. I tell the servers about each other. Now m1.example will sync all my data to backup1.example, continually. It's similar to sending stuff to a subscriber, but private stuff is sent too. Maybe protocol-wise backup1.example is just a client app I've authorized to access m1.example.
  4. When people follow sandro@m1.example, part of the exchange tells them the id of my backup account. If I add another backup account, or remove one, they get notified.
  5. backup1.example is authorized to deliver to my subscribers, and I can transfer that authorization to a new master, if I want.
  6. Ideally, backup1.example makes URLs for my stuff that are a simply syntactic transform from the original, so if m1 behaves responsibly, when it shuts down or I otherwise leave it, they can use a one-line-config redirect to make all my old URLs still work, forwarding them to the same content at backup1. I suppose URL persistence isn't yet seen as particularly valuable in Mastodon, but ... it is actually valuable.

@trwnh I'm not suggesting users manually back up their social data. The analogy is to automated backups, where you get a backup account somewhere and then all your data is always backed up and you don't have to worry about it.

The zot approach seems pretty good, but I fear is too big a leap, which is why I'm sketching out something that seems simpler. No crypto, for one thing. Nomadic identity would be great if it can be deployed across the fediverse.

My sketch of a possible alternative, in a little more detail:

  1. I get my first account, as sandro@m1.example
  2. Some time later, I decide I want a backup, so I make an account at a mastodon-backup service (which is probably mastodon in a different mode, or maybe every mastodon instance also offers this in the future). Let's call this account sandro@backup1.example
  3. I tell the servers about each other. Now m1.example will sync all my data to backup1.example, continually. It's similar to sending stuff to a subscriber, but private stuff is sent too. Maybe protocol-wise backup1.example is just a client app I've authorized to access m1.example.
  4. When people follow sandro@m1.example, part of the exchange tells them the id of my backup account. If I add another backup account, or remove one, they get notified.
  5. backup1.example is authorized to deliver to my subscribers, and I can transfer that authorization to a new master, if I want.
  6. Ideally, backup1.example makes URLs for my stuff that are a simply syntactic transform from the original, so if m1 behaves responsibly, when it shuts down or I otherwise leave it, they can use a one-line-config redirect to make all my old URLs still work, forwarding them to the same content at backup1. I suppose URL persistence isn't yet seen as particularly valuable in Mastodon, but ... it is actually valuable.
@steckerhalter

This comment has been minimized.

Show comment
Hide comment
@steckerhalter

steckerhalter Jun 2, 2018

lots of stuff here, didn't read all of it so forgive me if I missed something. I was thinking:
if I want to switch from mastodon.social to example.social, what I do care the most is that I don't lose my followers. so I could totally live with a solution that let's me switch to another server and just leaves my old account as it is, transferring only my followers (automatic unfollow on old account and follow on new account). then later on I could choose to delete the old account or just leave there for reference.

this could be a first step to encourage people to switch servers without having to go into content migration, backup accounts, url persistence etc. these things could be tackled later on.

lots of stuff here, didn't read all of it so forgive me if I missed something. I was thinking:
if I want to switch from mastodon.social to example.social, what I do care the most is that I don't lose my followers. so I could totally live with a solution that let's me switch to another server and just leaves my old account as it is, transferring only my followers (automatic unfollow on old account and follow on new account). then later on I could choose to delete the old account or just leave there for reference.

this could be a first step to encourage people to switch servers without having to go into content migration, backup accounts, url persistence etc. these things could be tackled later on.

@wiktor-k

This comment has been minimized.

Show comment
Hide comment
@wiktor-k

wiktor-k Jun 2, 2018

Contributor

Actually from technical side this shouldn't be that hard as ActivityPub objects already have a movedTo property. All it takes is to "invite" your old followers to the new account. Then each of them would check if your new account is pointed to from your old account's movedTo and auto-follow.

Contributor

wiktor-k commented Jun 2, 2018

Actually from technical side this shouldn't be that hard as ActivityPub objects already have a movedTo property. All it takes is to "invite" your old followers to the new account. Then each of them would check if your new account is pointed to from your old account's movedTo and auto-follow.

@nightpool

This comment has been minimized.

Show comment
Hide comment
@nightpool

nightpool Jun 2, 2018

Collaborator
Collaborator

nightpool commented Jun 2, 2018

@wiktor-k

This comment has been minimized.

Show comment
Hide comment
@wiktor-k

wiktor-k Jun 2, 2018

Contributor

It has an advantage of working right now. I don't have stats to support it but I'm seeing a lot of migrations especially from mastodon.social (that people choose initially to try out this Mastodon thing) to more specialized servers.

Solving migration from non working servers would require more elaborate design, probably based on asymmetric keys. Actually users already have keys but the private part is always held by the server, never released to the user. If uses had backup copy then other servers would be able to authenticate move requests using cached versions of public keys.

Contributor

wiktor-k commented Jun 2, 2018

It has an advantage of working right now. I don't have stats to support it but I'm seeing a lot of migrations especially from mastodon.social (that people choose initially to try out this Mastodon thing) to more specialized servers.

Solving migration from non working servers would require more elaborate design, probably based on asymmetric keys. Actually users already have keys but the private part is always held by the server, never released to the user. If uses had backup copy then other servers would be able to authenticate move requests using cached versions of public keys.

@nightpool

This comment has been minimized.

Show comment
Hide comment
@nightpool

nightpool Jun 2, 2018

Collaborator
Collaborator

nightpool commented Jun 2, 2018

@steckerhalter

This comment has been minimized.

Show comment
Hide comment
@steckerhalter

steckerhalter Jun 2, 2018

@nightpool yes, that's what I'm suggesting: to implement the most common and simplest case (both servers running, follower/following migration, no content migration, no backup accounts etc.) because I think this feature is important for the network as a whole. more sophisticated migration methods can be added later of course.

@nightpool yes, that's what I'm suggesting: to implement the most common and simplest case (both servers running, follower/following migration, no content migration, no backup accounts etc.) because I think this feature is important for the network as a whole. more sophisticated migration methods can be added later of course.

@penguin42

This comment has been minimized.

Show comment
Hide comment
@penguin42

penguin42 Jun 2, 2018

IMHO what's needed is live mirroring not account migration.
Here's a proposal (I don't know the protocol to know how hard it is, please educate):
a) I create an account on multiple instance
b) On each instance I add a list of my equivalent identities on the other instances to my profile.
c) Each instance follows the mirrored identities
d) Each message shall contain a unique ID including the server that originated the message
e) When an instance receives a federated message from a server with an ID corresponding to a mirror-ID of one of it's users, it checks that the unique ID doesn't indicate that it originally started at it's own server, and if it doesn't retransmits the message on their users profile, including the original unique ID.
f) Servers filter multiple messages with the same ID from the federated stream leaving one.
g) When following a user the client also follows mirror identities. This updates when the person being followed adds/removes mirrors
h) Admins can allow/disallow mirroring from certain bad/good servers

Now, there's essentially no 'primary' server for any one user; if one dies you just log into one of the other instances you've previously set up as mirrors and your message propagates to other servers by normal federation, your followers carry on seeing your messages with no change; if your original server wakes up it'll also pull those messages in by federation (probably).

IMHO what's needed is live mirroring not account migration.
Here's a proposal (I don't know the protocol to know how hard it is, please educate):
a) I create an account on multiple instance
b) On each instance I add a list of my equivalent identities on the other instances to my profile.
c) Each instance follows the mirrored identities
d) Each message shall contain a unique ID including the server that originated the message
e) When an instance receives a federated message from a server with an ID corresponding to a mirror-ID of one of it's users, it checks that the unique ID doesn't indicate that it originally started at it's own server, and if it doesn't retransmits the message on their users profile, including the original unique ID.
f) Servers filter multiple messages with the same ID from the federated stream leaving one.
g) When following a user the client also follows mirror identities. This updates when the person being followed adds/removes mirrors
h) Admins can allow/disallow mirroring from certain bad/good servers

Now, there's essentially no 'primary' server for any one user; if one dies you just log into one of the other instances you've previously set up as mirrors and your message propagates to other servers by normal federation, your followers carry on seeing your messages with no change; if your original server wakes up it'll also pull those messages in by federation (probably).

@steckerhalter

This comment has been minimized.

Show comment
Hide comment
@steckerhalter

steckerhalter Jun 3, 2018

@penguin42 interesting idea. but I'd say implementing this would be a ton of work (if it is even possible given the existing protocols). since this is high prio I would not try to rebuild rome just now 😃 how about creating a separate issue "account mirroring" outlining this idea for later?

@penguin42 interesting idea. but I'd say implementing this would be a ton of work (if it is even possible given the existing protocols). since this is high prio I would not try to rebuild rome just now 😃 how about creating a separate issue "account mirroring" outlining this idea for later?

@trwnh

This comment has been minimized.

Show comment
Hide comment
@trwnh

trwnh Jun 3, 2018

Contributor

@steckerhalter Not to be too self-promotional, but I would point you toward at least these three comments if you're looking for a primer:

  • How Hubzilla does it: #177 (comment)
  • How Friendica does it / how we can do it in an email-like way: #177 (comment)
  • A brief summary of the original request and which parts have been implemented so far: #177 (comment)
Contributor

trwnh commented Jun 3, 2018

@steckerhalter Not to be too self-promotional, but I would point you toward at least these three comments if you're looking for a primer:

  • How Hubzilla does it: #177 (comment)
  • How Friendica does it / how we can do it in an email-like way: #177 (comment)
  • A brief summary of the original request and which parts have been implemented so far: #177 (comment)
@penguin42

This comment has been minimized.

Show comment
Hide comment
@penguin42

penguin42 Jun 3, 2018

@steckerhalter OK, as requested, 7715 is that split out.

@steckerhalter OK, as requested, 7715 is that split out.

@trwnh trwnh referenced this issue in dansup/pixelfed Jun 6, 2018

Open

Investigate Nomadic Identity #216

@autogestion

This comment has been minimized.

Show comment
Hide comment
@autogestion

autogestion Jun 16, 2018

What if use namecoin to store identity. It allows to attach to name some information, which could be url of actual user's account

What if use namecoin to store identity. It allows to attach to name some information, which could be url of actual user's account

@trwnh

This comment has been minimized.

Show comment
Hide comment
@trwnh

trwnh Jun 21, 2018

Contributor

I feel like this issue should be much higher priority than it currently is, in the interest of offering a truly portable experience where you own your data.

At this point, rather than recycling old discussions and approaches, can we try to hammer out an actionable plan to implement portable identities?

Current blockers to account migration

1) Identification is bound to domain

A. Mastodon, throughout various places in its code and database, uses username/domain pairs to identify users.
B. The Mastodon API fetches users with GET /user/uid, where uid is a sequential integer like 55816 and only guaranteed to be unique on that domain. But this id is used only for API, and the local server converts the received profile into username/domain for its database.
C1. Therefore, there is no way to identify users in a way that isn't bound to at least the domain.
C2. Therefore, some other form of ID should be used, and Mastodon's codebase/database should be updated to use it internally, leaving username/domain only for lookup.
C3. Therefore, seamless translation should occur between all these types of identification, with username/domain being converted to UUID internally and mentions/accounts being mapped back to UUID.

As explained in #177 (comment), zot already has a workable scheme to address this, and an identity consists of a 256-bit GUID and a private key. For live migration, this is enough. For data exports, this should also include an address book, i.e. in Mastodon's terms, the follower/following lists.

The zot identity is managed by a primary hub, and if that hub goes offline, any hub with the private key can declare itself to be the new primary hub (initiated by the user). Users can import their GUID and private key to any server by either uploading their backup, or by live mirroring from the current primary hub. Your followers' primary hubs are notified of your new hub.

2) Old content

Previously-posted statuses are floating around with mentions that explicitly link to a certain domain/username. These will probably break. However, that's not much different than what currently happens if a server goes offline: any user on that server will become inaccessible, and all mention-links to that user will also become unresolvable. Therefore, this will be a breaking change, but ultimately one that needs to be made for the resilience and robustness of the future network.

Plan

  1. Start generating GUIDs for Mastodon users in preparation for v.3.0.0, the sooner the better. We might as well use the "256-bits encoded as base64url" schema that zot uses, if there aren't any other options that work better for some reason or another.
  2. Start refactoring the codebase to accept either username/domain pairs or the newly-generated GUIDs. If a GUID exists, it should be authoritative over username/domain. This will probably affect (at the very least) account generation, account lookup, mentions handling, and URI dereferencing. GUID should be served as ActivityPub id field for Actor objects. The URL should be served via url instead.
  3. Write a database migration task to start storing accounts internally by GUID.
  4. Start using GUID for follower/following lists. Ensure that the data export tool includes the GUID and user's private/public keys, as well as their posts, media, and follower/following lists.
  5. Write a handler to announce updated username/domain for a given GUID to your follower/following lists, using a secure exchange between servers and probably the Update Activity. Write a handler to receive and parse this Update.
  6. Write an import tool for the offline data export archive.
  7. Write a live import tool to exchange data directly with your primary server.
  8. When v3.0.0 is released, expose steps 6-7 to users. Since by this point the majority of users should already have a GUID due to step 1, and the logic for handling GUIDs should have percolated through the network thanks to steps 2-5.

Any insights from coders on this? Does this seem workable?

Contributor

trwnh commented Jun 21, 2018

I feel like this issue should be much higher priority than it currently is, in the interest of offering a truly portable experience where you own your data.

At this point, rather than recycling old discussions and approaches, can we try to hammer out an actionable plan to implement portable identities?

Current blockers to account migration

1) Identification is bound to domain

A. Mastodon, throughout various places in its code and database, uses username/domain pairs to identify users.
B. The Mastodon API fetches users with GET /user/uid, where uid is a sequential integer like 55816 and only guaranteed to be unique on that domain. But this id is used only for API, and the local server converts the received profile into username/domain for its database.
C1. Therefore, there is no way to identify users in a way that isn't bound to at least the domain.
C2. Therefore, some other form of ID should be used, and Mastodon's codebase/database should be updated to use it internally, leaving username/domain only for lookup.
C3. Therefore, seamless translation should occur between all these types of identification, with username/domain being converted to UUID internally and mentions/accounts being mapped back to UUID.

As explained in #177 (comment), zot already has a workable scheme to address this, and an identity consists of a 256-bit GUID and a private key. For live migration, this is enough. For data exports, this should also include an address book, i.e. in Mastodon's terms, the follower/following lists.

The zot identity is managed by a primary hub, and if that hub goes offline, any hub with the private key can declare itself to be the new primary hub (initiated by the user). Users can import their GUID and private key to any server by either uploading their backup, or by live mirroring from the current primary hub. Your followers' primary hubs are notified of your new hub.

2) Old content

Previously-posted statuses are floating around with mentions that explicitly link to a certain domain/username. These will probably break. However, that's not much different than what currently happens if a server goes offline: any user on that server will become inaccessible, and all mention-links to that user will also become unresolvable. Therefore, this will be a breaking change, but ultimately one that needs to be made for the resilience and robustness of the future network.

Plan

  1. Start generating GUIDs for Mastodon users in preparation for v.3.0.0, the sooner the better. We might as well use the "256-bits encoded as base64url" schema that zot uses, if there aren't any other options that work better for some reason or another.
  2. Start refactoring the codebase to accept either username/domain pairs or the newly-generated GUIDs. If a GUID exists, it should be authoritative over username/domain. This will probably affect (at the very least) account generation, account lookup, mentions handling, and URI dereferencing. GUID should be served as ActivityPub id field for Actor objects. The URL should be served via url instead.
  3. Write a database migration task to start storing accounts internally by GUID.
  4. Start using GUID for follower/following lists. Ensure that the data export tool includes the GUID and user's private/public keys, as well as their posts, media, and follower/following lists.
  5. Write a handler to announce updated username/domain for a given GUID to your follower/following lists, using a secure exchange between servers and probably the Update Activity. Write a handler to receive and parse this Update.
  6. Write an import tool for the offline data export archive.
  7. Write a live import tool to exchange data directly with your primary server.
  8. When v3.0.0 is released, expose steps 6-7 to users. Since by this point the majority of users should already have a GUID due to step 1, and the logic for handling GUIDs should have percolated through the network thanks to steps 2-5.

Any insights from coders on this? Does this seem workable?

@remram44

This comment has been minimized.

Show comment
Hide comment
@remram44

remram44 Jun 21, 2018

Contributor

Using a public key instead of some random hash would allow you to prove ownership of the identity, in the presence of bad third-party servers, or bad/gone previous server. Anyone can verify that you (possessor of the private key) did indeed initiate the change of domain.

Contributor

remram44 commented Jun 21, 2018

Using a public key instead of some random hash would allow you to prove ownership of the identity, in the presence of bad third-party servers, or bad/gone previous server. Anyone can verify that you (possessor of the private key) did indeed initiate the change of domain.

@pingu8007

This comment has been minimized.

Show comment
Hide comment
@pingu8007

pingu8007 Jun 22, 2018

I'm confused. Does it mean username/domain will be changed as long as one moved?
The migration largely rely on notification from new primary hub, how can I find the moved user without the knowledge of new primary hub? Such as an old address printed on business card, a dump with outdated hub information, or a GUID string only.
Hand out my private key make me a bit unsatisfied, any details?

I'm confused. Does it mean username/domain will be changed as long as one moved?
The migration largely rely on notification from new primary hub, how can I find the moved user without the knowledge of new primary hub? Such as an old address printed on business card, a dump with outdated hub information, or a GUID string only.
Hand out my private key make me a bit unsatisfied, any details?

@remram44

This comment has been minimized.

Show comment
Hide comment
@remram44

remram44 Jun 22, 2018

Contributor

I think in @trwnh's scheme you need the old domain to still exist and let you know where the new location is. Truly resilient discovery could be done through e.g. a DHT, mapping GUID to domain.

A private key is never handed out, it's private.

Contributor

remram44 commented Jun 22, 2018

I think in @trwnh's scheme you need the old domain to still exist and let you know where the new location is. Truly resilient discovery could be done through e.g. a DHT, mapping GUID to domain.

A private key is never handed out, it's private.

@trwnh

This comment has been minimized.

Show comment
Hide comment
@trwnh

trwnh Jun 23, 2018

Contributor

@pingu8007 The primary instance would send a notofication to your followers' instances -- see point 5 pf the plan.

@remram44 Are there any concerns with using the public key directly as a GUID, rather than as a separate field? I suppose functionally, a public key is ostensibly unique, but my understanding is that it would be inefficient to refer to every user by public key, even in unencrypted situations. Also, using a separate GUID allows for the encryption schema to change later.

Of course, I'm also unsure of the exact schema Mastodon uses for encryption right now. The existence of a private key for a user implies that public keys are generated for each user, but I have no idea if this is indeed the case, or if keys are generated per-server. Per-user keys would go a long way toward potential end-to-end support, but that's a separate issue. It may end up being necessary to establish provenance of your identity, though.

Contributor

trwnh commented Jun 23, 2018

@pingu8007 The primary instance would send a notofication to your followers' instances -- see point 5 pf the plan.

@remram44 Are there any concerns with using the public key directly as a GUID, rather than as a separate field? I suppose functionally, a public key is ostensibly unique, but my understanding is that it would be inefficient to refer to every user by public key, even in unencrypted situations. Also, using a separate GUID allows for the encryption schema to change later.

Of course, I'm also unsure of the exact schema Mastodon uses for encryption right now. The existence of a private key for a user implies that public keys are generated for each user, but I have no idea if this is indeed the case, or if keys are generated per-server. Per-user keys would go a long way toward potential end-to-end support, but that's a separate issue. It may end up being necessary to establish provenance of your identity, though.

@remram44

This comment has been minimized.

Show comment
Hide comment
@remram44

remram44 Jun 23, 2018

Contributor

You don't have to use the full public key. A hash or fingerprint works.

My concern with a freely chosen GUID is that collisions are possible. A bad actor could use the same GUID as you, and mess up your account for the people that hear about him before they hear about you.

Reading about your scheme again, I'm wondering if a GUID is necessary at all. Why not use the old username@domain in place of the GUID? And just announce that the old handle is now at a new location?

Contributor

remram44 commented Jun 23, 2018

You don't have to use the full public key. A hash or fingerprint works.

My concern with a freely chosen GUID is that collisions are possible. A bad actor could use the same GUID as you, and mess up your account for the people that hear about him before they hear about you.

Reading about your scheme again, I'm wondering if a GUID is necessary at all. Why not use the old username@domain in place of the GUID? And just announce that the old handle is now at a new location?

@wiktor-k

This comment has been minimized.

Show comment
Hide comment
@wiktor-k

wiktor-k Jun 23, 2018

Contributor

You don't have to use the full public key. A hash or fingerprint works.

For the record ed25519 public keys are only 32 bytes in size only twice as big as GUIDs (16 bytes).

Reading about your scheme again, I'm wondering if a GUID is necessary at all. Why not use the old username@domain in place of the GUID? And just announce that the old handle is now at a new location?

I think one of sub-problems to solve here is to handle old server down forever scenarios. Announcing new handle at old location is already possible with movedTo (e.g. this account).

Contributor

wiktor-k commented Jun 23, 2018

You don't have to use the full public key. A hash or fingerprint works.

For the record ed25519 public keys are only 32 bytes in size only twice as big as GUIDs (16 bytes).

Reading about your scheme again, I'm wondering if a GUID is necessary at all. Why not use the old username@domain in place of the GUID? And just announce that the old handle is now at a new location?

I think one of sub-problems to solve here is to handle old server down forever scenarios. Announcing new handle at old location is already possible with movedTo (e.g. this account).

@TehShrike

This comment has been minimized.

Show comment
Hide comment
@TehShrike

TehShrike Jun 23, 2018

I'm fine with identity being tied to server. I just want a way to formalize "My identity has transitioned from TehShrike@coolserver.com to TehShrike@toteselite.com" in a way that all my followers and follow lists move from coolserver.com to toteselite.com.

If coolserver.com maintained a "forwarding address" to the new location, that would be cool too, but you can't rely on that staying up forever.

Changing the nature of identity on mastodon sounds much more difficult.

I'm fine with identity being tied to server. I just want a way to formalize "My identity has transitioned from TehShrike@coolserver.com to TehShrike@toteselite.com" in a way that all my followers and follow lists move from coolserver.com to toteselite.com.

If coolserver.com maintained a "forwarding address" to the new location, that would be cool too, but you can't rely on that staying up forever.

Changing the nature of identity on mastodon sounds much more difficult.

@LeeteqXV

This comment has been minimized.

Show comment
Hide comment
@LeeteqXV

LeeteqXV Jun 23, 2018

@wedza

This comment has been minimized.

Show comment
Hide comment
@wedza

wedza Jun 24, 2018

Why not integrate this into the registration process. When someone registers in a new instance, this instance will check if the mail address used to create the new account is already used on other public instances.

If the same mail address is detected on another account on another instance, the new account on the instance will propose to set up the redirection settings (to change from one instance to another, with all the parameters that @hach-que has purposed). The user can refuse and decide to do nothing, and start from an empty account.

This will make the process simpler for a broader audience who don't want to mess with theses redirections settings.

wedza commented Jun 24, 2018

Why not integrate this into the registration process. When someone registers in a new instance, this instance will check if the mail address used to create the new account is already used on other public instances.

If the same mail address is detected on another account on another instance, the new account on the instance will propose to set up the redirection settings (to change from one instance to another, with all the parameters that @hach-que has purposed). The user can refuse and decide to do nothing, and start from an empty account.

This will make the process simpler for a broader audience who don't want to mess with theses redirections settings.

@remram44

This comment has been minimized.

Show comment
Hide comment
@remram44

remram44 Jun 24, 2018

Contributor

check if the mail address used to create the new account is already used on other public instances.

How do you do that? How do you prevent other instances from lying? How do you prove to the old instance that this should happen? How do you deal with the old instance being broken, or malicious?

Contributor

remram44 commented Jun 24, 2018

check if the mail address used to create the new account is already used on other public instances.

How do you do that? How do you prevent other instances from lying? How do you prove to the old instance that this should happen? How do you deal with the old instance being broken, or malicious?

@Shywim

This comment has been minimized.

Show comment
Hide comment
@Shywim

Shywim Jun 24, 2018

One way would be the two instances sending each a validation email. The only case in which there is a problem is if the instance you want to move from is malicious, but you can't really prevent anything in this case.

Shywim commented Jun 24, 2018

One way would be the two instances sending each a validation email. The only case in which there is a problem is if the instance you want to move from is malicious, but you can't really prevent anything in this case.

@penguin42

This comment has been minimized.

Show comment
Hide comment
@penguin42

penguin42 Jun 24, 2018

remram44: Dealing with the old instance being broken is why I said above (and split out as issue 7715) is that what's really needed is live mirroring between accounts, so you setup a spare before one side fails.
To do migration, I guess you could use signed toots, with some form of message that advertises the change.

remram44: Dealing with the old instance being broken is why I said above (and split out as issue 7715) is that what's really needed is live mirroring between accounts, so you setup a spare before one side fails.
To do migration, I guess you could use signed toots, with some form of message that advertises the change.

@trwnh

This comment has been minimized.

Show comment
Hide comment
@trwnh

trwnh Jun 24, 2018

Contributor

@remram44

My concern with a freely chosen GUID is that collisions are possible. A bad actor could use the same GUID

Random collision in 256-bit will take longer than the life of the universe. Intentional collision would be prevented by cryptography. At least, that's how zot does it -- see: what an identity consists of, #177 (comment) (uid and private key, plus address book if offline).

Why not use the old username@domain in place of the GUID? And just announce that the old handle is now at a new location?

That might work only for the purposes of migration, but for basically nothing else. It also requires validation of some sort with the server on that domain, which might be offline. It also will not be preserved when migrating to a new server/domain -- the point of the GUID is to identify the two accounts as the same without revealing a key. Verification happens in a different step.

@TehShrike

I'm fine with identity being tied to server. I just want [...] all my followers and follow lists [to] move [...] If [the old server] maintained a "forwarding address" to the new location, that would be cool too, but you can't rely on that staying up forever.

That's exactly what would ideally be avoided. If all you care about is having your address book move, then much of that is already possible. But IMO, a proper "migration" would unambiguously move your entire account, not just the details of it.

Changing the nature of identity on mastodon sounds much more difficult.

It will definitely be difficult, which is why the plan I described proposes a gradual change before it becomes official (in a v3.0.0 change). Right now, the fact that identity is tied to user/domain is a major blocking issue to any sort of migration. If that doesn't change, then Mastodon will never be able to gracefully handle anything more than the "account moved" notice we already have. Any existing instance will see your moved account as an entirely different account, which is extremely inconvenient.

@wedza

Why not integrate this into the registration process. When someone registers in a new instance, this instance will check if the mail address used to create the new account is already used on other public instances.

That doesn't really solve the issue. Signing up with the same email can already be done for multiple instances, to create separate accounts. Also, it's a really bad idea to expose the email address used by an account. But you do have a point that it probably should be exposed during registration -- in fact, Friendica and Hubzilla already do this, offering you options to import an account or to set up a new one. This has nothing to do with the email used, though; it just uses the ID/keys/posts/contacts.

@penguin42

what's really needed is live mirroring between accounts, so you setup a spare before one side fails.

That would easily be possible once the secure exchange / import logic is implemented. The only difference would be setting the new server as a secondary instance rather than as a new primary instance.

Contributor

trwnh commented Jun 24, 2018

@remram44

My concern with a freely chosen GUID is that collisions are possible. A bad actor could use the same GUID

Random collision in 256-bit will take longer than the life of the universe. Intentional collision would be prevented by cryptography. At least, that's how zot does it -- see: what an identity consists of, #177 (comment) (uid and private key, plus address book if offline).

Why not use the old username@domain in place of the GUID? And just announce that the old handle is now at a new location?

That might work only for the purposes of migration, but for basically nothing else. It also requires validation of some sort with the server on that domain, which might be offline. It also will not be preserved when migrating to a new server/domain -- the point of the GUID is to identify the two accounts as the same without revealing a key. Verification happens in a different step.

@TehShrike

I'm fine with identity being tied to server. I just want [...] all my followers and follow lists [to] move [...] If [the old server] maintained a "forwarding address" to the new location, that would be cool too, but you can't rely on that staying up forever.

That's exactly what would ideally be avoided. If all you care about is having your address book move, then much of that is already possible. But IMO, a proper "migration" would unambiguously move your entire account, not just the details of it.

Changing the nature of identity on mastodon sounds much more difficult.

It will definitely be difficult, which is why the plan I described proposes a gradual change before it becomes official (in a v3.0.0 change). Right now, the fact that identity is tied to user/domain is a major blocking issue to any sort of migration. If that doesn't change, then Mastodon will never be able to gracefully handle anything more than the "account moved" notice we already have. Any existing instance will see your moved account as an entirely different account, which is extremely inconvenient.

@wedza

Why not integrate this into the registration process. When someone registers in a new instance, this instance will check if the mail address used to create the new account is already used on other public instances.

That doesn't really solve the issue. Signing up with the same email can already be done for multiple instances, to create separate accounts. Also, it's a really bad idea to expose the email address used by an account. But you do have a point that it probably should be exposed during registration -- in fact, Friendica and Hubzilla already do this, offering you options to import an account or to set up a new one. This has nothing to do with the email used, though; it just uses the ID/keys/posts/contacts.

@penguin42

what's really needed is live mirroring between accounts, so you setup a spare before one side fails.

That would easily be possible once the secure exchange / import logic is implemented. The only difference would be setting the new server as a secondary instance rather than as a new primary instance.

@remram44

This comment has been minimized.

Show comment
Hide comment
@remram44

remram44 Jun 24, 2018

Contributor

Random collision in 256-bit will take longer than the life of the universe. Intentional collision would be prevented by cryptography.

Intentional collisions are exactly what I'm concerned about. "Prevented by cryptography" only happens if you use a public key hash instead of a GUID. Note that GUID means something specific: those are 128-bit values with a specific (versioned) schema.

Contributor

remram44 commented Jun 24, 2018

Random collision in 256-bit will take longer than the life of the universe. Intentional collision would be prevented by cryptography.

Intentional collisions are exactly what I'm concerned about. "Prevented by cryptography" only happens if you use a public key hash instead of a GUID. Note that GUID means something specific: those are 128-bit values with a specific (versioned) schema.

@trwnh

This comment has been minimized.

Show comment
Hide comment
@trwnh

trwnh Jun 25, 2018

Contributor

@remram44 Ah, my bad, I wasn't clear on the differences between guid/uuid/etc. I've been using the terms in the most generic sense possible (a globally unique user ID). Regardless, the (256-bit) UID alone will not be enough to constitute an identity; it is only part of it. A private key and address book make up the other parts (to prove ownership + rebuild connections).

Contributor

trwnh commented Jun 25, 2018

@remram44 Ah, my bad, I wasn't clear on the differences between guid/uuid/etc. I've been using the terms in the most generic sense possible (a globally unique user ID). Regardless, the (256-bit) UID alone will not be enough to constitute an identity; it is only part of it. A private key and address book make up the other parts (to prove ownership + rebuild connections).

@LeeteqXV

This comment has been minimized.

Show comment
Hide comment
@LeeteqXV

LeeteqXV Jun 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment