Jira (FACT-1833) SSH host key without comment adds trailing newline

0 vistas
Ir al primer mensaje no leído

Olav Morken (JIRA)

no leída,
12 mar 2018, 9:55:03 a.m.12/3/2018
para puppe...@googlegroups.com
Olav Morken created an issue
 
Facter / Bug FACT-1833
SSH host key without comment adds trailing newline
Issue Type: Bug Bug
Affects Versions: FACT 3.10.0, FACT 3.6.9
Assignee: Unassigned
Created: 2018/03/12 6:54 AM
Priority: Normal Normal
Reporter: Olav Morken

If the SSH host public key file does not contain a comment, the public key will contain a trailing newline.

For example:

 

$ echo 'ssh-rsa public-key' >/etc/ssh/ssh_host_rsa_key.pub
$ facter ssh
{
  rsa => {
    key => "public-key
"
  }
}

{{}}

 

If the key contains a comment, we do not get the trailing newline:

 


$ echo 'ssh-rsa public-key comment' >/etc/ssh/ssh_host_rsa_key.pub
$ facter ssh
{{{}}
  rsa => {
    key => "public-key"
{{  }}}
}

 

The trailing newline causes issues when using the resulting fact directly in a sshkey resource, where the trailing newline makes Puppet think the resource is changed on every run.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Olav Morken (JIRA)

no leída,
12 mar 2018, 9:56:02 a.m.12/3/2018
para puppe...@googlegroups.com
Olav Morken updated an issue
Change By: Olav Morken
If the SSH host public key file does not contain a comment, the public key will contain a trailing newline.

For example:

 
{noformat}
$ echo 'ssh-rsa public-key' >/etc/ssh/ssh_host_rsa_key.pub
$ facter ssh
{
  rsa => {
    key => "public-key
"
  }
}{noformat}
{{}}

 

If the key contains a comment, we do not get the trailing newline:

 
{noformat}

{noformat}
{{
$ echo 'ssh-rsa public-key comment' >/etc/ssh/ssh_host_rsa_key.pub }}
{{ $ facter ssh }}
{
{{}}
{{   rsa => { }}
{{    key => "public-key" }}
{{  } }}
} { { noformat } }}

 

The trailing newline causes issues when using the resulting fact directly in a sshkey resource, where the trailing newline makes Puppet think the resource is changed on every run.

Olav Morken (JIRA)

no leída,
12 mar 2018, 9:56:03 a.m.12/3/2018
para puppe...@googlegroups.com
Olav Morken updated an issue
If the SSH host public key file does not contain a comment, the public key will contain a trailing newline.

For example:

 
{noformat}$ echo 'ssh-rsa public-key' >/etc/ssh/ssh_host_rsa_key.pub
$ facter ssh
{
  rsa => {
    key => "public-key
"
  }
}{noformat}
If the key contains a comment, we do not get the trailing newline:

 
{noformat}$ echo 'ssh-rsa public-key comment' >/etc/ssh/ssh_host_rsa_key.pub

$ facter ssh
{
 rsa => {
    key => "public-key"
  }
}{noformat}
The trailing newline causes issues when using the resulting fact directly in a sshkey resource, where the trailing newline makes Puppet think the resource is changed on every run.

Scott McClellan (JIRA)

no leída,
20 mar 2018, 5:10:02 p.m.20/3/2018
para puppe...@googlegroups.com

Scott McClellan (JIRA)

no leída,
20 mar 2018, 5:11:02 p.m.20/3/2018
para puppe...@googlegroups.com

Brian McNally (JIRA)

no leída,
19 nov 2019, 7:34:04 p.m.19/11/2019
para puppe...@googlegroups.com
Brian McNally commented on Bug FACT-1833
 
Re: SSH host key without comment adds trailing newline

Thanks for such a clear description of this problem Olav. I've spent some time banging my head against the wall with this bug as well. Can we get this fixed, Puppet? This was reported over 18 months ago and still hasn't been assigned to anyone for fixing.

Josh Cooper (JIRA)

no leída,
20 nov 2019, 1:53:05 p.m.20/11/2019
para puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Team: Platform OS Night's Watch

Austin Boyd (JIRA)

no leída,
18 feb 2020, 6:21:04 a.m.18/2/2020
para puppe...@googlegroups.com
Austin Boyd updated an issue
Change By: Austin Boyd
Zendesk Ticket IDs: 35920
Zendesk Ticket Count: 1

Mihai Buzgau (JIRA)

no leída,
18 feb 2020, 10:51:05 a.m.18/2/2020
para puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: NW - 2020-03-03

Mihai Buzgau (JIRA)

no leída,
19 feb 2020, 5:46:03 a.m.19/2/2020
para puppe...@googlegroups.com

Ciprian Badescu (JIRA)

no leída,
20 feb 2020, 10:03:09 a.m.20/2/2020
para puppe...@googlegroups.com

Ciprian Badescu (JIRA)

no leída,
26 feb 2020, 7:29:06 a.m.26/2/2020
para puppe...@googlegroups.com
Ciprian Badescu updated an issue
Change By: Ciprian Badescu
Release Notes Summary: correctly displays ssh host key fact in the case the host key file does no contain a comment
Release Notes: Bug Fix

Mihai Buzgau (Jira)

no leída,
3 mar 2020, 5:26:03 a.m.3/3/2020
para puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Fix Version/s: FACT 3.11.12
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Mihai Buzgau (Jira)

no leída,
3 mar 2020, 5:27:03 a.m.3/3/2020
para puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Fix Version/s: FACT 3.14.9
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos