You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Francesco Chicchiriccò <no...@github.com> on 2015/03/13 12:01:14 UTC

[jclouds-labs] [JCLOUDS-838] Introducing InMemoryKeyManager for PEM-encoded certificate... (#153)

... and private key
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-labs/pull/153

-- Commit Summary --

  * [JCLOUDS-838] Introducing InMemoryKeyManager for PEM-encoded certificate and private key

-- File Changes --

    M azurecompute/pom.xml (11)
    M azurecompute/src/main/java/org/jclouds/azurecompute/config/AzureComputeHttpApiModule.java (5)
    D azurecompute/src/main/java/org/jclouds/azurecompute/suppliers/KeyStoreSupplier.java (135)
    M azurecompute/src/main/java/org/jclouds/azurecompute/suppliers/SSLContextWithKeysSupplier.java (160)

-- Patch Links --

https://github.com/jclouds/jclouds-labs/pull/153.patch
https://github.com/jclouds/jclouds-labs/pull/153.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/153

Re: [jclouds-labs] [JCLOUDS-838] Introducing InMemoryKeyManager for PEM-encoded certificate... (#153)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/153#event-274544786

Re: [jclouds-labs] [JCLOUDS-838] Introducing InMemoryKeyManager for PEM-encoded certificate... (#153)

Posted by Francesco Chicchiriccò <no...@github.com>.
> @@ -56,6 +56,11 @@
>        <version>${project.parent.version}</version>
>      </dependency>
>      <dependency>
> +      <groupId>org.apache.jclouds.driver</groupId>
> +      <artifactId>jclouds-sshj</artifactId>
> +      <version>${project.parent.version}</version>

Without `jclouds-sshj` I don't have classes like as `org.bouncycastle.openssl.PEMKeyPair`, `org.bouncycastle.openssl.PEMParser` and `org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter` even if I include `jclouds-bouncycastle`.

Does this mean that I need to stop using such classes and revert to manual parsing?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/153/files#r27577017

Re: [jclouds-labs] [JCLOUDS-838] Introducing InMemoryKeyManager for PEM-encoded certificate... (#153)

Posted by Ignasi Barrera <no...@github.com>.
The credentials supplier does many things. I'd refactor it in a "delegating credential supplier" and extract the two branches of the conditional into a "FileBasedSupplier" and an "InMemorySupplier". Inject both suppliers into the delegating one and pick the right one based on the type of the provided credentials.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/153#issuecomment-88231328

Re: [jclouds-labs] [JCLOUDS-838] Introducing InMemoryKeyManager for PEM-encoded certificate... (#153)

Posted by Francesco Chicchiriccò <no...@github.com>.
@nacx Last rebuilt was successful :-)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/153#issuecomment-88836620

Re: [jclouds-labs] [JCLOUDS-838] Introducing InMemoryKeyManager for PEM-encoded certificate... (#153)

Posted by Ignasi Barrera <no...@github.com>.
Thanks @ilgrosso! Looks like an unrelated build failure. let's trigger the build again: rebuild please!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/153#issuecomment-88831230

Re: [jclouds-labs] [JCLOUDS-838] Introducing InMemoryKeyManager for PEM-encoded certificate... (#153)

Posted by Francesco Chicchiriccò <no...@github.com>.
Rebuild, please.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/153#issuecomment-88811282

Re: [jclouds-labs] [JCLOUDS-838] Introducing InMemoryKeyManager for PEM-encoded certificate... (#153)

Posted by Ignasi Barrera <no...@github.com>.
Pushed to master and 1.9.x. Thanks!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/153#issuecomment-90243519

Re: [jclouds-labs] [JCLOUDS-838] Introducing InMemoryKeyManager for PEM-encoded certificate... (#153)

Posted by Ignasi Barrera <no...@github.com>.
> @@ -56,6 +56,11 @@
>        <version>${project.parent.version}</version>
>      </dependency>
>      <dependency>
> +      <groupId>org.apache.jclouds.driver</groupId>
> +      <artifactId>jclouds-sshj</artifactId>
> +      <version>${project.parent.version}</version>

We shouldn't force users to a concrete SSH driver. Wouldn't be enough to just add the BouncyCastle driver dependency? Can we get rid of that dependency, anyway?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/153/files#r27518208

Re: [jclouds-labs] [JCLOUDS-838] Introducing InMemoryKeyManager for PEM-encoded certificate... (#153)

Posted by Francesco Chicchiriccò <no...@github.com>.
@nacx I've carried out the refactoring suggested, please have a look.
FYI at the end I've removed completely the dependency on BouncyCastle.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/153#issuecomment-88778852