Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ssh credentials from support plugin #862

Merged
merged 3 commits into from
Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integrations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>ssh-credentials</artifactId>
<version>1.13</version>
<version>1.16</version>
<scope>test</scope>
</dependency>

Expand Down
7 changes: 0 additions & 7 deletions support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@
<optional>true</optional>
</dependency>

<dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you verified / is there a test that shows that the private key isn't exported in plain text?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YES 😆

Arguably this should be updated to check the direct key

List<BasicSSHUserPrivateKey> creds2 = CredentialsProvider.lookupCredentials(BasicSSHUserPrivateKey.class,Jenkins.getInstanceOrNull(), null, Collections.emptyList());
assertThat(creds2.size(), is(1));
assertEquals("agentuser", creds2.get(0).getUsername());
assertEquals("password", creds2.get(0).getPassphrase().getPlainText());
assertEquals("ssh private key used to connect ssh slaves", creds2.get(0).getDescription());

privateKeySource:
directEntry:
privateKey: sp0ds9d+skkfjf

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently not ready, see CI... the test ran locally 😕

Copy link
Member Author

@jetersen jetersen Apr 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jvz we need some more magic it seems!
We just needed to fix our tests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It really needs to be, as it was a security issue, and we don't want it accidentally re-introduced

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works locally, I don't get it 😕

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused why its trying to use this:

Caused by: java.lang.IllegalArgumentException: No com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey$PrivateKeySource implementation found for FileOnMasterPrivateKeySource
Possible solution: Try to install 'configuration-as-code-support' plugin

it should be directEntry not the fileOnMaster...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in: 202ab7b

<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>ssh-credentials</artifactId>
<version>1.13</version>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>job-dsl</artifactId>
Expand Down

This file was deleted.