Skip to content

Propose the concept of a crates.io username for identity#3946

Open
carols10cents wants to merge 13 commits into
rust-lang:masterfrom
carols10cents:crates-io-username-identity
Open

Propose the concept of a crates.io username for identity#3946
carols10cents wants to merge 13 commits into
rust-lang:masterfrom
carols10cents:crates-io-username-identity

Conversation

@carols10cents
Copy link
Copy Markdown
Member

@carols10cents carols10cents commented Apr 7, 2026

View all comments

This RFC introduces the concept of a crates.io username separate from GitHub (or any potential future OAuth provider) usernames to be able to support multiple OAuth providers someday and adequately handle potential username collisions.

Introducing the concept of a crates.io username in the back end of crates.io and in the user experience is a prerequisite to eventually offering multiple OAuth providers.

Important

Since RFCs involve many conversations at once that can be difficult to follow, please use review comment threads on the text changes instead of direct comments on the RFC.

If you don't have a particular section of the RFC to comment on, you can click on the "Comment on this file" button on the top-right corner of the diff, to the right of the "Viewed" checkbox. This will create a separate thread even if others have commented on the file too.

Rendered

@Diggsey
Copy link
Copy Markdown
Contributor

Diggsey commented Apr 7, 2026

Looks very well thought out.

Should there be a limit to how frequently one can change one's username? (Considering the old name will be reserved from some period of time)

Also I think there should be some way to revert a change of name if it's within the reservation window (ie. the old name hasn't been freed up yet) in case the rename was a mistake or the account was compromised.

Comment thread text/0000-crates-io-username-identity.md
Comment thread text/0000-crates-io-username-identity.md Outdated
Comment thread text/0000-crates-io-username-identity.md Outdated
Co-authored-by: Jacob Lifshay <programmerjake@gmail.com>
@DrFrugalOfficial

This comment was marked as resolved.

@DrFrugalOfficial
Copy link
Copy Markdown

Second thing that came to my mind:

It might make sense to run the script to initialize the new login user name in at least 2 batches.
The first one targeting active users which maintain a crate, or have logged in with in the last year, or....
The second one everyone else.

There is probably no 100% clean and correct solution for the name collision dilemma.
It would give people the chance to take their proper user name, if their intended one was taken due to GitHub/crates.io name squatting.

The downside being that it would de-prioritize accounts without crates, or which have not been online in a certain time.
You can decide yourself, where the priorities lie.

Comment thread text/0000-crates-io-username-identity.md
Comment thread text/0000-crates-io-username-identity.md
Comment thread text/0000-crates-io-username-identity.md
Comment thread text/0000-crates-io-username-identity.md Outdated
@Turbo87
Copy link
Copy Markdown
Member

Turbo87 commented Apr 9, 2026

@DrFrugalOfficial please use threads in the diff in the future, so that we can group the discussion topics a bit better 🙏

It might make sense to run the script to initialize the new login user name in at least 2 batches.

I don't think this makes much of a difference. If a user is actively publishing then we will have their current GitHub username and there shouldn't be any conflicts. I don't remember if we specified it in the RFC text, but most likely we would run a GitHub username sync right before we assign the crates.io usernames during the migration.

@rustbot

This comment was marked as resolved.

Comment thread text/0000-crates-io-username-identity.md
Comment thread text/0000-crates-io-username-identity.md
@rustbot

This comment was marked as outdated.

@rustbot

This comment was marked as outdated.

@HackingRepo

This comment was marked as off-topic.

@rustbot rustbot added the T-cargo Relevant to the Cargo team, which will review and decide on the RFC. label Apr 15, 2026
@HackingRepo

This comment was marked as off-topic.

@rustbot rustbot removed the T-cargo Relevant to the Cargo team, which will review and decide on the RFC. label Apr 15, 2026
@HackingRepo

This comment was marked as off-topic.

@weihanglo

This comment was marked as off-topic.

@HackingRepo

This comment was marked as off-topic.

@rust-rfcbot rust-rfcbot added the final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. label May 1, 2026
@rust-rfcbot
Copy link
Copy Markdown
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@rust-rfcbot rust-rfcbot removed the proposed-final-comment-period Currently awaiting signoff of all team members in order to enter the final comment period. label May 1, 2026
Comment thread text/0000-crates-io-username-identity.md
Comment thread text/0000-crates-io-username-identity.md Outdated
Comment thread text/0000-crates-io-username-identity.md
@carols10cents
Copy link
Copy Markdown
Member Author

@rust-rfcbot concern privacy of linked accounts

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Currently awaiting signoff of all team members in order to enter the final comment period. and removed final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. labels May 7, 2026
@carols10cents
Copy link
Copy Markdown
Member Author

@rust-rfcbot concern communicating username mismatches

@carols10cents
Copy link
Copy Markdown
Member Author

@rust-rfcbot concern disambiguation with cargo owner could leak info

Copy link
Copy Markdown

@juleskers juleskers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As offered and accepted, I've split my concern-thread into per-topic threads for easier discussion.

While thinking on this topic, I also realised the additional concern of account-selling becoming (more of) an option.

