Live data from Hacker News

Bitwarden compatible server written in Rust

github.com

21–30 of 116 posts

Re: Bitwarden compatible server written in Rust

#21
post #10

Earlier quoted context omitted.

The bitwarden mobile apps are using Xamarin? That's actually pretty impressive...I've never had any of the weird issues with the bitwarden app that I've had with other Xamarin apps in the past. The desktop app looks and feels like an electron app, so I'm far less impressed by it. At the very least it would be nice to have it in Qt or something like that.

> The desktop app looks and feels like an electron app, so I'm far less impressed by it. That is because it IS an Electron app. > At the very least it would be nice to have it in Qt or something like that. Sure, I hope so too. Unfortunately there are very few serious alternative password managers that are not using Electron for the desktop app these days. Seems like 1Password is on the way out too.

Yeah, it is kind of amazing how quickly 1pw went to hell. It was a great app at one time. Then they forced cloud storage, subscriptions, Electron... it is like they decided to start acting like a private capital sunsetting cash extractor.

Re: Bitwarden compatible server written in Rust

#22
post #8

Earlier quoted context omitted.

The bitwarden mobile apps are using Xamarin? That's actually pretty impressive...I've never had any of the weird issues with the bitwarden app that I've had with other Xamarin apps in the past. The desktop app looks and feels like an electron app, so I'm far less impressed by it. At the very least it would be nice to have it in Qt or something like that.

Bitwarden Mobile: https://github.com/bitwarden/mobile I will freely admit I am strongly biased against Xamarin as there are so few cases where I think it's unequivocally the right choice, and Bitwarden isn't one of them. It would make more sense to take the work done in their desktop electron app and use that as part of an Ionic hybrid mobile app than to screw around with the layercake of bugs and mismatched APIs tha…

Do you know of any open source mobile apps that are full vendor native for iOS and Android? I'd really like to peruse some examples of that.

Re: Bitwarden compatible server written in Rust

#23

I don't have any experience with running the bitwarden server, but the primary selling point for this is that it is less resource intensive than the official server backend. The official backend is written in C#, and is currently using .NET 5. I haven't ever felt like .NET apps were particularly bloated, but I guess it's possible to write bloated code in any language. Does anybody have any insights as to what is done…

Most of the resource usage is on the local installed MS SQL. .NET 5 (core) performance is great. .NET can look like it's uses a chunk of memory while that is configurable as it pre-allocates free space for garbage collection.

Re: Bitwarden compatible server written in Rust

#24

I don't have any experience with running the bitwarden server, but the primary selling point for this is that it is less resource intensive than the official server backend. The official backend is written in C#, and is currently using .NET 5. I haven't ever felt like .NET apps were particularly bloated, but I guess it's possible to write bloated code in any language. Does anybody have any insights as to what is done…

It's been a few years since I looked at the official server setup (I immediately switched to bitwarden_rs, this project), so maybe this isn't as true today:

Mostly it's that the official setup is the same thing that runs their free/paid hosted service. By design, it is quite split apart into separate areas, presumably so they can scale independently of each other: https://github.com/bitwarden/server/blob/master/SETUP.md

But most people are going to want to host self-hosted instances for themselves, their families, or maybe a small company. The official server might be the best route if you're deploying to thousand of users, but that won't be most people.

Another benefit is that this flips all of the "paid" feature flags to true. If you self-host Bitwarden's official setup you still have to pay a subscription to use paid features.

Re: Bitwarden compatible server written in Rust

#25
post #11
post #7

I’ve been really diving into Rust over this holiday break and reading through code bases like this is really helpful. Little things like a shared db connection are not intuitive on the first pass when everything is under such a strict borrow/move/release paradigm. I’m going to study this a little closer but it still isn’t super clear to me. In other languages I would probably implement a singleton of some sort. I kno…

I know this is off-topic but isn't Rust meant to be more of a systems-level language? It seems to me that Go would be a better choice for server-side API (assuming .NET 5 and 6 are too bloated and slow for your tastes). Or is Rust finding a niche in userpace apps even though it was designed for systems level use? I am not saying apps shouldn't be written in Rust, I just don't understand the appeal. What am I missing?

I'm not very opinionated on Rust's comparison to other languages, but to me it does seem like rewriting things in rust (which now even has its own acronym RIIR) has become trendy.

