Skip to content

Commit c488c3b

Browse files
authored
Merge pull request #3964 from ehuss/headers-3946
Fix 3946-crates-io-username-identity headers
2 parents b70da07 + 792a2b5 commit c488c3b

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

text/3946-crates-io-username-identity.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- RFC PR: [rust-lang/rfcs#3946](https://github.com/rust-lang/rfcs/pull/3946)
44
- Crates.io Issue: [rust-lang/crates.io#13758](https://github.com/rust-lang/crates.io/issues/13758)
55

6-
# Summary
6+
## Summary
77
[summary]: #summary
88

99
Someday, we would like to enable people to log in to crates.io with other services in addition to
@@ -21,7 +21,7 @@ The biggest changes to crates.io as a result of this RFC will be:
2121
- Crates.io will no longer automatically update your crates.io username if you rename your GitHub
2222
account
2323

24-
# Motivation
24+
## Motivation
2525
[motivation]: #motivation
2626

2727
Crates.io's code currently has a one-to-one mapping between crates.io accounts and GitHub accounts.
@@ -39,7 +39,7 @@ one person's usernames across different services are not guaranteed to be the sa
3939
more services, crates.io's codebase needs to be able to handle these situations and clearly convey
4040
crates.io user identities to minimize the possibility of confusion or deliberate impersonation.
4141

42-
# Guide-level explanation
42+
## Guide-level explanation
4343
[guide-level-explanation]: #guide-level-explanation
4444

4545
This section will address changes to what users will experience on the crates.io website and via
@@ -106,7 +106,7 @@ yet been taken on crates.io. The crates.io username field will be prefilled with
106106
OAuth account's username and an indication of whether that username is available on crates.io or
107107
not.
108108

109-
## Renamed and deleted GitHub accounts
109+
### Renamed and deleted GitHub accounts
110110

111111
GitHub allows users to change their username (but keep the same GitHub ID number so that crates.io
112112
can know it's the same account) or delete their account, which makes the username available for
@@ -164,7 +164,7 @@ user `best_rust_programmer_ever` will need to choose a different crates.io usern
164164
accounts will have the warning symbol. The latter user may see this as unfair, but this is where
165165
the first-come-first-serve policy should be enforced.
166166

167-
## Crates.io username requirements
167+
### Crates.io username requirements
168168

169169
Crates.io usernames will largely use the same rules that GitHub usernames use today. All existing
170170
crates.io accounts will be valid under whatever rules we decide on.
@@ -196,7 +196,7 @@ protection currently that we'd need to manage ourselves.
196196
These requirements will be clearly documented on a page on crates.io as well as in the signup form
197197
when we are requiring the person to pick a crates.io username.
198198

199-
## Crates.io account rename restrictions
199+
### Crates.io account rename restrictions
200200
[crates-io-account-rename-restrictions]: #crates-io-account-rename-restrictions
201201

202202
The biggest concerns with allowing crates.io username changes are impersonation and resurrection
@@ -232,7 +232,7 @@ will update [the privacy policy](https://rustfoundation.org/policy/privacy-polic
232232
crates.io to make this retention clear, and we will delete even admin-only viewable information
233233
from the database on request.
234234

235-
## Crates.io account and GitHub account link privacy
235+
### Crates.io account and GitHub account link privacy
236236

237237
Currently, the knowledge that a crates.io account corresponds to a GitHub account is public
238238
information. This link is displayed on user pages and is present in the database dumps. This RFC is
@@ -245,14 +245,14 @@ Accounts][private-linked-accounts] section under Future Possibilities for the po
245245
a way to have a private linked account in the future.
246246

247247

248-
# Reference-level explanation
248+
## Reference-level explanation
249249
[reference-level-explanation]: #reference-level-explanation
250250

251251
This section will address changes to crates.io's HTTP API. It will not address low-level
252252
implementation details of the crates.io database schema or backend code changes; those will be
253253
worked out during implementation of this RFC.
254254

255-
## User API
255+
### User API
256256

257257
The `find_user` API is currently defined to respond to URLs in the form `/api/v1/users/{user}`,
258258
where `{user}` is currently the GitHub username that crates.io has been told about for that account.
@@ -354,7 +354,7 @@ over an owner (or tapping on an icon next to the owner that the frontend shows w
354354
mobile devices), we could request the linked account information then and display a "detail card"
355355
for that owner showing the information on their linked accounts.
356356

357-
## Owner APIs
357+
### Owner APIs
358358

359359
The current API request for inviting user owners or adding team owners consists of a `PUT` request
360360
to `/api/v1/crates/[crate name]/owners` with the following JSON (using a request to add user
@@ -430,7 +430,7 @@ user with the `users.username` of `some_user` and a different account that has t
430430
request is being made about. If only one account is an owner, that account will be removed as an
431431
owner.
432432

433-
# Drawbacks
433+
## Drawbacks
434434
[drawbacks]: #drawbacks
435435

436436
- Impedes signup flow if you have to choose a username or try multiple usernames before finding an
@@ -450,7 +450,7 @@ owner.
450450
attacks, as discussed (with potential mitigations) in [Crates.io account rename
451451
restrictions][crates-io-account-rename-restrictions].
452452

453-
# Rationale and alternatives
453+
## Rationale and alternatives
454454
[rationale-and-alternatives]: #rationale-and-alternatives
455455

456456
We could choose to diverge from crates.io's current behavior more than proposed here, such as:
@@ -464,7 +464,7 @@ We could choose to diverge from crates.io's current behavior more than proposed
464464
- We could implement the backend changes for this RFC but choose to wait to allow username editing
465465
until we have multiple ways of logging in.
466466

467-
## "Disambiguation page" alternative
467+
### "Disambiguation page" alternative
468468

469469
We could choose not to have a `username` field on the `users` table at all. When visiting
470470
`https://crates.io/users/example`, crates.io would always look up usernames in all available
@@ -514,7 +514,7 @@ with no indication that the GitHub user even exists. We'd need to make the page
514514
there was only a GitLab account attached, not a GitHub account attached as most people would expect
515515
in most cases.
516516

517-
# Prior art
517+
## Prior art
518518
[prior-art]: #prior-art
519519

520520
Crates.io appears to be unique among the major OSS package registries in only offering GitHub
@@ -571,7 +571,7 @@ Crates.io account `carols10cents` is associated with:
571571
Is this the `carols10cents` you wanted? [y/N]
572572
```
573573
574-
# Unresolved questions
574+
## Unresolved questions
575575
[unresolved-questions]: #unresolved-questions
576576

577577
- How would we define "squatting" of usernames that would be clear cases for admins to make
@@ -640,10 +640,10 @@ Is this the `carols10cents` you wanted? [y/N]
640640
added as an owner of a crate for a short holding period (1 day, for example) to potentially slow
641641
down/prevent impersonation attacks? How often would this be a false positive/annoyance?
642642

643-
# Future possibilities
643+
## Future possibilities
644644
[future-possibilities]: #future-possibilities
645645

646-
## Email/password login
646+
### Email/password login
647647

648648
This functionality change would also enable a way of creating crates.io accounts without any
649649
associated identity/reputation, only an email address. But this opens more potential for spam and
@@ -652,7 +652,7 @@ standing on services like GitHub. When we choose which services to add as OAuth
652652
assess in what ways the candidate services also provide these protections if we want to continue to
653653
have this benefit.
654654

655-
## Avatars
655+
### Avatars
656656

657657
Avatars are also indicators of identities; as we evolve crates.io's capabilities with regards to
658658
authentication services, we should evolve how crates.io handles avatars, considering aspects such
@@ -673,7 +673,7 @@ as:
673673
as username resolution, but it might make implementation/database queries nicer if we make a
674674
similar decision with avatars as with usernames.
675675

676-
## Private linked accounts
676+
### Private linked accounts
677677
[private-linked-accounts]: #private-linked-accounts
678678

679679
Currently, the link between a crates.io account and a GitHub account is public information both in

0 commit comments

Comments
 (0)