Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--- a/lib/launcher.rb
+++ b/lib/launcher.rb
@@ -5,7 +5,6 @@
require 'proxy/log_buffer/trace_decorator'
require 'sd_notify'

-CRYPTO_POLICIES_CONFIG = '/etc/crypto-policies/back-ends/opensslcnf.config'.freeze
TLS_MIN_VERSION_MAP = {
'1.0' => OpenSSL::SSL::TLS1_VERSION,
'1.1' => OpenSSL::SSL::TLS1_1_VERSION,
@@ -117,13 +116,7 @@
return nil if configured&.empty?
return configured unless configured.nil?

- if File.exist?(CRYPTO_POLICIES_CONFIG)
- logger.info "Crypto-policies detected, using PROFILE=SYSTEM for TLS ciphers."
- 'PROFILE=SYSTEM'
- else
- logger.debug "No crypto-policies detected, using HIGH cipher string as default."
- 'HIGH'
- end
+ 'PROFILE=SYSTEM'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

On upstream, this either logs crypto-policies are used, or not.
On Satellite, this deletes any logging - there will be no information about crypto-policies.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

On Satellite, this deletes any logging - there will be no information about crypto-policies.

Would it make sense to log something that has no alternatives?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think it won't leave the user wondering. It's probably nice to see "yes, if I set crypto policies, they will be taken into account".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Based on what @evgeni said in the comments I am reevaluating whether we should have this patch at all. If a RHEL system has crypto-policies enabled but no config file, that's a broken system and probably not something we should deal with. Opinions?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@ekohl also said that the patch might not be necessary in here theforeman/smart-proxy#947 (comment)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I thought the reason for this patch was to avoid autodetection during startup every time. If it isn't a problem (and I don't think it is), I also think this patch doesn't need to exist at all. A system either has crypto-policies or it doesn't, and we don't really care whether it's rpm based or something else based.

If a system is broken in a way that it does have crypto policies and doesn't have the file, it's nice to have this exception caught and communicated somehow, but for this case you don't need to explain things, just say that the file doesn't exist.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

end

def validate_tls_ciphers!(ciphers)
9 changes: 7 additions & 2 deletions packages/foreman/foreman-proxy/foreman-proxy.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%global homedir %{_datadir}/%{name}
%global confdir config

%global release 1
%global release 2
%global prereleasesource develop
%global prerelease %{?prereleasesource}

Expand All @@ -17,6 +17,8 @@ Source0: https://downloads.theforeman.org/%{name}/%{name}-%{version}%{?pr
Source1: %{name}.tmpfiles
Source2: logrotate.conf

Patch0: %{name}-use-crypto-policies.patch

BuildArch: noarch
BuildRequires: /usr/bin/rename
BuildRequires: asciidoc
Expand Down Expand Up @@ -83,7 +85,7 @@ Manages DNS, DHCP, TFTP and puppet settings though HTTP Restful API
Mainly used by the foreman project (https://theforeman.org)

%prep
%setup -q -n %{name}-%{version}%{?prerelease:-}%{?prerelease}
%autosetup -p1 -n %{name}-%{version}%{?prerelease:-}%{?prerelease}

%build
#build man pages
Expand Down Expand Up @@ -239,6 +241,9 @@ exit 0


%changelog
* Mon Jun 15 2026 Adam Lazik <alazik@redhat.com> - 5.0.0-0.2.develop
- Apply crypto-policies patch for tls_ciphers and tls_min_version

* Wed May 20 2026 Zach Huntington-Meath <zhunting@redhat.com> - 5.0.0-0.1.develop
- Bump version to 5.0-develop

Expand Down