Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2FA Failing when Opening Web Vault #420

Closed
kmwoley opened this issue Feb 28, 2019 · 8 comments
Closed

2FA Failing when Opening Web Vault #420

kmwoley opened this issue Feb 28, 2019 · 8 comments

Comments

@kmwoley
Copy link

kmwoley commented Feb 28, 2019

Setup:
Running the latest docker image (version 2.8.0 reported by the web ui)
I have my account successfully setup using 2FA with a Yubikey NFC 5.

Previously:
I've successfully logged in using 2FA on both mobile (iPhone) and via the webvault. I believe the error has started after I've updated to the most recent docker image.

Error:
Now, when I attempt to log in I get "An error has occurred. An unexpected error has occurred." error in the UI, and the error logs show the errors below).

[2019-02-28 08:04:57][rocket::rocket][INFO] POST /api/accounts/prelogin application/json; charset=utf-8:
[2019-02-28 08:04:57][_][INFO] Matched: POST /api/accounts/prelogin (prelogin)
[2019-02-28 08:04:57][_][INFO] Outcome: Success
[2019-02-28 08:04:57][_][INFO] Response succeeded.
[2019-02-28 08:04:57][rocket::rocket][INFO] POST /identity/connect/token application/x-www-form-urlencoded; charset=utf-8:
[2019-02-28 08:04:57][_][INFO] Matched: POST /identity/connect/token (login)
[2019-02-28 08:04:57][bitwarden_rs::error][ERROR] JsonError. {"TwoFactorProviders":[3],"TwoFactorProviders2":{"3":{"Nfc":true}},"error":"invalid_grant","error_description":"Two factor required."}
[2019-02-28 08:04:57][_][INFO] Outcome: Success
[2019-02-28 08:04:57][_][INFO] Response succeeded.
[2019-02-28 08:05:06][rocket::rocket][INFO] POST /identity/connect/token application/x-www-form-urlencoded; charset=utf-8:
[2019-02-28 08:05:06][_][INFO] Matched: POST /identity/connect/token (login)
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', src/libcore/result.rs:997:5
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', src/libcore/result.rs:997:5
thread 'main' panicked at 'internal error: entered unreachable code: the call to `handle_threads` should block on success', /usr/local/cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/rocket-0.4.0/src/rocket.rs:725:13

@kmwoley
Copy link
Author

kmwoley commented Feb 28, 2019

Something deeper is going on; I attempted to restart the docker container and it will no-longer start with the following (similar) error:

[2019-02-28 08:05:06][rocket::rocket][INFO] POST /identity/connect/token application/x-www-form-urlencoded; charset=utf-8:
[2019-02-28 08:05:06][_][INFO] Matched: POST /identity/connect/token (login)
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', src/libcore/result.rs:997:5
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', src/libcore/result.rs:997:5
thread 'main' panicked at 'internal error: entered unreachable code: the call to `handle_threads` should block on success', /usr/local/cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/rocket-0.4.0/src/rocket.rs:725:13

@dani-garcia
Copy link
Owner

This error seems to be coming from the Rocket web server, when attempting to start. It shouldn't be because any change we made, I don't think.

Did you make any changes to the docker container networking? Maybe you are trying to bind the port to one that's already bound to another container or something like that? Or maybe you have multiple instances of bitwarden_rs running?

@mprasil
Copy link
Contributor

mprasil commented Mar 1, 2019

Do you use --net host or something similar in your docker run by any chance @kmwoley? Normally the application runs in its own network namespace, so already used port is kinda strange.

@kmwoley
Copy link
Author

kmwoley commented Mar 1, 2019 via email

@mprasil mprasil closed this as completed Mar 1, 2019
@kmwoley
Copy link
Author

kmwoley commented Mar 3, 2019

Confirmed. This had nothing to do with bitwarden_rs. Sorry for the noise.

@bronco21016
Copy link

