For background context and links to other threads, see Survey of organizational ownership and registry namespace designs for Cargo and Crates.io. This thread assumes that one has been read.
This thread is for summarizing approaches for improving organizational ownership without namespaces. Other general approaches include:
- Child Thread: Survey of organizational ownership designs for Cargo and Crates.io
- Child Thread: Survey of registry namespace designs for Cargo and Crates.io
Debating which proposal Cargo and Crates.io should go with is off-topic for this thread. Please create your own thread.
Prior art
Those relevant for this thread
Nuget prefix reservation
Organizations can register package name prefixes that give them exclusive access to publishing under. These packages get a badge. Badges are permanent.
Existing packages at time of prefix registration are still allowed to exist and don't prevent registration of the prefix but they do not get the reserved prefix badge.
Only one owner of the prefix needs to be an owner of a package to get the badge. Package owners who don't own the prefix cannot remove owners that do. An owner of the prefix must always be the owner of the package to ensure the badge is permanent.
Sub-prefixes can be carved out and transferred.
An owner can mark a prefix as public, allowing anyone to publish to it.
Requesting a prefix is done by emailing nuget.org maintainers who also handle disputes. Unclear what verification is done.
Compared to use cases:
- Squatting and typo squatting is reduced to the prefix portion
- Not friendly to renames or prefix transfers
Compared to requirements:
- Could break up existing culture of publishing packages under other's prefixes
- Potential for abuse with people reserving prefixes used by other projects
- Verification process is pushed onto the crates.io team
References:
Potential solutions
Publish-owners (no-op)
Today, you can get a sense for the organization behind a package by its publish owner, e.g.
- rust-lang-owner for the Rust Project
- aws-sdk-rust-ci for AWS
cargo-supply-chain helps to raise visibility of the publish-owners in your dependency tree.
Ownership may change and users may not be aware of it.
Compared to use cases:
- Helps with understanding official ownership but not other use cases
- No verification
- User must verify organization behind owner
- User won't be informed of ownership transfers'
- Trust is being built on implementation details of an organization's processes which can change over time
Compared to requirements:
Future possibilities
- Adding a display name though that runs into issues with ensuring it is representative and not obscuring (e.g. a malicious actor changing their display name to "Google")
- Being able to elevate the organizational owner as the one that matters among all of the owners
- Prominently showing the owner in the UX for crates.io and cargo
References:
Brand badge
An organization tag was mentioned in passing in the 2014 crates.io package policy document and I cannot find any follow up discussions with more details, so we're going to make suppositions. We are renaming this to "brand badge" as it feels like it better conveys the intent.
A package may opt-in to one specific brand badge. The brand is associated with a domain and the domain must recognize the packages claiming to be part of the brand through a DNS TXT record.
Verified badges will be marked on the crates.io page and the brand may be displayed along with the package name in the UX for crates.io and cargo.
One option would be to collect a fee for corporate brands as a way to generate a modest amount of revenue to support crates.io's governance and development.
A package could specify its brand via package.brand but runs into the
mutable metadata issue.
It may be better for this to be a property stored in a registry database and changed in the registry UX and possibly through a cargo subcommand.
If the brand is not the domain itself but a display name associated with it, this can run into issues with malicious actors spoofing other brands.
Open questions:
- Would users want to be able to track owners in git history (through tracking in
Cargo.lock)? - Would users want to pin owners?
cargo add regex --owner rust-langregex = { version = "1", owner = "rust-lang" }
Compared to use cases:
- Helps with understanding official ownership but not other use cases
Compared to requirements:
- While this requires a domain which can be a barrier, it is offset by just being for a brand and if you are developing your brand, you likely have a domain
References: