Skip to content

Commit b656dd1

Browse files
committed
Rauthy: build without the FIDO MDS dataset when the download fails
mds.fidoalliance.org rate-limits with 429; upstream embeds an empty placeholder in that case and refreshes the dataset at runtime.
1 parent 63dd5a0 commit b656dd1

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎install/rauthy-install.sh‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@ cd /opt/rauthy-build
2727
# The prebuilt UI ships in every release, so Node.js and wasm-pack are not needed
2828
tar -xf assets/static_html/static_v1.tar.gz
2929
tar -xf assets/static_html/templates_html.tar.gz
30-
# A release build needs the FIDO MDS dataset; upstream's converter only builds in debug and its own download times out after 10s
31-
curl_with_retry "https://mds.fidoalliance.org/" "/opt/rauthy-build/mds.jwt"
32-
CARGO_PROFILE_DEV_DEBUG=0 $STD cargo run --bin fido-mds-prep -- --source mds.jwt
30+
# The FIDO MDS dataset is optional at compile time: without it build.rs embeds an empty placeholder and
31+
# Rauthy's scheduler fetches it at runtime. The alliance rate-limits downloads (429), so this is best-effort.
32+
if curl_with_retry "https://mds.fidoalliance.org/" "/opt/rauthy-build/mds.jwt"; then
33+
CARGO_PROFILE_DEV_DEBUG=0 $STD cargo run --bin fido-mds-prep -- --source mds.jwt
34+
else
35+
msg_warn "FIDO MDS download failed; Rauthy will fetch the dataset at runtime"
36+
fi
3337
# Upstream's fat LTO with a single codegen unit takes over an hour and close to 4 GB of RAM on 4 cores
3438
CARGO_PROFILE_RELEASE_LTO=thin CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16 \
3539
$STD cargo build --release --bin rauthy

0 commit comments

Comments
 (0)