View changes since this review

Comment thread text/0000-crates-io-username-identity.md
Comment thread text/0000-crates-io-username-identity.md Outdated
Comment thread text/0000-crates-io-username-identity.md
Comment thread text/0000-crates-io-username-identity.md
Comment thread text/0000-crates-io-username-identity.md
Comment thread text/0000-crates-io-username-identity.md
Comment thread text/0000-crates-io-username-identity.md
Gravatar and similar services can unintentionally leak personal
information, which we don't want to do.

I don't think avatar hosting is something crates.io should take on at
this time, but I've noted that it's the most privacy preserving option.
We may want to consider hosting avatars in the future.
…ublic

But note a future possibility that we could add the possibility of
making an account association private.
@carols10cents
Copy link
Copy Markdown
Member Author

@rust-rfcbot resolve privacy of linked accounts
@rust-rfcbot resolve communicating username mismatches
@rust-rfcbot resolve disambiguation with cargo owner could leak info

@carols10cents
Copy link
Copy Markdown
Member Author

@rust-rfcbot resolve disambiguation with cargo owner could leak info

I believe I have now addressed all concerns; if you disagree or have any other concerns, please re-raise!

@rust-rfcbot rust-rfcbot added final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. and removed proposed-final-comment-period Currently awaiting signoff of all team members in order to enter the final comment period. labels May 12, 2026
@rust-rfcbot
Copy link
Copy Markdown
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@ofluffydev
Copy link
Copy Markdown

I'm not too sure how to use the mile long markdown RFC page thing so sorry for another comment.

Has the issue of account username moderation been mentioned? I looked and saw mention of avatars being offloaded to avoid having to moderate those, but I did not see mention of usernames. GitHub already deals with usernames containing slurs, profanity, etc. Would crates.io now have to deal with that problem themselves and moderate bad usernames?

@carols10cents
Copy link
Copy Markdown
Member Author

I'm not too sure how to use the mile long markdown RFC page thing so sorry for another comment.

Has the issue of account username moderation been mentioned? I looked and saw mention of avatars being offloaded to avoid having to moderate those, but I did not see mention of usernames. GitHub already deals with usernames containing slurs, profanity, etc. Would crates.io now have to deal with that problem themselves and moderate bad usernames?

Yes, that is discussed here in the crates.io username requirements section.

`carols10cents` username to appear to be that person to users who don't know about the rename or
deletion. We plan to limit the re-use of usernames, using a similar mechanism that we have today
that prevents re-use of a deleted crate name, so that no one could claim an abandonded username
for, say, 30 days. We will allow the person who changed away from a username to reclaim/"revert to"
Copy link
Copy Markdown

@8573 8573 May 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

30 days

Is it useful to make the waiting time for username reuse so short (outside exceptional cases such as impersonation)? Does allowing username reuse within a period shorter than, say, "2 years", or "forever", offer enough benefit (e.g., not requiring "Someone" to appear as "Someone_2") to outweigh the risk (supply chain attacks)?

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, when someone deletes a crate in the limited cases owners are allowed to delete, crate names are available again 24 hours after deletion. This has seemed to work well, in that people who see that a name isn't in use are able to legitimately use it, and I'm not aware of any attacks happening because the reuse window was this short.

If we don't allow username reuse, I guarantee we'll have people complaining that they can't use the username they want, and that it's not fair because that username isn't being used. There is a crate name that, because of an incident of harassment (and not because the name itself was inappropriate. I will not be going into further detail on the incident, nor will I tell you the crate name). We added the name to the reserved crate list so that no one can have that name. This incident happened about a year ago, and in that time we have had 6 people ask why the name could not be used because they were trying to use it.

So from the experience we have, I do think allowing reuse of usernames after 30 days offers enough benefit to outweigh the risks. Ultimately, I think we need some experience with username reuse to know what the "right" time interval is. This will be implemented as a database field for each username, much as the deleted crates table is implemented today, so we can change the value at any point.

@ofluffydev
Copy link
Copy Markdown

Could we maybe implement something like the AUR where crates could be flagged for abandonment or abuse and handled? Then that way deleted users wouldn't have crates that are deleted, instead waiting for another user to request ownership of them?..

May be way too out of scopr for this thread ngl... 😭

@carols10cents
Copy link
Copy Markdown
Member Author

Could we maybe implement something like the AUR where crates could be flagged for abandonment or abuse and handled? Then that way deleted users wouldn't have crates that are deleted, instead waiting for another user to request ownership of them?..

May be way too out of scopr for this thread ngl... 😭

Sorry, what's the AUR? And yes, I agree that crate ownership is out of scope for this RFC about usernames.

@programmerjake
Copy link
Copy Markdown
Member

Sorry, what's the AUR?

I'd assume they mean https://aur.archlinux.org/

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

Labels

disposition-merge This RFC is in PFCP or FCP with a disposition to merge it. final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. T-crates-io Relevant to the crates.io team, which will review and decide on the RFC.

Projects

None yet

Development

Successfully merging this pull request may close these issues.