You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whirr.apache.org by "Tom White (JIRA)" <ji...@apache.org> on 2010/12/10 21:02:00 UTC

[jira] Created: (WHIRR-160) Improve SSH key diagnostics

Improve SSH key diagnostics
---------------------------

                 Key: WHIRR-160
                 URL: https://issues.apache.org/jira/browse/WHIRR-160
             Project: Whirr
          Issue Type: Improvement
          Components: core
            Reporter: Tom White
             Fix For: 0.3.0


This would reduce the number of support issues that trip up users.

We already check that the private and public keys both exist (but I don't think we have a unit test for that).

In addition, we should
* Check that the private key is passwordless (see how at http://incubator.apache.org/whirr/faq.html#Can_I_specify_my_own_private_key).
* Check that the private and public keys belong to the same pair (via, e.g. http://s.apache.org/MNY).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WHIRR-160) Improve SSH key diagnostics

Posted by "Tom White (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970975#action_12970975 ] 

Tom White commented on WHIRR-160:
---------------------------------

This looks good so far. A few comments:

* You can use KeyPair in the org.apache.whirr.ssh test package to generate keys for DestroyClusterCommandTest and LaunchClusterCommandTest.
* It would be good to have some tests for file existence, i.e. fail early if either key doesn't exist.
* I think we default the private key to ${sys:user.home}/.ssh/id_rsa and the public key to ${sys:user.home}/.ssh/id_rsa.pub (see core/src/main/resources/whirr-default.properties). I think the public key should actually default to the private key + ".pub". Can we make this change (with tests) here too?

BTW you could do the check that both keys belong to the same pair in another JIRA if it is more involved, since the rest is useful enough to go in by itself I think.

> Improve SSH key diagnostics
> ---------------------------
>
>                 Key: WHIRR-160
>                 URL: https://issues.apache.org/jira/browse/WHIRR-160
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tom White
>             Fix For: 0.3.0
>
>         Attachments: WHIRR-160.patch
>
>
> This would reduce the number of support issues that trip up users.
> We already check that the private and public keys both exist (but I don't think we have a unit test for that).
> In addition, we should
> * Check that the private key is passwordless (see how at http://incubator.apache.org/whirr/faq.html#Can_I_specify_my_own_private_key).
> * Check that the private and public keys belong to the same pair (via, e.g. http://s.apache.org/MNY).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WHIRR-160) Improve SSH key diagnostics

Posted by "Andrei Savu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970989#action_12970989 ] 

Andrei Savu commented on WHIRR-160:
-----------------------------------

Tom, I will make the change as you suggested and open another JIRA for checking that both keys belong to the same pair. Should I define multiple types of exceptions derived from {{ConfigurationException}} class, one for each error case? 

> Improve SSH key diagnostics
> ---------------------------
>
>                 Key: WHIRR-160
>                 URL: https://issues.apache.org/jira/browse/WHIRR-160
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tom White
>            Assignee: Andrei Savu
>             Fix For: 0.3.0
>
>         Attachments: WHIRR-160.patch
>
>
> This would reduce the number of support issues that trip up users.
> We already check that the private and public keys both exist (but I don't think we have a unit test for that).
> In addition, we should
> * Check that the private key is passwordless (see how at http://incubator.apache.org/whirr/faq.html#Can_I_specify_my_own_private_key).
> * Check that the private and public keys belong to the same pair (via, e.g. http://s.apache.org/MNY).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WHIRR-160) Improve SSH key diagnostics

Posted by "Andrei Savu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971579#action_12971579 ] 

Andrei Savu commented on WHIRR-160:
-----------------------------------

Great! Tom, thanks for reviewing.

> Improve SSH key diagnostics
> ---------------------------
>
>                 Key: WHIRR-160
>                 URL: https://issues.apache.org/jira/browse/WHIRR-160
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tom White
>            Assignee: Andrei Savu
>             Fix For: 0.3.0
>
>         Attachments: WHIRR-160.patch, WHIRR-160.patch, WHIRR-160.patch, WHIRR-160.patch
>
>
> This would reduce the number of support issues that trip up users.
> We already check that the private and public keys both exist (but I don't think we have a unit test for that).
> In addition, we should
> * Check that the private key is passwordless (see how at http://incubator.apache.org/whirr/faq.html#Can_I_specify_my_own_private_key).
> * Check that the private and public keys belong to the same pair (via, e.g. http://s.apache.org/MNY).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WHIRR-160) Improve SSH key diagnostics

Posted by "Andrei Savu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrei Savu updated WHIRR-160:
------------------------------

    Attachment: WHIRR-160.patch

This patch should be complete but unfortunately it does not compile due to a maven related issue. It seems like the {{org.apache.whirr.ssh.KeyPair}} class from whirr-core is not available in whirr-cli. Need some help from you on this. 

> Improve SSH key diagnostics
> ---------------------------
>
>                 Key: WHIRR-160
>                 URL: https://issues.apache.org/jira/browse/WHIRR-160
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tom White
>            Assignee: Andrei Savu
>             Fix For: 0.3.0
>
>         Attachments: WHIRR-160.patch, WHIRR-160.patch, WHIRR-160.patch
>
>
> This would reduce the number of support issues that trip up users.
> We already check that the private and public keys both exist (but I don't think we have a unit test for that).
> In addition, we should
> * Check that the private key is passwordless (see how at http://incubator.apache.org/whirr/faq.html#Can_I_specify_my_own_private_key).
> * Check that the private and public keys belong to the same pair (via, e.g. http://s.apache.org/MNY).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WHIRR-160) Improve SSH key diagnostics

Posted by "Andrei Savu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrei Savu updated WHIRR-160:
------------------------------

    Attachment: WHIRR-160.patch

I have moved the file {{KeyPair.java}} from {{core/test/java/org/apache/whirr/ssh/}} to {{core/main/...}}. All the tests are now green. I will open another JIRA for checking that both keys are part of the same pair. 

> Improve SSH key diagnostics
> ---------------------------
>
>                 Key: WHIRR-160
>                 URL: https://issues.apache.org/jira/browse/WHIRR-160
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tom White
>            Assignee: Andrei Savu
>             Fix For: 0.3.0
>
>         Attachments: WHIRR-160.patch, WHIRR-160.patch, WHIRR-160.patch, WHIRR-160.patch
>
>
> This would reduce the number of support issues that trip up users.
> We already check that the private and public keys both exist (but I don't think we have a unit test for that).
> In addition, we should
> * Check that the private key is passwordless (see how at http://incubator.apache.org/whirr/faq.html#Can_I_specify_my_own_private_key).
> * Check that the private and public keys belong to the same pair (via, e.g. http://s.apache.org/MNY).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WHIRR-160) Improve SSH key diagnostics

Posted by "Tom White (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970991#action_12970991 ] 

Tom White commented on WHIRR-160:
---------------------------------

> Should I define multiple types of exceptions derived from ConfigurationException class, one for each error case?

I wouldn't bother since I'm not sure whether clients can handle different cases differently. We can add that specialization later if it's needed.

> Improve SSH key diagnostics
> ---------------------------
>
>                 Key: WHIRR-160
>                 URL: https://issues.apache.org/jira/browse/WHIRR-160
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tom White
>            Assignee: Andrei Savu
>             Fix For: 0.3.0
>
>         Attachments: WHIRR-160.patch
>
>
> This would reduce the number of support issues that trip up users.
> We already check that the private and public keys both exist (but I don't think we have a unit test for that).
> In addition, we should
> * Check that the private key is passwordless (see how at http://incubator.apache.org/whirr/faq.html#Can_I_specify_my_own_private_key).
> * Check that the private and public keys belong to the same pair (via, e.g. http://s.apache.org/MNY).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WHIRR-160) Improve SSH key diagnostics

Posted by "Andrei Savu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrei Savu updated WHIRR-160:
------------------------------

    Attachment: WHIRR-160.patch

> Improve SSH key diagnostics
> ---------------------------
>
>                 Key: WHIRR-160
>                 URL: https://issues.apache.org/jira/browse/WHIRR-160
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tom White
>             Fix For: 0.3.0
>
>         Attachments: WHIRR-160.patch
>
>
> This would reduce the number of support issues that trip up users.
> We already check that the private and public keys both exist (but I don't think we have a unit test for that).
> In addition, we should
> * Check that the private key is passwordless (see how at http://incubator.apache.org/whirr/faq.html#Can_I_specify_my_own_private_key).
> * Check that the private and public keys belong to the same pair (via, e.g. http://s.apache.org/MNY).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WHIRR-160) Improve SSH key diagnostics

Posted by "Andrei Savu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrei Savu updated WHIRR-160:
------------------------------

    Attachment: WHIRR-160.patch

> Improve SSH key diagnostics
> ---------------------------
>
>                 Key: WHIRR-160
>                 URL: https://issues.apache.org/jira/browse/WHIRR-160
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tom White
>            Assignee: Andrei Savu
>             Fix For: 0.3.0
>
>         Attachments: WHIRR-160.patch, WHIRR-160.patch
>
>
> This would reduce the number of support issues that trip up users.
> We already check that the private and public keys both exist (but I don't think we have a unit test for that).
> In addition, we should
> * Check that the private key is passwordless (see how at http://incubator.apache.org/whirr/faq.html#Can_I_specify_my_own_private_key).
> * Check that the private and public keys belong to the same pair (via, e.g. http://s.apache.org/MNY).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WHIRR-160) Improve SSH key diagnostics

Posted by "Tom White (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom White updated WHIRR-160:
----------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

I've just committed this. Thanks Andrei!

> Improve SSH key diagnostics
> ---------------------------
>
>                 Key: WHIRR-160
>                 URL: https://issues.apache.org/jira/browse/WHIRR-160
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tom White
>            Assignee: Andrei Savu
>             Fix For: 0.3.0
>
>         Attachments: WHIRR-160.patch, WHIRR-160.patch, WHIRR-160.patch, WHIRR-160.patch
>
>
> This would reduce the number of support issues that trip up users.
> We already check that the private and public keys both exist (but I don't think we have a unit test for that).
> In addition, we should
> * Check that the private key is passwordless (see how at http://incubator.apache.org/whirr/faq.html#Can_I_specify_my_own_private_key).
> * Check that the private and public keys belong to the same pair (via, e.g. http://s.apache.org/MNY).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WHIRR-160) Improve SSH key diagnostics

Posted by "Andrei Savu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrei Savu updated WHIRR-160:
------------------------------

    Status: Patch Available  (was: Open)

> Improve SSH key diagnostics
> ---------------------------
>
>                 Key: WHIRR-160
>                 URL: https://issues.apache.org/jira/browse/WHIRR-160
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tom White
>            Assignee: Andrei Savu
>             Fix For: 0.3.0
>
>         Attachments: WHIRR-160.patch, WHIRR-160.patch, WHIRR-160.patch, WHIRR-160.patch
>
>
> This would reduce the number of support issues that trip up users.
> We already check that the private and public keys both exist (but I don't think we have a unit test for that).
> In addition, we should
> * Check that the private key is passwordless (see how at http://incubator.apache.org/whirr/faq.html#Can_I_specify_my_own_private_key).
> * Check that the private and public keys belong to the same pair (via, e.g. http://s.apache.org/MNY).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WHIRR-160) Improve SSH key diagnostics

Posted by "Andrei Savu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970654#action_12970654 ] 

Andrei Savu commented on WHIRR-160:
-----------------------------------

I've attached a patch that checks the private key for validity using {{JSch}}. I'm still working on checking that both keys belong to the same pair. 

> Improve SSH key diagnostics
> ---------------------------
>
>                 Key: WHIRR-160
>                 URL: https://issues.apache.org/jira/browse/WHIRR-160
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tom White
>             Fix For: 0.3.0
>
>         Attachments: WHIRR-160.patch
>
>
> This would reduce the number of support issues that trip up users.
> We already check that the private and public keys both exist (but I don't think we have a unit test for that).
> In addition, we should
> * Check that the private key is passwordless (see how at http://incubator.apache.org/whirr/faq.html#Can_I_specify_my_own_private_key).
> * Check that the private and public keys belong to the same pair (via, e.g. http://s.apache.org/MNY).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WHIRR-160) Improve SSH key diagnostics

Posted by "Tom White (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom White reassigned WHIRR-160:
-------------------------------

    Assignee: Andrei Savu

> Improve SSH key diagnostics
> ---------------------------
>
>                 Key: WHIRR-160
>                 URL: https://issues.apache.org/jira/browse/WHIRR-160
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tom White
>            Assignee: Andrei Savu
>             Fix For: 0.3.0
>
>         Attachments: WHIRR-160.patch
>
>
> This would reduce the number of support issues that trip up users.
> We already check that the private and public keys both exist (but I don't think we have a unit test for that).
> In addition, we should
> * Check that the private key is passwordless (see how at http://incubator.apache.org/whirr/faq.html#Can_I_specify_my_own_private_key).
> * Check that the private and public keys belong to the same pair (via, e.g. http://s.apache.org/MNY).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.