Smart-proxy certificate error with connection to Foreman

Problem:

Error: Proxy foreman-proxy cannot be registered: Unable to communicate with the proxy: ERF50-4354 [Foreman::WrappedException]: Unable to read SSL certification or key for proxy communication, check settings for ssl_certificate, ssl_ca_file and ssl_priv_key and ensure they are readable by the foreman user. ([Errno::EACCES]: Permission denied @ rb_sysopen - /etc/puppetlabs/puppet/ssl/private_keys/foreman01.pem) Please check the proxy is configured and running on the host.
Error: /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foreman-proxy]/ensure: change from ‘absent’ to ‘present’ failed: Proxy foreman-proxy cannot be registered: Unable to communicate with the proxy: ERF50-4354 [Foreman::WrappedException]: Unable to read SSL certification or key for proxy communication, check settings for ssl_certificate, ssl_ca_file and ssl_priv_key and ensure they are readable by the foreman user. ([Errno::EACCES]: Permission denied @ rb_sysopen - /etc/puppetlabs/puppet/ssl/private_keys/foreman01.pem) Please check the proxy is configured and running on the host.

Expected outcome:

Foreman and Proxy versions:

1.22

Foreman and Proxy plugin versions:

Other relevant data:

logs

I’ve tried to change the key and cert permissions but it didn’t help.

It was solved with copy of puppet’s certificates and I change them group to ‘foreman’. So, now foreman uses copy of puppet’s certificates.