clients icon indicating copy to clipboard operation
clients copied to clipboard

Adding a linked field to an SSH key breaks the entry and makes it impossible to load or edit, including the desktop

Open detunized opened this issue 7 months ago • 13 comments

Steps To Reproduce

  1. Go to the web vault
  2. Click on an existing SSH entry or add a new one
  3. Scroll down to fields
  4. Click on add Add field and select Linked
  5. Type in the label name and proceed to the next screen to choose a linked field
  6. The dropdown is empty
  7. Click Save
  8. Observe that save never finishes, though it's possible to dismiss the dialog by pressing the cross
  9. After that this entry cannot be loaded on the web.
  10. On the desktop it's impossible to edit this entry (the buttons are missing, see image 3)

Expected Result

Should be able to save and load the modified entry. If linked field is not allowed it should not be available as an option. Should be able to edit the entry.

Actual Result

The entry cannot be saved, loaded or edited. On the further investigation it seems to break the whole desktop app when this entry is selected. None of the UI elements on the My vault tab work.

Screenshots or Videos

Image Image Image Image

Additional Context

No response

Operating System

macOS

Operating System Version

No response

Web Browser

Chrome

Browser Version

No response

Environment Versions

Version: 2025.5.0

SDK: 'main (f28b4ef)'

Server version: 2025.5.1

Issue Tracking Info

  • [x] I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

detunized avatar May 27 '25 11:05 detunized

Thank you for reporting this issue! We've added this to our internal tracking system. ID: PM-22112

bitwarden-bot avatar May 27 '25 11:05 bitwarden-bot

Hi there,

This issue has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

daniellbw avatar May 28 '25 06:05 daniellbw

@daniellbw if it helps, I also added a video of this in action. It's actually quite easy to reproduce in the web vault (but it breaks the desktop as well)

https://github.com/user-attachments/assets/38fed166-c9ee-44d4-8737-fd996e90cf3f

detunized avatar May 28 '25 06:05 detunized

just to add another related issue - I am not only able to reproduce the above, but whenever I try to add a new ssh key, the private/public/fingerprint fields are prefilled with no option to clear - so I am effectively not able to create ANY new ssh keys.

I tried mac/web - all with the same result

Image

goblinwtf avatar Jun 02 '25 07:06 goblinwtf

@detunized I am able to reproduce. Do you have a use case for adding a Linked field to an SSH Key? It does seem like we should remove the linked field as an option for SSH Keys.

ariane-bitwarden avatar Jun 06 '25 22:06 ariane-bitwarden

@ariane-bitwarden I don't have use case for that. IMO it should either be deleted or should map to one of the ssh key fields, like it does with logins.

detunized avatar Jun 07 '25 06:06 detunized

just to reiterate - for me currently there is NO way to add SSH-keys whatsoever. Whenever I click on add new ssh key, I get the modal with prefilled values that I cannot delete. The same both for web and desktop.

I didn't do anything in particular, have like a dozen SSH keys already and out of nowhere this issue came up and then I checked the net for this thread which was back then 3 days old

This is not even related to the linked field issue

Image

goblinwtf avatar Jun 07 '25 07:06 goblinwtf

@goblinwtf I think it's a separate issue, it has nothing to do with linked fields. On desktop you can import from clipboard I believe.

detunized avatar Jun 07 '25 07:06 detunized

hey @detunized, as you yourself posted earlier https://github.com/bitwarden/clients/issues/14960#issuecomment-2915169122, it seems that when you try to create a new ssh key the fields are prepopulated - and they can't be edited - so you are also effectively not able to properly create new SSH keys

I was able to reproduce the next issue (related to the linked field) but I think the original issue is not being able to properly create SSH keys in the first place. They still can get created but only with the prefilled data which has nothing to do with the data I want to insert

goblinwtf avatar Jun 08 '25 08:06 goblinwtf

hey @detunized, as you yourself posted earlier #14960 (comment), it seems that when you try to create a new ssh key the fields are prepopulated - and they can't be edited - so you are also effectively not able to properly create new SSH keys

This has nothing to do with the reported issue.

In fact, I think you misunderstand how Bitwarden handles SSH keys. When you add a new login and change the type to "SSH key", Bitwarden generates a new keypair (and says so in the popup in the upper right). If you repeat that step, it creates another one, etc. What you describe as "prepoluated" is simply the result of a key pair generation.

If you already have a key from another source, you can copy the private key to the clipboard and then import it via the rightmost button next to the generated private key: Image

Bitwarden will then update the public key and hash to match the imported private key.

l-c-g avatar Jun 12 '25 12:06 l-c-g

I don't have this button on the web version :/

goblinwtf avatar Jun 12 '25 12:06 goblinwtf

Then I guess the web vault does not have importing implemented, only key generation. IMHO, to really make use of SSH keys in Bitwarden, you need the desktop client anyway for the SSH agent. And the desktop client has the import functionality so I suggest you use that if you need to import keys from other sources.

(Technically, you could use the command line bw client and import JSON snippets with your pre-existing keys, which is what I did when the feature was released and the import button wasn't in my desktop client at the time. But that was a royal pain in the neck. Unless you know your way around JSON and the bw command line client really well, I would not recommend that today, with a working import function in the desktop client.)

l-c-g avatar Jun 12 '25 12:06 l-c-g

well, currently I am not using the bw cli + entering a new SSH key via the web interface used to work, I uploaded a dozen or so - then out of nowhere it stopped. So this is clearly a bug. Obviously I could use a plain note with hidden custom fields, but I just flagged this bug, nothing more, nothing less.

I don't want any workarounds, I have nothing so urgent, I wrote to tech support and now I am just waiting. But thanks for trying to help anyway 🙏

goblinwtf avatar Jun 15 '25 13:06 goblinwtf

Hello, thanks for reporting this. Issue is resolved by this PR

gbubemismith avatar Jul 29 '25 14:07 gbubemismith