frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

I built vault-gated credential storage in a Tauri/Rust desktop app

https://r2desk.greeff.dev
3•pio_greeff•2h ago

Comments

pio_greeff•2h ago
I've been building R2 Desk Pro, a desktop client for Cloudflare R2, and the most interesting engineering problem was the security architecture: how do you build a desktop app where credentials genuinely cannot leak through the frontend?

The threat model: a Tauri app runs a Rust backend and a webview frontend. If credentials touch the webview, they're accessible to JavaScript — same exposure as a browser extension. That's not acceptable for long-lived R2 keys with read/write/delete access to production storage.

Here's what I ended up with:

*Vault layer* Argon2id KDF derives a 256-bit key from the user's passphrase. The vault state is checked at the start of every Tauri command handler. If the vault is locked, the command returns an error before any R2 operation executes. The frontend never holds the key — it only knows whether the vault is open or closed.

*Credential storage* R2 access keys are stored in the OS keychain via the keyring crate (Windows Credential Manager, macOS Keychain, libsecret on Linux). Nothing sensitive touches the filesystem or app settings.

*Backend-only R2 requests* All S3 operations run in Rust using the AWS SDK. The frontend calls Tauri commands like `list_objects` or `upload_file` — it never constructs signed requests or holds credentials long enough to use them. The signing happens entirely in the backend.

*Session lock* On macOS: NSWorkspaceSessionDidResignActiveNotification triggers vault auto-lock when the session goes inactive. On Windows: WM_WTSSESSION_CHANGE handles the same. On Linux: XScreenSaver / logind signals.

The cross-platform session lock was the most painful part — each OS has a completely different event model and Tauri doesn't abstract this for you.

*The tradeoff* This architecture means the frontend is essentially a dumb UI. Any operation that needs R2 access goes through a Tauri command. That's more round-trips than a purely frontend approach but the security boundary is clean and auditable.

Happy to discuss the implementation details — particularly the Argon2id parameterisation choices and the keyring abstraction across the three platforms.

https://r2desk.greeff.dev

Software Bonkers

https://craigmod.com/essays/software_bonkers/
1•EmilStenstrom•31s ago•0 comments

Estranged and Alone? How to Find Community After Going 'No Contact' with Family

https://www.teenvogue.com/story/estranged-how-to-find-community-after-going-no-contact-with-family
1•Tomte•2m ago•0 comments

Roast your startup and send it to 1999

https://shipordie.club/roast/1999mystartup
1•ghoshbishakh•3m ago•0 comments

Are Prediction Markets Good for Journalism?

https://www.cjr.org/the-interview/are-prediction-markets-actually-good-for-journalism-kalshi-poly...
1•Tomte•3m ago•0 comments

AgentPages – GitHub Pages for AI Agents (GitHub Agentic Workflows – Gh-Aw)

https://github.com/idorozin/AgentPages
1•idorozin•3m ago•1 comments

Dog's Cancer Cure via ChatGPT and mRNA Vaccine Offers Hope for Humans

https://www.archyde.com/dogs-cancer-cure-via-chatgpt-mrna-vaccine-offers-hope-for-humans/
1•iamflimflam1•4m ago•0 comments

'Revolutionary': Ukrainian para-biathlete wins silver using ChatGPT as his coach

https://www.theguardian.com/sport/2026/mar/09/ukraine-winter-paralympics-chat-gpt-artificial-inte...
1•helsinkiandrew•6m ago•0 comments

I built a DNA computing kernel that processes 100k+ genes in parallel

https://github.com/Admin135158/Proteus
1•admin135158•7m ago•1 comments

Ask HN: How to Get a Internship?

2•krishSingaria•10m ago•0 comments

Cicikus v3 Prometheus 4.4B – An Experimental Franken-Merge for Edge Reasoning

https://huggingface.co/pthinc/Cicikus_PTHS_v3_4.4B
1•pthuser•12m ago•0 comments

Porting software has been trivial for a while now

https://ghuntley.com/porting/
1•ghuntley•13m ago•0 comments

$96 3D-printed rocket that recalculates its mid-air trajectory using a $5 sensor

https://github.com/novatic14/MANPADS-System-Launcher-and-Rocket
2•ZacnyLos•14m ago•0 comments

Atlassian promotes and lays off someone in the same day

https://old.reddit.com/r/theprimeagen/comments/1rsuj1v/atlassian_promotes_and_lays_off_someone_in...
2•mmarian•15m ago•0 comments

I made Karpathy's Autoresearch work on CPU

https://github.com/bopalvelut-prog/autoresearch
1•M4s4•15m ago•1 comments

Did giant Ice Age beasts carve these caves in South America?

https://www.nature.com/articles/d41586-025-00216-x
1•zeristor•16m ago•1 comments

The ~fifth~ fourth postulate of decision theory (On the Independence Axiom)

https://www.lesswrong.com/posts/MsjWPWjAerDtiQ3Do/on-the-independence-axiom
1•sieste•17m ago•0 comments

Gemini 3.1Pro is aggressive like a hungry wolf

https://old.reddit.com/r/GoogleAntigravityIDE/comments/1ru97bx/gemini_31pro_is_aggressive_like_a_...
2•cft•20m ago•0 comments

The women bringing chess into the 21st Century with bullet games & viral videos

https://www.bbc.co.uk/news/articles/ce3g0kel3jyo
2•mellosouls•22m ago•0 comments

Wow

1•yuvrajdahal•24m ago•0 comments

Show HN: Soorf, a natural language audio editor

https://soorf.xyz
1•copypirate•28m ago•0 comments

Pm2-manager: A modern, real-time web dashboard for your PM2 processes

https://github.com/orangecoding/pm2-manager
1•thunderbong•30m ago•0 comments

Boot, Prompt, Run: what happens to personal computing when sw writes itself

https://giampaolo.guiducci.it/posts/2026-03-15-boot-prompt-run/
2•gosub•32m ago•0 comments

Try an open-source MCP server for Postgres – win a Raspberry Pi

1•pgedge_postgres•33m ago•0 comments

Shield Messenger A Tor-native,P2P encrypted messenger with built-in Solana/Zcash

https://github.com/abokenan444/shield-messenger
1•abokenan444•41m ago•1 comments

AutoResearchClaw

https://github.com/aiming-lab/AutoResearchClaw
1•frozenseven•41m ago•0 comments

The Space Data Center Mass Budget Behind 10× Power Density

https://research.33fg.com/analysis/the-space-data-center-mass-budget-behind-10x-power-density
1•T-A•42m ago•0 comments

//go:fix inline and the source-level inliner

https://go.dev/blog/inliner
1•vismit2000•45m ago•0 comments

Claude Code tips for non-programmers

https://thewriting.dev/claude-code-isnt-just-for-developers/
1•r0rshrk•49m ago•0 comments

Three Claude Skills to Sharpen Judgment

https://age-of-product.com/three-ai-skills-to-sharpen-judgment/
1•swolpers•49m ago•0 comments

Hybrid AI Desktop Layer Combining DOM-Automation and API-Integrations

https://github.com/BiamOS/BiamOS
1•BiamOS•50m ago•1 comments