This PR extracts our session cookie handling code into a dedicated crate. This helps avoid tight coupling of the code and might improve compile times a little bit too.
As discussed in the last crates.io team meeting the current limit of just 100 downloads per month was too conservative. This commit raises the limit to 500 downloads per month to make self-service deletions a bit more viable in practice.
This PR addresses part two of https://github.com/rust-lang/crates.io/issues/9352#issuecomment-2549402681 by sending a notification email to the owner when a crate is getting deleted.
This PR improves our OpenAPI description by declaring what "security schemes" (aka. authentication schemes) are available, and what endpoints require which kind of authentication.

The axum Json extractor expects a Content-Type: application/json header, but in our test utilities we currently only add that when we detect that the request body contains a JSON object. This PR adjusts the code to also work for JSON…
This makes the Record type a bit easier to work with compared to before with a unnamed, seven item tuple :D
This simplifies the make_query() fn, since it no longer needs to return a Result
No need to manually implement it, now that we use derive_more 🎉
We can figure out the auth_user_id value at the point where we turn the ListQueryParams instance into FilterParams. This then allows us to get rid of the OnceLock, and remove the extra arguments from the make_query() fn.
These are all in Result returning fns, so there is no need to use unwrap() if we can use ? instead :)
This allows us to automatically derive OpenAPI descriptions and avoids unnecessary memory allocations from query parameters we do not care about in this endpoint.
Small caveat: the serde_html_form crate currently deserializes foo=…
The overhead of adding dedicated Path structs for these did not seem worth it compared to https://github.com/rust-lang/crates.io/pull/10208, so I added these Path params only to the utoipa annotations.
Related:
These structs can be used as axum extractors for the corresponding Path patterns. At the same time, they implement utoipa::IntoParams, which allows them to be used in #[utoipa::path(params(CratePath), ...) form, which adds them t…
… and unify some of the differing naming patterns.
This PR continues what #10186 started. It migrates (almost) all of our API endpoints to utoipa with a set of very basic annotations. The next step will be to add path and query parameters and request/response body schemas. Also missing…
Now that we are not using the BytesRequest in the publish endpoint, this limit isn't actually used anymore. The StreamReader does not care about the limit and the JSON metadata blob and the tarball have their dedicated limits already.
This avoids allocating a bunch of String instances for all the keys and values in the query string when all we need is three optional fields, of which two are just integers. This PR also uses NonZeroU32 for the page and per_page …
There is no need for us to implement this trait manually if we can just derive it :)
The former hasn't had a commit in 4 years, while the latter is properly maintained and might potentially unlock other useful derives.