Skip to content

Commit

Permalink
Improve validation of OAuth tokens (#189)
Browse files Browse the repository at this point in the history
* Extra validation of oauth tokens

* Also update the backend readme

* Also use bookworm-slim in runtime container

* Ensure consistent kebab-case

* Handle request failures without leaking implementation details

---------

Co-authored-by: Micah <[email protected]>
  • Loading branch information
magnalite and Dekkonot authored Oct 21, 2024
1 parent ea536c5 commit 5317c25
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 44 deletions.
79 changes: 53 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ ubyte = "0.10.3"
indicatif = "0.17.4"
tokio = "1.28.2"
serial_test = "2.0.0"
time = "=0.3.35"

[dev-dependencies]
insta = { version = "1.1.0" }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Pre-built binaries are available for Windows, macOS, and Linux from the [GitHub
[releases]: https://github.com/UpliftGames/wally/releases

### From Source
It's straightforward to compile Wally from source. Wally requires Rust 1.51.0 or newer.
It's straightforward to compile Wally from source. Wally requires Rust 1.80.0 or newer.

Clone the repository and use:

Expand Down
1 change: 1 addition & 0 deletions wally-registry-backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ url = { version = "2.2.1", features = ["serde"] }
walkdir = "2.3.1"
zip = "0.5.11"
moka = "0.11.1"
time = "=0.3.35"

[dev-dependencies]
tempfile = "3.1.0"
Expand Down
4 changes: 2 additions & 2 deletions wally-registry-backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1-slim-buster AS build
FROM rust:1.81-slim-bookworm AS build
WORKDIR /usr/app

# Debian Slim doesn't install certificates by default, but we kinda want those.
Expand All @@ -24,7 +24,7 @@ COPY ./wally-registry-backend ./wally-registry-backend/
RUN touch wally-registry-backend/src/main.rs
RUN cargo build --package wally-registry-backend --release

FROM debian:buster-slim
FROM debian:bookworm-slim

# Install the same SSL packages as in our build image.
RUN apt-get update
Expand Down
2 changes: 1 addition & 1 deletion wally-registry-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This directory contains the backend to the Wally registry. It's the interface that clients use for downloading, publishing, and yanking packages.

## Requirements
- Rust 1.50.0+
- Rust 1.80.0+
- C toolchain for OpenSSL

## Running
Expand Down
Loading

0 comments on commit 5317c25

Please sign in to comment.