Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-8360

Manage Keys Dialog: new key is not added to the ssh-prefs if a key-file with the same name already exists

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Out of Date
    • Affects Version/s: 3.2.0.Final
    • Fix Version/s: 3.3.x
    • Component/s: deltacloud
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      make sure you have a key-file in your ~/.ssh/ directory with the name of the key (ex. key.pem) we will create in the next step:

      1) Choose "Manage Keys" in the context menu of your cloud
      2) Create a new key (ex. key)
      3) make sure "Save key in folder" is checked and path is set to ~/.ssh/
      4) delete key
      5) hit cancel when the wizard asks you if the key shall be delete from the local key store
      6) (eventually: check that the key (ex. key.pem) still exists in ~/.ssh)
      7) (eventually: check that the key is not listed in the ssh-preferences - Preferences->General->Network Connections->SSH)

      Now create a new key with the same name:
      1) Choose "Manage Keys" in the context menu of your cloud
      2) Hit "New" and create a new key with the same name (ex. key)
      3) You get informed that there was a problem while the key was created (see screenshot).

      Result:
      The key was not added to the ssh-prefs (Preferences->General->Network Connections->SSH)

      Show
      make sure you have a key-file in your ~/.ssh/ directory with the name of the key (ex. key.pem) we will create in the next step: 1) Choose "Manage Keys" in the context menu of your cloud 2) Create a new key (ex. key) 3) make sure "Save key in folder" is checked and path is set to ~/.ssh/ 4) delete key 5) hit cancel when the wizard asks you if the key shall be delete from the local key store 6) (eventually: check that the key (ex. key.pem) still exists in ~/.ssh) 7) (eventually: check that the key is not listed in the ssh-preferences - Preferences->General->Network Connections->SSH) Now create a new key with the same name: 1) Choose "Manage Keys" in the context menu of your cloud 2) Hit "New" and create a new key with the same name (ex. key) 3) You get informed that there was a problem while the key was created (see screenshot). Result: The key was not added to the ssh-prefs (Preferences->General->Network Connections->SSH)

      Description

      The current behavior is correct IMHO. There's no sense to add a key to the ssh-prefs if the key file is not present on disk.
      What's not brilliant here is that the user might think that the key was not created since he gets an error.
      What we could think of is to:

      • warn instead of displaying an error
      • OR offer a filename-dialog (allows to provide a valid filename).

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            adietish Andre Dietisheim added a comment -

            please comment:

            • which fix (rename-dialog or warning)?
            • I guess this should be in trunk only?
            Show
            adietish Andre Dietisheim added a comment - please comment: which fix (rename-dialog or warning)? I guess this should be in trunk only?
            Hide
            rob.stryker Rob Stryker added a comment -

            As far as I was concerned, last I checked, the entire key mechanism needed to be redesigned from scratch. Both from a UI and a code perspective.

            I don't think it'd take much time really, and I think the code would benefit from it. Things to consider are:
            1) A person may keep keys in several different folders.
            2) Keys should not get lost
            3) If a key matches in name with one on the server, it should be assumed to be accurate

            Not sure what else, really, but right now the UI and the api only really leave room for one folder, but the presence of the text box allows a user to get confused and think each key can have its own folder without error.

            Show
            rob.stryker Rob Stryker added a comment - As far as I was concerned, last I checked, the entire key mechanism needed to be redesigned from scratch. Both from a UI and a code perspective. I don't think it'd take much time really, and I think the code would benefit from it. Things to consider are: 1) A person may keep keys in several different folders. 2) Keys should not get lost 3) If a key matches in name with one on the server, it should be assumed to be accurate Not sure what else, really, but right now the UI and the api only really leave room for one folder, but the presence of the text box allows a user to get confused and think each key can have its own folder without error.
            Hide
            adietish Andre Dietisheim added a comment -

            we're not developing Deltacloud any longer. See JBIDE-12458

            Show
            adietish Andre Dietisheim added a comment - we're not developing Deltacloud any longer. See JBIDE-12458

              People

              • Assignee:
                adietish Andre Dietisheim
                Reporter:
                adietish Andre Dietisheim
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development