sul-dlss / exhibits

Stanford University Libraries online exhibits showcase
https://exhibits.stanford.edu
Other
20 stars 7 forks source link

ExhibitBot is unable to send messages to Slack #2524

Closed corylown closed 2 months ago

corylown commented 2 months ago

By default the Slack::Web::Client looks to /usr/lib/ssl/cert.pem to set the ca_file and ca_path but there is no such file in Ubuntu. We need Slack::Web::Client to look for /etc/ssl/certs/ca-certificates.crt instead.

The default behavior is basically this where OpenSSL::X509::DEFAULT_CERT_FILE and OpenSSL::X509::DEFAULT_CERT_DIR return the wrong locations for Ubuntu: client = Slack::Web::Client.new(ca_file: OpenSSL::X509::DEFAULT_CERT_FILE, ca_path: OpenSSL::X509::DEFAULT_CERT_DIR)

It's possible that setting SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt will fix it but we'd need to test that.