Skip to content

Introduce SSH cert support#867

Merged
ekohl merged 1 commit intotheforeman:masterfrom
adamlazik1:ssh-cert-support
Jan 9, 2026
Merged

Introduce SSH cert support#867
ekohl merged 1 commit intotheforeman:masterfrom
adamlazik1:ssh-cert-support

Conversation

@adamlazik1
Copy link
Contributor

No description provided.

@adamlazik1
Copy link
Contributor Author

@adamlazik1 adamlazik1 force-pushed the ssh-cert-support branch 5 times, most recently from 702e256 to 18db7e9 Compare July 11, 2025 07:12
@adamlazik1 adamlazik1 marked this pull request as ready for review July 11, 2025 07:14
@adamlazik1
Copy link
Contributor Author

This is now ready for review.

}
$known_hosts_file_option = $foreman_proxy::plugin::remote_execution::script::ssh_host_ca_public_key ? {
undef => '',
default => "-o UserKnownHostsFile=${foreman_proxy::plugin::remote_execution::script::ssh_identity_dir}/known_hosts -o UserKnownHostsFile=${foreman_proxy::plugin::remote_execution::script::ssh_ca_known_hosts_file}",
Copy link
Contributor Author

@adamlazik1 adamlazik1 Jul 11, 2025

Choose a reason for hiding this comment

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

Same issue as in remote execution. If we have host CA cert available, should we enforce StrictHostKeyChecking?

@evgeni
Copy link
Member

evgeni commented Jul 14, 2025

/packit build

@evgeni
Copy link
Member

evgeni commented Jul 14, 2025

@adamlazik1 could you rebase this please on latest master, so that Packit starts working?

@packit-as-a-service
Copy link

No config file for packit (e.g. .packit.yaml) found in theforeman/puppet-foreman_proxy on commit 18db7e9

For more info, please check out the documentation or contact the Packit team. You can also use our CLI command config validate or our pre-commit hooks for validation of the configuration.

@evgeni
Copy link
Member

evgeni commented Jul 14, 2025

/packit build

@adamlazik1 adamlazik1 force-pushed the ssh-cert-support branch 2 times, most recently from f6c78c1 to 5e673ed Compare July 14, 2025 15:05
@adamlazik1
Copy link
Contributor Author

Updated ansible ssh args to enforce strict host key checking if host CA is provided.

@lhellebr
Copy link
Contributor

/packit build

@packit-as-a-service
Copy link

Account lhellebr has no write access nor is author of PR!

@evgeni
Copy link
Member

evgeni commented Jul 15, 2025

/packit build

@adamlazik1
Copy link
Contributor Author

Switching back to draft since the feature got postponed to 3.16

@adamlazik1 adamlazik1 marked this pull request as draft July 21, 2025 09:06
@lhellebr
Copy link
Contributor

/packit build

@packit-as-a-service
Copy link

Account lhellebr has no write access nor is author of PR!

@adamruzicka
Copy link
Contributor

/packit build

@adamruzicka
Copy link
Contributor

@adamlazik1 could you please rebase and then undraft?

@adamlazik1 adamlazik1 force-pushed the ssh-cert-support branch 2 times, most recently from b95fb9a to d614cca Compare December 18, 2025 09:42
@adamlazik1 adamlazik1 marked this pull request as ready for review December 18, 2025 09:42
@adamlazik1 adamlazik1 force-pushed the ssh-cert-support branch 2 times, most recently from 8164f9a to 844a7ae Compare December 18, 2025 12:04
@adamlazik1
Copy link
Contributor Author

/packit build

@adamlazik1 adamlazik1 force-pushed the ssh-cert-support branch 2 times, most recently from d7986ca to b96bcac Compare December 18, 2025 15:08
@lhellebr
Copy link
Contributor

/packit build

@packit-as-a-service
Copy link

Account lhellebr has no write access nor is author of PR!

@adamlazik1
Copy link
Contributor Author

/packit build

Copy link
Contributor

@adamruzicka adamruzicka left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 98 to 100
$ca_keys_content = file($ssh_host_ca_public_keys_file)
$ca_keys_lines = split($ca_keys_content, "\n").filter |$line| { $line =~ /\S/ }
$ca_known_hosts_content = $ca_keys_lines.map |$line| { "@cert-authority * ${line}" }.join("\n")
Copy link
Contributor

Choose a reason for hiding this comment

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

personal preference:
Maybe having this as a template would be easier to read?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am going to try this out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Appears to work in the current form. Is this what you had in mind @adamruzicka?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good, thank you

@adamlazik1 adamlazik1 marked this pull request as draft January 6, 2026 09:54
@adamlazik1
Copy link
Contributor Author

/packit build

@adamlazik1 adamlazik1 marked this pull request as ready for review January 6, 2026 12:50
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Debian is failing:

ruby-smart-proxy-dynflow : Depends: ruby-dynflow (< 2.0.0) but 2.0.0-1+debian12 is to be installed
        	E: Unable to correct problems, you have held broken packages.

theforeman/smart_proxy_dynflow@3434e2a is already released in 1.0.0 but this isn't packaged yet. Since it's a relevant area I'd like to get those packaged up and released so the tests can be green. Other than that the PR looks good.

@adamruzicka
Copy link
Contributor

theforeman/smart_proxy_dynflow@3434e2a is already released in 1.0.0 but this isn't packaged yet

It's packaged now:

@adamlazik1 adamlazik1 force-pushed the ssh-cert-support branch 3 times, most recently from 985cdab to 2b1d464 Compare January 8, 2026 11:58
@adamlazik1
Copy link
Contributor Author

@ekohl The tests are green again. PR ready for merge ✌️

@lhellebr
Copy link
Contributor

lhellebr commented Jan 9, 2026

merge

@ekohl ekohl merged commit 648e3d2 into theforeman:master Jan 9, 2026
9 checks passed
@adamlazik1 adamlazik1 deleted the ssh-cert-support branch January 12, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants