puppetlabs / puppetlabs/puppetlabs-sshkeys_core

support sshkey of type `cert-authority`

Open
#89 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement triaged
Dominant language
Ruby
Stars
3
Forks
34
PR merge metrics
No merged PRs in 30d

Description

Use Case

I'd like to have this module add a cert-authority to the global known hosts file.

Describe the Solution You Would Like

This module could allow a sshkey of type cert-authority to populate a known_hosts entry; maybe something like this:

sshkey { '*.example.com':
  ensure => present,
  type   => 'ssh-rsa',
  marker => 'cert-authority',   # or 'revoked'
  key    => 'AAAA…',
}

that would add an entry to the known hosts file

@cert-authority *.example.com ssh-rsa <key>

Describe Alternatives You've Considered

I cannot workaround this; if I add a cert-authority line manually, it leads to an error

Error: /Stage[main]/Ssh/Resources[sshkey]: Failed to generate additional resources using 'generate': Parameter type failed on Sshkey[@]: Invalid value "cert-authority@*". Valid values are ssh-dss, ssh-ed25519, ssh-rsa, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, sk-ecdsa-sha2-nistp256@openssh.com, sk-ssh-ed25519@openssh.com.

Additional Context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the sshkey resource's type validation and the code that generates entries for the global known hosts file. Trace how the marker and key type are rendered, then verify that a cert-authority declaration produces an @cert-authority entry for the requested host pattern without rejecting the value.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
security
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.