{"record":{"id":"49d0d6012bea7d62","repo":"theforeman/foreman","slug":"unable-to-read-ssl-certification-or-key-for-proxy","errorCode":null,"errorMessage":"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.","messagePattern":"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\\.","errorType":"exception","errorClass":"Foreman::WrappedException","httpStatus":null,"severity":"error","filePath":"app/services/proxy_api/resource.rb","lineNumber":148,"sourceCode":"    def session_id\n      ::Logging.mdc['session'] || SecureRandom.uuid\n    end\n\n    def ssl_auth_params\n      cert         = Setting[:ssl_certificate]\n      ca_cert      = Setting[:ssl_ca_file]\n      hostprivkey  = Setting[:ssl_priv_key]\n\n      {\n        :ssl_client_cert  =>  OpenSSL::X509::Certificate.new(File.read(cert)),\n        :ssl_client_key   =>  OpenSSL::PKey.read(File.read(hostprivkey)),\n        :ssl_ca_file      =>  ca_cert,\n        :verify_ssl       =>  OpenSSL::SSL::VERIFY_PEER,\n      }\n    rescue StandardError => exception\n      msg = N_(\"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.\")\n      Foreman::Logging.exception(msg, exception)\n      raise Foreman::WrappedException.new(exception, msg)\n    end\n  end\n\n  class RestClientLogger\n    def initialize(logger)\n      @logger = logger\n    end\n\n    def <<(msg)\n      @logger.debug(msg.chomp)\n    end\n  end\nend\n","sourceCodeStart":130,"sourceCodeEnd":162,"githubUrl":"https://github.com/theforeman/foreman/blob/6b05625475cfe6aac31a88f8c8ee6e62e4efe620/app/services/proxy_api/resource.rb#L130-L162","documentation":"Error \"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.\" thrown in theforeman/foreman.","triggerScenarios":"Thrown at app/services/proxy_api/resource.rb:148 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6b05625475cfe6aac31a88f8c8ee6e62e4efe620","analyzedAt":"2026-08-23T17:46:34.094Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}