Whirr
  1. Whirr
  2. WHIRR-70

decouple keypairs from the files that hold them

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.1.0
    • Component/s: None
    • Labels:
      None

      Description

      Currently, we have a method in ClusterSpec called setSecretKeyFile. The intention of this is to pass in the rsa identity used for ssh authentication on the cloud nodes. While this is generally on-disk, users may want to pass this in from another source, for example an encrypted databag.

      I suggest we remove the methods in ClusterSpec that are File based, and push the responsibility for reading files to the user. Instead, I suggest we offer methods that accept PEM strings for the public and private keys. That way, the user can get their keys from files, remote servers, keystores, or anywhere, and we don't have an opinion precluding any of that. Moreover, we rid ourselves the need to write files.

      ex.

      instead of

      clusterSpec.setSecretKeyFile(System.getProperty("user.home") + "/.ssh/id_rsa");

      The user would do

      clusterSpec.setPrivateKeyPem(Files.toString(new File(System.getProperty("user.home") + "/.ssh/id_rsa"), Charsets.UTF_8));

      Or, we could have a utility method which would call Files.toString:

      clusterSpec.setPrivateKeyPemFile(new File(System.getProperty("user.home") + "/.ssh/id_rsa"));

      Bottom line is that we shouldn't require these pems to be on-disk, as they are not always on-disk.

      1. WHIRR-70.patch
        15 kB
        Adrian Cole
      2. WHIRR-70.patch
        43 kB
        Adrian Cole

        Activity

        Adrian Cole (Inactive) created issue -
        Adrian Cole made changes -
        Field Original Value New Value
        Attachment WHIRR-70.patch [ 12452103 ]
        Adrian Cole (Inactive) made changes -
        Attachment WHIRR-70.patch [ 12453609 ]
        Tom White made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Adrian Cole [ adrian@jclouds.org ]
        Fix Version/s 0.1.0 [ 12315111 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Adrian Cole (Inactive)
            Reporter:
            Adrian Cole (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development