Code Monkey home page Code Monkey logo

Comments (14)

raffomania avatar raffomania commented on August 13, 2024 3

I can confirm that this happens on 1.10.0 after the following steps:

  • rbw purge
  • rbw stop-agent
  • Change PBKDF2 rounds, rotate API Key
  • rbw register successfully
  • rbw login on api.bitwarden.com fails

The error is

rbw login: failed to log in to bitwarden instance: Username or password is incorrect. Try again.

from rbw.

glaeqen avatar glaeqen commented on August 13, 2024 3

Requests to https://identity.bitwarden.com/connect/token apparently started failing recently. I compared the network calls between the official Bitwarden Firefox Extension and rbw. I narrowed it down to two extra headers that makes the server happy. This is a diff that seems to fix the issue although it makes rbw pretend something that it is not I guess. I'd be good if @doy or someone more clever than me took a look.

diff --git a/src/api.rs b/src/api.rs
index 9a58f9e..39aa5c0 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -895,6 +895,8 @@ impl Client {
         let res = client
             .post(&self.identity_url("/connect/token"))
             .form(&connect_req)
+            .header("Bitwarden-Client-Name", "browser")
+            .header("Bitwarden-Client-Version", "2024.4.1")
             .header(
                 "auth-email",
                 crate::base64::encode_url_safe_no_pad(email),

from rbw.

srhb avatar srhb commented on August 13, 2024 2

@sedlund gitlab exposes auto patches on PRs if you append .patch :)

  (self: super: {
    rbw = super.rbw.overrideAttrs (oa: {
      patches = oa.patches or [] ++ [
        (self.fetchpatch {
          url = "https://github.com/doy/rbw/pull/175.patch";
          hash = "sha256-WjyvDrghbMYHF8MIPVj7I6WWJJXPEDXfBlZpw2lJaCs=";
        })
      ];
    });
  })

from rbw.

itsjfx avatar itsjfx commented on August 13, 2024 1

I'm unable to login on 1.9.0, 1.10.0, and 1.10.1 on both Debian and Arch, even after using rbw register which exits OK

Is there any trace logging we can turn on to help provide more information?

from rbw.

sedlund avatar sedlund commented on August 13, 2024 1

Here is a Nix override that builds @glaeqen 's PR -- Works great -- Thanks!

rbw = pkgs.rbw.override (super: {
  rustPlatform =
    super.rustPlatform
    // {
      buildRustPackage = args:
        super.rustPlatform.buildRustPackage (args
          // {
            version = "1.10.1+fixlogin";
            src = pkgs.fetchFromGitHub {
              owner = "glaeqen";
              repo = "rbw";
              rev = "fix-login";
              hash = "sha256-T6kn33R8FipJtfI599oc8VbQFhdI4NYef8fO6Ixaqos=";
            };
            cargoHash = "sha256-R0MT3AZLhHMPS7JPkYsI7p+Hhty6aVi2cTPeg6pqEm8=";
          });
    };
});

from rbw.

itsjfx avatar itsjfx commented on August 13, 2024 1

thanks, this has unblocked my workflow
ive built a version here: https://github.com/itsjfx/rbw/releases/download/1.10.2-rc.1/rbw_1.10.2-rc.1_linux_amd64.tar.gz
you can build it yourself here: https://github.com/itsjfx/rbw/blob/main/build.sh

installed in a dev container looks like this

wget https://github.com/itsjfx/rbw/releases/download/1.10.2-rc.1/rbw_1.10.2-rc.1_linux_amd64.tar.gz
mkdir rbw
tar -xvf rbw_1.10.2-rc.1_linux_amd64.tar.gz -C rbw/
install -vDm755 -t /usr/bin rbw/rbw{,-agent}
install -vDm644 rbw/completions/bash-completions /usr/share/bash-completion/completions/rbw
install -vDm644 rbw/completions/fish-completions /usr/share/fish/vendor_completions.d/rbw.fish
install -vDm644 rbw/completions/zsh-completions /usr/share/zsh/site-functions/_rbw

from rbw.

Nietzschemon avatar Nietzschemon commented on August 13, 2024

Had the same problem with 1.10.0 on Manjaro after a systems upgrade. Worked downgrading to 1.9.0 with no additional steps.

from rbw.

oranenj avatar oranenj commented on August 13, 2024

Echoing the problem, login seem to be broken.

I tried downgrading to 1.9.0, but it doesn't work either.

from rbw.

BartSte avatar BartSte commented on August 13, 2024

Echoing the problem, login seem to be broken.

I tried downgrading to 1.9.0, but it doesn't work either.

I had the same problem but after a reboot 1.9.0 was working.

from rbw.

oranenj avatar oranenj commented on August 13, 2024

I had the same problem but after a reboot 1.9.0 was working.

That's weird. Maybe you were running an old version of the agent?

I made sure to kill the agent, but it's not working. Maybe the problem is that I switched to Argon KDF; I'll try switching back

from rbw.

BartSte avatar BartSte commented on August 13, 2024

I had the same problem but after a reboot 1.9.0 was working.

That's weird. Maybe you were running an old version of the agent?

I made sure to kill the agent, but it's not working. Maybe the problem is that I switched to Argon KDF; I'll try switching back

Oke nevermind, now 1.9.0 also stopped working... No idea why...

from rbw.

oranenj avatar oranenj commented on August 13, 2024

Can confirm, that fix works.

from rbw.

sedlund avatar sedlund commented on August 13, 2024

"cli" is a valid "Bitwarden-Client-Name" per the official cli

from rbw.

MariusHerget avatar MariusHerget commented on August 13, 2024

Can confirm the fix works with "cli" as client name. @glaeqen can you create a PR for @doy ?

from rbw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.