Sorry to bring this back. How did you solve it? I’m getting the exact same error messages when trying to setup a Yubikey on Bitwarden_RS pulled from Archlinux AUR.

@kmwoley
Copy link
Author

kmwoley commented Jun 25, 2019

@bronco21016 IIRC, my host OS had made a bad upgrade to Docker that screwed up MACVLAN. Networking was the source of my issue. I rolled back my OS version and solved it, reported it to the OS maintainers, and it got fixed.

@bronco21016
Copy link

@kmwoley It seems I’m having a network issue as well but can’t quite trace it down. Shouldn’t be related to Docker though as I’m not using Docker. Seems more related to my Apache reverse proxy. Oh well. I’ll post something separate to see if I can get some help. Thanks again!

dannybouwers pushed a commit to dannybouwers/homecontroller that referenced this issue Feb 22, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| alpine | patch | `3.19.0` -> `3.19.1` |
| [fireflyiii/core](https://github.com/firefly-iii/docker) ([source](https://dev.azure.com/Firefly-III/_git/MainImage)) | patch | `version-6.1.6` -> `version-6.1.7` |
| [fireflyiii/data-importer](https://github.com/firefly-iii/docker) ([source](https://dev.azure.com/Firefly-III/_git/ImportToolImage)) | patch | `version-1.4.0` -> `version-1.4.2` |
| [linuxserver/unifi-network-application](https://github.com/linuxserver/docker-unifi-network-application/packages) ([source](https://github.com/linuxserver/docker-unifi-network-application)) | patch | `8.0.26` -> `8.0.28` |
| [vaultwarden/server](https://github.com/dani-garcia/vaultwarden) | patch | `1.30.1` -> `1.30.2` |

---

### Release Notes

<details>
<summary>dani-garcia/vaultwarden (vaultwarden/server)</summary>

### [`v1.30.2`](https://github.com/dani-garcia/vaultwarden/releases/tag/1.30.2)

[Compare Source](dani-garcia/vaultwarden@1.30.1...1.30.2)

⚠️ **Note:** The WebSockets service for live sync has been integrated in the main HTTP server, which means simpler proxy setups that don't require a separate rule to redirect WS traffic to port 3012. Please check the updated examples in the [wiki](https://github.com/dani-garcia/vaultwarden/wiki/Proxy-examples). It's recommended to migrate to this new setup as using the old server on port 3012 is deprecated, won't receive new features and will be removed in the next release.

#### What's Changed

-   Prevent generating an error during ws close by [@&#8203;BlackDex](https://github.com/BlackDex) in dani-garcia/vaultwarden#4127
-   Update Rust, Crates, Profile and Actions by [@&#8203;BlackDex](https://github.com/BlackDex) in dani-garcia/vaultwarden#4126
-   Several small fixes for open issues by [@&#8203;BlackDex](https://github.com/BlackDex) in dani-garcia/vaultwarden#4143
-   Fix the version string by [@&#8203;BlackDex](https://github.com/BlackDex) in dani-garcia/vaultwarden#4153
-   Decrease JWT Refresh/Auth token by [@&#8203;BlackDex](https://github.com/BlackDex) in dani-garcia/vaultwarden#4163
-   Update crates by [@&#8203;BlackDex](https://github.com/BlackDex) in dani-garcia/vaultwarden#4173
-   Add additional build target which optimizes for size by [@&#8203;gladiac](https://github.com/gladiac) in dani-garcia/vaultwarden#4096
-   Update web-vault to v2023.12.0 by [@&#8203;BlackDex](https://github.com/BlackDex) in dani-garcia/vaultwarden#4201
-   Update Rust and Crates by [@&#8203;BlackDex](https://github.com/BlackDex) in dani-garcia/vaultwarden#4211
-   Fix Single Org Policy check by [@&#8203;BlackDex](https://github.com/BlackDex) in dani-garcia/vaultwarden#420...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants