[JIRA] (JENKINS-55203) Jenkins EC2 plugin prints private key contents in Jenkins log

11 views
Skip to first unread message

nicky@dragonlily.co.uk (JIRA)

unread,
Dec 14, 2018, 9:42:02 AM12/14/18
to jenkinsc...@googlegroups.com
Nicola Forbes created an issue
 
Jenkins / Improvement JENKINS-55203
Jenkins EC2 plugin prints private key contents in Jenkins log
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: ec2-plugin
Created: 2018-12-14 14:41
Environment: Jenkins: 2.150
Plugin: Version 1.41
Priority: Minor Minor
Reporter: Nicola Forbes

The Jenkins EC2 plugin prints the contents of the private key into the main jenkins log when it spins up and connects to new slaves. Please can this information be excluded from the logging.

I believe the line that needs to be changed is:

https://github.com/jenkinsci/ec2-plugin/blob/master/src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java#L278-L279

Example log output given below:

``` Dec 14, 2018 9:42:50 AM hudson.plugins.ec2.EC2Cloud log
INFO: Getting keypair...
Dec 14, 2018 9:42:50 AM hudson.plugins.ec2.EC2RetentionStrategy start
INFO: Start requested for Jenkins Generic Agents (i-092c20a865eed9e81)
Dec 14, 2018 9:42:50 AM hudson.plugins.ec2.EC2Cloud log
INFO: Launching instance: i-092c20a865eed9e81
Dec 14, 2018 9:42:50 AM hudson.plugins.ec2.EC2Cloud log
INFO: bootstrap()
Dec 14, 2018 9:42:50 AM hudson.plugins.ec2.EC2Cloud log
INFO: Getting keypair...
Dec 14, 2018 9:42:50 AM hudson.plugins.ec2.EC2Cloud log
INFO: Using key: my-jenkins-key
f1:xf:81:b4:d4:4f:49:1f:b2:f6:2a:hg:39:77:t4:4v
----BEGIN RSA PRIVATE KEY----
<PRIVATE KEY HERE> ```

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

tilman.blumenbach@acrolinx.com (JIRA)

unread,
Jun 19, 2019, 2:55:02 PM6/19/19
to jenkinsc...@googlegroups.com
Tilman Blumenbach started work on Improvement JENKINS-55203
 
Change By: Tilman Blumenbach
Status: Open In Progress

tilman.blumenbach@acrolinx.com (JIRA)

unread,
Jun 19, 2019, 2:55:02 PM6/19/19
to jenkinsc...@googlegroups.com

tilman.blumenbach@acrolinx.com (JIRA)

unread,
Jun 19, 2019, 2:59:02 PM6/19/19
to jenkinsc...@googlegroups.com
Tilman Blumenbach updated an issue
The Jenkins EC2 plugin prints the contents of the private key into the main jenkins log when it spins up and connects to new slaves.  Please can this information be excluded from the logging.

I believe the line that needs to be changed is:  

https://github.com/jenkinsci/ec2-plugin/blob/master/src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java#L278-L279

Example log output given below:

``` {noformat}
Dec 14, 2018 9:42:50 AM hudson.plugins.ec2.EC2Cloud log
INFO: Getting keypair...
Dec 14, 2018 9:42:50 AM hudson.plugins.ec2.EC2RetentionStrategy start
INFO: Start requested for Jenkins Generic Agents (i-092c20a865eed9e81)
Dec 14, 2018 9:42:50 AM hudson.plugins.ec2.EC2Cloud log
INFO: Launching instance: i-092c20a865eed9e81
Dec 14, 2018 9:42:50 AM hudson.plugins.ec2.EC2Cloud log
INFO: bootstrap()
Dec 14, 2018 9:42:50 AM hudson.plugins.ec2.EC2Cloud log
INFO: Getting keypair...
Dec 14, 2018 9:42:50 AM hudson.plugins.ec2.EC2Cloud log
INFO: Using key: my-jenkins-key
f1:xf:81:b4:d4:4f:49:1f:b2:f6:2a:hg:39:77:t4:4v
-----BEGIN RSA PRIVATE KEY-----
<PRIVATE KEY HERE>
```
{noformat}

tilman.blumenbach@acrolinx.com (JIRA)

unread,
Jun 21, 2019, 6:32:02 PM6/21/19
to jenkinsc...@googlegroups.com
Change By: Tilman Blumenbach
Status: In Progress Fixed but Unreleased
Resolution: Fixed

tilman.blumenbach@acrolinx.com (JIRA)

unread,
Jun 24, 2019, 11:23:02 AM6/24/19
to jenkinsc...@googlegroups.com
Change By: Tilman Blumenbach
Status: Fixed but Unreleased Closed
Assignee: Tilman Blumenbach
Released As: Amazon EC2 v1.44

tilman.blumenbach@acrolinx.com (JIRA)

unread,
Jun 24, 2019, 11:23:03 AM6/24/19
to jenkinsc...@googlegroups.com

boards@gmail.com (JIRA)

unread,
Jul 3, 2019, 3:34:02 PM7/3/19
to jenkinsc...@googlegroups.com
Matt Sicker updated an issue
Change By: Matt Sicker
Released As: Amazon EC2 plug ec2 - in v1 1 .44 , 1.42.1, 1.41.1

boards@gmail.com (JIRA)

unread,
Jul 3, 2019, 3:35:02 PM7/3/19
to jenkinsc...@googlegroups.com
Matt Sicker commented on Improvement JENKINS-55203
 
Re: Jenkins EC2 plugin prints private key contents in Jenkins log

I backported the public security fix to create 1.42.1 and 1.41.1 due to some configuration changes in 1.43 that make it forward incompatible.

Reply all
Reply to author
Forward
0 new messages