You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Ignasi Barrera <no...@github.com> on 2016/06/17 11:15:34 UTC

[jclouds/jclouds] Properly set the permissions in the ~/.ssh folder (#971)

When writing the ~/.ssh/authorized_keys file in a script that is being run as sudo, the file is created with the root owner, instead of the user defined by the node credentials. File ownership should be enforced to make sure the right owner is always set.

This will require changes to jclouds-labs to align existing classes to the new interface.

@ritazh Could you test this with the azurecompute-arm provider?

I've just opened this now to get early feedback. I still have to run several live tests before merging.
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/971

-- Commit Summary --

  * Properly set the permissions in the ~/.ssh folder

-- File Changes --

    M compute/src/main/java/org/jclouds/compute/config/BaseComputeServiceContextModule.java (3)
    R compute/src/main/java/org/jclouds/compute/functions/InstallKeysAndRunScript.java (12)
    A compute/src/main/java/org/jclouds/compute/functions/NodeAndTemplateOptionsToStatement.java (40)
    R compute/src/main/java/org/jclouds/compute/functions/NodeAndTemplateOptionsToStatementWithoutPublicKey.java (17)
    M compute/src/main/java/org/jclouds/compute/strategy/CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java (14)
    R compute/src/test/java/org/jclouds/compute/functions/NodeAndTemplateOptionsToStatementWithoutPublicKeyTest.java (21)
    M compute/src/test/java/org/jclouds/compute/strategy/CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMapTest.java (11)
    M compute/src/test/resources/initscript_with_java.sh (1)
    M compute/src/test/resources/initscript_with_jetty.sh (1)
    M compute/src/test/resources/runscript_adminUpdate.sh (1)
    M providers/digitalocean2/src/main/java/org/jclouds/digitalocean2/compute/config/DigitalOcean2ComputeServiceContextModule.java (6)
    M scriptbuilder/src/main/java/org/jclouds/scriptbuilder/statements/login/UserAdd.java (2)
    M scriptbuilder/src/main/java/org/jclouds/scriptbuilder/statements/ssh/AuthorizeRSAPublicKeys.java (16)
    M scriptbuilder/src/test/java/org/jclouds/scriptbuilder/statements/login/UserAddTest.java (2)
    M scriptbuilder/src/test/java/org/jclouds/scriptbuilder/statements/ssh/AuthorizeRSAPublicKeyTest.java (28)
    M scriptbuilder/src/test/resources/test_adminaccess_flipped.sh (1)
    M scriptbuilder/src/test/resources/test_adminaccess_params.sh (1)
    M scriptbuilder/src/test/resources/test_adminaccess_params_and_fullname.sh (1)
    M scriptbuilder/src/test/resources/test_adminaccess_plainuser.sh (1)
    M scriptbuilder/src/test/resources/test_adminaccess_standard.sh (1)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/971.patch
https://github.com/jclouds/jclouds/pull/971.diff

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/971

Re: [jclouds/jclouds] Properly set the permissions in the ~/.ssh folder (#971)

Posted by Ignasi Barrera <no...@github.com>.
Closed #971.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/971#event-696440097

Re: [jclouds/jclouds] Properly set the permissions in the ~/.ssh folder (#971)

Posted by Ignasi Barrera <no...@github.com>.
Pushed to master as [179ed3b2](http://git-wip-us.apache.org/repos/asf/jclouds/commit/179ed3b2). Thanks @ritazh!

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/971#issuecomment-226877067

Re: [jclouds/jclouds] Properly set the permissions in the ~/.ssh folder (#971)

Posted by Ignasi Barrera <no...@github.com>.
I've validated the change with google-compute-engine and it does not break the live tests, so I assume it is good to go as soon as I get the confirmation for azurecompute-arm.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/971#issuecomment-226795128

Re: [jclouds/jclouds] Properly set the permissions in the ~/.ssh folder (#971)

Posted by Rita Zhang <no...@github.com>.
@nacx LGTM! Confirming this works as expected with azurecompute-arm provider. 

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/971#issuecomment-226832698