Crates.io introduces improved API tokens
Crates.io, the Rust package registry, has recently introduced new features to their API token creation page. These changes provide users with more flexibility and enhanced security options.
Previously, users were only able to choose a token name when generating a new API token. However, Crates.io's new "New API Token" page now includes two essential features known as "token scopes". The first feature allows users to restrict API tokens to specific operations, such as only enabling the publishing of new versions for existing crates while disallowing the creation of new crates. The second feature offers an optional restriction where tokens can be limited to only work for specific crate names.
In addition to these new features, Crates.io has also implemented expiration dates for API tokens. This added security measure ensures that tokens are only valid for a specified period of time, reducing the risk of unauthorized access to user accounts.
Developers who use Rust and rely on Crates.io for package management can benefit from these new features. By restricting API tokens to specific operations and crate names, developers can have greater control over their packages and reduce the risk of malicious activity. Additionally, the implementation of expiration dates provides an extra layer of security to protect user accounts and packages.
To learn more about these new features and how they were implemented, check out Crates.io's corresponding tracking issue on GitHub.