Trendy enough that the very fact that rust tools happen to be written in that language is used as a main selling point.

Re: Bitwarden compatible server written in Rust

#26
post #8

Earlier quoted context omitted.

Bitwarden Mobile: https://github.com/bitwarden/mobile I will freely admit I am strongly biased against Xamarin as there are so few cases where I think it's unequivocally the right choice, and Bitwarden isn't one of them. It would make more sense to take the work done in their desktop electron app and use that as part of an Ionic hybrid mobile app than to screw around with the layercake of bugs and mismatched APIs tha…

Do you know of any open source mobile apps that are full vendor native for iOS and Android? I'd really like to peruse some examples of that.

I've been delving more into Podcast clients and on Graphene OS (Android) I really like AntennaPod: https://github.com/AntennaPod/AntennaPod

On iOS I pretty much stick with Castamatic and Overcast, both are full native iOS apps but neither are open source. I'm sure there's something listed at http://www.NewPodcastApps.com which is iOS and full Xcode native.

UPDATE: 21 Open source apps written in Swift (including one I use every day: Firefox for iOS): https://medium.mybridge.co/21-amazing-open-source-ios-apps-w...

Re: Bitwarden compatible server written in Rust

#27
post #20

Earlier quoted context omitted.

What would happen if your Pi was damaged/stolen, or the SD card crashed?

The way I understand it, the server component is "zero knowledge", meaning you decrypt on clients with your password and the server just serves an encrypted blob. Am I right?

Assuming you're correct, the parent question is still valid. I think you'd at least want to have some redundant backups to protect against loss (not compromise).

Re: Bitwarden compatible server written in Rust

#28
post #11
post #7

I’ve been really diving into Rust over this holiday break and reading through code bases like this is really helpful. Little things like a shared db connection are not intuitive on the first pass when everything is under such a strict borrow/move/release paradigm. I’m going to study this a little closer but it still isn’t super clear to me. In other languages I would probably implement a singleton of some sort. I kno…

I know this is off-topic but isn't Rust meant to be more of a systems-level language? It seems to me that Go would be a better choice for server-side API (assuming .NET 5 and 6 are too bloated and slow for your tastes). Or is Rust finding a niche in userpace apps even though it was designed for systems level use? I am not saying apps shouldn't be written in Rust, I just don't understand the appeal. What am I missing?

> Or is Rust finding a niche in userpace apps even though it was designed for systems level use? I am not saying apps shouldn't be written in Rust, I just don't understand the appeal. What am I missing?

A good type system is appealing regardless of the context.

The ecosystem can also be nice (or known) e.g. serde is amazing when dealing with all sorts of serialisation schemes. The tighter resource control can also be useful for application space, and it was most certainly one of the goals for vaultwarden as complexity aside the heft of the official server was a large part of the motivation (e.g. the ability to run it on a Pi or a small VPS)

An other longer-term option is that I can imagine e.g. coding something in rust then extracting its core or bits and bobs to libraries, and exposing that in C or Python or what have you. Nowhere near as attractive (or easy) with Go.

Re: Bitwarden compatible server written in Rust

#29
post #11
post #7

I’ve been really diving into Rust over this holiday break and reading through code bases like this is really helpful. Little things like a shared db connection are not intuitive on the first pass when everything is under such a strict borrow/move/release paradigm. I’m going to study this a little closer but it still isn’t super clear to me. In other languages I would probably implement a singleton of some sort. I kno…

I know this is off-topic but isn't Rust meant to be more of a systems-level language? It seems to me that Go would be a better choice for server-side API (assuming .NET 5 and 6 are too bloated and slow for your tastes). Or is Rust finding a niche in userpace apps even though it was designed for systems level use? I am not saying apps shouldn't be written in Rust, I just don't understand the appeal. What am I missing?

[deleted]

Re: Bitwarden compatible server written in Rust

#30
post #20

Earlier quoted context omitted.

The way I understand it, the server component is "zero knowledge", meaning you decrypt on clients with your password and the server just serves an encrypted blob. Am I right?

Assuming you're correct, the parent question is still valid. I think you'd at least want to have some redundant backups to protect against loss (not compromise).

Like anything, you just need to backup, I backup from the ui in vaultwarden intermittently onto a USB stick
Post reply on HN