BitWarden Support

The problem was that i have a entry of type card in the bitwarden vault.
This entry didnt had a name attribut.

This way the royaljson generation failed.

This is why limiting the script to query only for a specified collection would be great (and speed things up in case of big vaults…)

Hi Cee Bee,

that’s weird. I haven’t been able to create an item (no matter the type) in Bitwarden without a name. Can you share how you managed to do that?

Regarding limiting the scope: You can easily adjust the script to do that.

Take a look at line 271:

cmd_list_items = [ bw_path, "list", "items", "--session", session_key ]

Here you can add additional parameters to instruct the list command to filter by certain criteria. For possible options, see the Bitwarden documentation: https://help.bitwarden.com/article/cli/#list

If you have something that can be shared with other users, please feel free to send a PR on Github!

Hope that helps!

cheers,

felix

Hi Felix,

How do you have to handle the session key? its now continues reloading and I think it has to do with the session key…

Regards,

Francis

Hi Francis,

login is repeated every time you reload the dynamic folder. This means that a new session key is requested every time your reload.

I’m not sure I understand the problem you’re having. Could you please elaborate?

thx,

felix

Hi Felix,

I think I should get a popup message asking me for the 2fa code? If so, I do not get that popup…

Regards,

Francis

Hi Francis,

that’s right, the script supports 2FA. The popup is not spawned by Royal TS/X though but by the TkInter, which is a dependency for the script as mentioned in the “Notes” section.

Do you have that dependency installed?

The best way to debug dynamic folder issues is to save the script to a standalone file and try running it from a terminal session. That way you should be able to find out what’s wrong. Don’t forget to replace the tokens ($) with actual values before trying to run it.

cheers,

felix

ok, I am on Mac so I need to figure out how to install Tkinter…

I also wil test in a standalone file, later today…

I think TK comes pre-installed on macOS but don’t quote me on that. Otherwise you can of course use pip to install it.

Testing outside of Royal TSX is definitely the best way to troubleshoot.

I used brew to install in but , still no success…

Hi Francis,

did you try running the script outside of Royal TSX? If so, what’s the output?

If you don’t want to post such info publicly, please open a new support ticket.

thx,

felix

Hello, since some time the script is not working. I tried to run it from console. I’ve got the latest bw.exe 1.13.3 and python 3.9

C:\Users\user1\RoyalTS>python bitwarden.py -v
? Master password: [hidden]
mac failed.
? Master password: [hidden]
Traceback (most recent call last):
  File "C:\Users\user1\RoyalTS\bitwarden.py", line 296, in <module>
    print(get_entries(bw_path, r"[email protected]", r"pass"))
  File "C:\Users\user1\RoyalTS\bitwarden.py", line 276, in get_entries

    list_items_response = json.loads(list_items_json)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Hello, I’ve got the following error:

C:\Users\user1\RoyalTS>python bitwarden.py -v
? Master password: [hidden]
mac failed.
? Master password: [hidden]
Traceback (most recent call last):
  File "C:\Users\user1\RoyalTS\bitwarden.py", line 296, in <module>
    print(get_entries(bw_path, r"[email protected]", r"pass"))
  File "C:\Users\user1\RoyalTS\bitwarden.py", line 276, in get_entries
    list_items_response = json.loads(list_items_json)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Sorry for the gravediggin, I’m just trying to see what the options are.

If this still is the state of the art, then I’m sorry but I’ll be direct. This is not good.

There are not so many “ubiquitous” credential managers, and bitwarden is one of them. It’s open source and easy to integrate.

RoyalTS is made to, or at least aims to, make life easier for large, multisite enterprise IT departments to use a single source of truth for server management. You can’t ask a 60 people IT department ranging from 1ist to 3rd level to go through setting all of this up, and still pay 3000+€/year.

You don’t need to support dozens of credential managers, you need to support the most ubiquitous ones. I can bet Bitwarden is the most used amongst RoyalTS users.

Please provide direct integration. It can’t be that hard to do.

Hi FAL!

The dynamic folder integration has several advantages compared to a direct implementation:

  • It can be used as a template and customized to your needs
  • It can be updated/released independent from the product
  • It can be read/analyzed to ensure nothing “bad” happens with the data as the code is available and everything is transparent

Especially point 1 is important because all these various products don’t have feature parity with our products and everyone has different needs. So the ability to customize the integration is an important one. We had (still have) direct implementations and the reality is that everyone has different requirements and needs.

That being said, can you tell us what is wrong or what doesn’t work with the dynamic folder integration? You can open a github issue, create a new question here or open a support ticket.